/* 한 건 입력 → 월 합계 → 근거 목록. 기존 흰 바탕/초록/Pretendard를 상속한다.
   본문 최대 1100px. 입력 3열 = (가용폭 - 2×16px) / 3, 좁아지면 2열→1열. */
.fpe{max-width:1100px;margin:0 auto;min-width:0;font-family:Pretendard,'맑은 고딕',sans-serif;color:#24282a;font-variant-numeric:tabular-nums}
.fpe *{box-sizing:border-box}.fpe-heading{margin-bottom:20px}.fpe-heading h1{font-size:24px;line-height:1.4;font-weight:650;letter-spacing:-.6px}.fpe-heading p{font-size:14px;color:#5f6d63;margin-top:6px;line-height:1.7;text-wrap:pretty}
.fpe-entry,.fpe-summary{border:1px solid #e4e8e5;border-radius:8px;padding:20px;margin-bottom:20px;background:#fff}.fpe-list{padding-top:4px;min-width:0}.fpe-section-head,.fpe-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.fpe h2{font-size:16px;line-height:1.5;font-weight:600;letter-spacing:-.2px}.fpe-help{font-size:12px;line-height:1.7;color:#5f6d63}.fpe a{text-decoration:underline;text-underline-offset:3px;color:#4B30C9;min-height:44px;display:inline-flex;align-items:center}.fpe button{min-height:44px;border-radius:6px;font-size:13px;white-space:normal;word-break:keep-all;line-height:1.5;touch-action:manipulation}.fpe button:disabled{opacity:1;color:#5e6861;background:#f1f3f1;border-color:#d7dcda;cursor:not-allowed}.fpe button.primary{background:#5B3FD6;border-color:#5B3FD6;color:#fff}.fpe button.primary:hover{background:#4128B0;border-color:#4128B0}.fpe button.primary:disabled{background:#e9efea;border-color:#d4ded6;color:#56635a}.fpe :is(input,select,textarea){font-size:16px;min-height:44px;min-width:0;max-width:100%;border:1px solid #cbd4ce;border-radius:6px;padding:9px 10px;background:#fff;color:#24282a;caret-color:#6A4BE8;line-height:1.5}.fpe :is(input,textarea)::placeholder{color:#68706c}.fpe :is(input,select,textarea):focus{outline:2px solid #5B3FD6;outline-offset:2px}.fpe :is(button,a,summary):focus-visible{outline:2px solid #5B3FD6;outline-offset:3px}.fpe ::selection{background:#E3DCFF;color:#2A1B7A}
.fpe-fields{border:0;padding:0;margin:0;min-width:0}.fpe-switch{display:inline-flex;gap:3px;padding:3px;background:#f1f3f1;border-radius:6px;margin-bottom:16px}.fpe-switch button{min-width:105px;border:1px solid transparent;background:none;color:#5f6d63}.fpe-switch button[aria-pressed=true]{border-color:#dce3dd;background:#fff;color:#273a2e;font-weight:600}.fpe-main-fields{display:grid;grid-template-columns:minmax(140px,.9fr) minmax(160px,1fr) minmax(180px,1.35fr);gap:16px;align-items:start}.fpe-field{display:flex;flex-direction:column;gap:7px;min-width:0}.fpe-field label{font-size:13px;font-weight:500;line-height:1.5}.fpe-field label span{font-size:12px;font-weight:400;color:#5f6d63}.fpe-field :is(input,select,textarea){width:100%}#fpe-amount{text-align:right;font-weight:550;font-variant-numeric:tabular-nums}.fpe-source-chips{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 4px;min-width:0}.fpe-source-chips button{flex:0 1 auto;min-width:0;max-width:100%;padding:7px 11px;border-color:#e1e6e2;color:#4a5f50;overflow-wrap:anywhere;word-break:normal;background:#fff}.fpe-source-chips button:hover{border-color:#8ca693;background:#f7faf7}
.fpe-details{margin-top:14px;border-top:1px solid #edf0ee}.fpe-details summary{min-height:44px;padding:12px 2px;font-size:13px;color:#435c4b;cursor:pointer;width:fit-content}.fpe-details[open] summary{margin-bottom:4px}.fpe-detail-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.fpe-wide{grid-column:1/-1}.fpe textarea{resize:vertical;min-height:76px;max-height:260px}.fpe-check{display:flex;align-items:center;gap:9px;min-height:44px;font-size:13px;grid-column:1/-1;cursor:pointer}.fpe .fpe-check input{width:19px;height:19px;min-height:19px;flex:none;padding:0;accent-color:#5B3FD6}.fpe-check+.fpe-help{margin-top:-12px}.fpe-double-note{margin-top:12px;max-width:90ch}.fpe-form-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;border-top:1px solid #edf0ee;padding-top:16px}.fpe-form-foot>div{display:flex;gap:8px;flex:none}.fpe-form-foot .primary{min-width:115px}.fpe-form-error{margin-top:14px;font-size:13px;line-height:1.7;color:#a02d27;overflow-wrap:anywhere}.fpe-warning{font-size:13px;line-height:1.8;color:#735727;background:#fcfaf4;border:1px solid #e7dfcb;border-radius:6px;padding:10px 12px;margin-bottom:16px}.fpe-summary .fpe-warning{margin:12px 0 0}.fpe-summary-head>label{display:flex;align-items:center;gap:9px;font-size:13px;color:#5f6d63}.fpe-summary-head select{font-size:14px;width:auto}.fpe-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 14px;padding:0}.fpe-totals>div{padding:0 18px;border-left:1px solid #edf0ee;min-width:0}.fpe-totals>div:first-child{padding-left:0;border-left:0}.fpe-totals dt{font-size:13px;color:#5f6d63;margin-bottom:6px}.fpe-totals dd{margin:0;font-size:24px;line-height:1.4;font-weight:600;letter-spacing:-.5px;overflow-wrap:anywhere}.fpe small{font-size:12px;color:#5f6d63;font-weight:400;letter-spacing:0;margin-left:4px}.fpe-sale{color:#247b50}.fpe-summary-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:12px}.fpe-summary-foot button{flex:none}.fpe-filters{display:flex;align-items:end;gap:12px;margin-bottom:12px}.fpe-filters select{width:145px}.fpe-search{flex:1;max-width:360px}.fpe-list-count{font-size:13px;line-height:1.8;color:#42584b;margin-bottom:10px;overflow-wrap:anywhere}.fpe-list-count span{display:block;font-size:12px;color:#5f6d63}.fpe-records{list-style:none;margin:0;padding:0;border-top:1px solid #e4e8e5}.fpe-record{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,auto) auto;gap:16px;padding:14px 0;border-bottom:1px solid #edf0ee;align-items:center;min-width:0}.fpe-record-main{min-width:0}.fpe-record-main time{font-size:12px;color:#5f6d63;display:block;margin-bottom:3px}.fpe-record-main>strong{font-size:14px;font-weight:550;overflow-wrap:anywhere}.fpe-record-main p{font-size:12px;color:#5f6d63;line-height:1.7;overflow-wrap:anywhere;margin-top:3px}.fpe-record-main .fpe-memo{white-space:pre-wrap;color:#4a5f50}.fpe-record-value{text-align:right;min-width:0}.fpe-record-value>strong{font-size:17px;font-weight:600;display:block;overflow-wrap:anywhere}.fpe-record-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end}.fpe-record-actions button{padding:7px 10px;border-color:transparent;background:transparent;color:#4a5f50;min-width:48px}.fpe-record-actions button:hover{border-color:#cbd7ce;background:#f8faf8}.fpe-excluded{display:block;font-size:12px;color:#735727;margin-top:4px}.fpe-empty{padding:22px 16px;border:1px solid #e4e8e5;border-radius:6px;background:#fafbf9;font-size:13px;color:#5f6d63;line-height:1.8}.fpe-paging{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:16px;font-size:13px}.fpe-undo{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dce5de;border-radius:6px;font-size:13px;line-height:1.7;margin-bottom:12px;background:#f7faf7}.fpe-undo span{min-width:0;overflow-wrap:anywhere}.fpe-undo button{flex:none}.fpe-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px){.fpe-main-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.fpe-merchant{grid-column:1/-1}.fpe-record{grid-template-columns:minmax(0,1fr) minmax(120px,auto);gap:8px 12px}.fpe-record-actions{grid-column:1/-1}.fpe-form-foot{align-items:flex-start}.fpe-summary-foot{align-items:flex-start}.fpe-totals dd{font-size:22px}}
@media(max-width:520px){.fpe-heading h1{font-size:23px}.fpe-entry,.fpe-summary{padding:16px}.fpe-section-head{gap:8px;flex-wrap:wrap}.fpe-main-fields{grid-template-columns:1fr;gap:14px}.fpe-merchant{grid-column:auto}.fpe-switch{display:flex;width:100%}.fpe-switch button{flex:1;min-width:0}.fpe-detail-fields{grid-template-columns:1fr}.fpe-field label,.fpe-check{font-size:14px}.fpe-form-foot{flex-direction:column;gap:12px}.fpe-form-foot>div{width:100%}.fpe-form-foot button{flex:1}.fpe-summary-head{flex-wrap:wrap;gap:10px}.fpe-summary-head>label{margin-left:auto}.fpe-summary-head select{font-size:16px}.fpe-totals{grid-template-columns:1fr;gap:10px}.fpe-totals>div,.fpe-totals>div:first-child{border-left:0;padding:0;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.fpe-totals dt{margin:0;flex:none}.fpe-totals dd{text-align:right;font-size:21px;min-width:0}.fpe-summary-foot{flex-direction:column;gap:10px}.fpe-summary-foot button{width:100%}.fpe-record{grid-template-columns:minmax(0,1fr) minmax(88px,auto);align-items:start}.fpe-record-value>strong{font-size:16px}.fpe-record-actions{padding-top:1px}.fpe-filters{gap:10px;align-items:stretch}.fpe-filters select{width:100%;font-size:16px}.fpe-filters>.fpe-field:first-child{flex:0 0 90px}.fpe-search{max-width:none;min-width:0}.fpe-search label{font-size:13px}.fpe-paging{gap:10px}.fpe-undo{align-items:flex-start;flex-wrap:wrap}.fpe-undo button{margin-left:auto}.fpe-help{font-size:12px}}
@media(max-width:359px){.fpe-entry,.fpe-summary{padding:12px}.fpe-record{gap:8px}.fpe-record-value{max-width:128px}.fpe-totals dd{font-size:20px}.fpe-source-chips{gap:5px}}
@media(prefers-reduced-motion:reduce){.fpe *{transition:none!important}}
@media print{.fpe-entry,.fpe-filters,.fpe-record-actions,.fpe-paging,.fpe-undo,.fpe-summary-foot button{display:none!important}.fpe-summary{break-inside:avoid}.fpe-record{break-inside:avoid;grid-template-columns:1fr auto}.fpe{max-width:none}}

/* 작은 화면의 입력 순서: 날짜는 한 줄, 금액과 구매처는 나란히. 저장 버튼은 임시보관 안내보다 먼저. */
@media(max-width:520px){.fpe-main-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.fpe-main-fields>.fpe-field:first-child{grid-column:1/-1;display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:8px}.fpe-merchant{grid-column:auto}.fpe-form-foot>div{order:0}.fpe-form-foot>[data-fpe-draft-status]{order:1}.fpe-source-chips button{flex:none;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.fpe-source-chips{flex-wrap:nowrap;overflow-x:auto;padding:2px 2px 6px}.fpe-form-foot{margin-top:12px;padding-top:12px}}

/* 거래 항목 우선 입력과 가게별 직접 추가 */
.fpe-main-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.fpe-main-fields>.fpe-item{grid-column:1 / -1}.fpe-main-fields>.fpe-merchant{grid-column:1 / -1}
.fpe-item select{font-weight:550}.fpe-item select option[value="__add"]{color:#4B30C9;font-weight:650}.fpe-item .fpe-help{color:#4f5b54}
.fpe-add-item{margin-top:14px;padding:16px;border:1px solid #D9D0FF;border-radius:12px;background:#FAF8FF}.fpe-add-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}.fpe-add-head strong{font-size:14px;color:#2A1B7A}.fpe-add-fields{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:12px}.fpe-add-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.fpe-add-actions button{min-width:88px}.fpe-add-item .fpe-form-error{margin-top:10px}
.fpe-source-chips .fpe-save-partner{border-style:dashed;border-color:#B8A9F5;color:#4B30C9;background:#fff}.fpe-source-chips .fpe-save-partner:hover{border-color:#6A4BE8;background:#F7F5FF}
@media(max-width:760px){.fpe-main-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.fpe-main-fields>.fpe-merchant{grid-column:1 / -1}}
@media(max-width:520px){.fpe-main-fields,.fpe-add-fields{grid-template-columns:minmax(0,1fr)}.fpe-add-head{display:block}.fpe-add-head .fpe-help{display:block;margin-top:4px}.fpe-add-actions button{flex:1}}
.settings-catalog details{border-top:1px solid #EFECF7;padding-top:12px;margin-top:12px}.settings-catalog summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600;font-size:14px}.catalog-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}.catalog-list li{display:flex;align-items:center;gap:10px;min-height:48px;padding:4px 0 4px 12px;border:1px solid #EFECF7;border-radius:10px}.catalog-list span{flex:1;min-width:0}.catalog-list small{display:block;color:#68706c;font-size:11px;margin-top:2px}.catalog-list .is-hidden{color:#7b817e}.catalog-list button{min-height:40px;margin-right:4px}
@media(max-width:520px){.fpe-main-fields>.fpe-item:first-child{display:flex;grid-template-columns:none;align-items:stretch}.fpe-main-fields>.fpe-item+.fpe-field{grid-column:1/-1}.fpe-main-fields>.fpe-merchant{grid-column:1/-1}}
/* 하루 매출 마감: 판매 금액만 한 번에 입력 */
.fpe-mode{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#F1EEFF;border-radius:12px;margin-bottom:16px;max-width:520px}.fpe-mode button{min-height:48px;border:0;border-radius:9px;background:transparent;color:#4B30C9;font-size:15px;font-weight:600}.fpe-mode button[aria-selected=true]{background:#fff;color:#2A1B7A;box-shadow:0 1px 3px #2a1b7a26}
.fpe-close .fpe-section-head{margin-bottom:6px}.fpe-close-badge{font-size:12px;font-weight:600;color:#1f7a4d;background:#E9F7EF;border-radius:999px;padding:4px 10px}.fpe-close-guide{margin-bottom:16px;font-size:13px}.fpe-close-guide strong{color:#2A1B7A}
.fpe-close-date{max-width:240px;margin-bottom:14px}.fpe-close-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.fpe-close-row{display:flex;flex-direction:column;gap:6px;min-width:0}.fpe-close-row label{font-size:13px;font-weight:550}.fpe-won{position:relative}.fpe-won input{width:100%;text-align:right;padding-right:34px!important;font-weight:600;font-variant-numeric:tabular-nums}.fpe-won span{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:13px;color:#5f6d63;pointer-events:none}
.fpe-close-total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:18px 0 6px;padding:14px 16px;border-radius:12px;background:#F7F5FF}.fpe-close-total span{font-size:14px;font-weight:600;color:#2A1B7A}.fpe-close-total strong{font-size:24px;color:#4B30C9;font-variant-numeric:tabular-nums}.fpe-close-total small{font-size:14px;margin-left:2px}
@media(max-width:520px){.fpe-close-rows{grid-template-columns:minmax(0,1fr)}.fpe-close-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center;gap:10px}.fpe-close-date{max-width:none}.fpe-mode{max-width:none}.fpe-mode button{font-size:14px}}
.fpe-mode-dot{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:#6A4BE8;color:#fff;font-size:11px;font-weight:600;vertical-align:1px}
/* 매달 나가는 비용 */
.fpe-rec-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}.fpe-rec-row{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(130px,170px) auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid #EFECF7;border-radius:12px}.fpe-rec-row.is-paused{background:#fafafa;color:#6f7570}.fpe-rec-row input[type=checkbox]{width:22px;height:22px;min-height:0;accent-color:#6A4BE8}.fpe-rec-mark{width:22px;text-align:center;color:#1f7a4d;font-weight:700}.fpe-rec-name{min-width:0}.fpe-rec-name strong{display:block;font-size:15px;font-weight:600;overflow-wrap:anywhere}.fpe-rec-name span{display:block;font-size:12px;color:#5f6d63;margin-top:2px}.fpe-rec-done{color:#1f7a4d;font-weight:600}.fpe-rec-value{text-align:right;font-weight:600;font-variant-numeric:tabular-nums}.fpe-rec-actions{display:flex;gap:4px}.fpe-rec-actions button{min-width:52px;padding:6px 10px}
.fpe-rec-commit{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 6px;padding:12px 14px;border-radius:12px;background:#F7F5FF}.fpe-rec-commit span{font-weight:600;color:#2A1B7A;font-variant-numeric:tabular-nums}.fpe-rec-all{margin-top:12px;color:#1f7a4d}
.fpe-rec-add{margin-top:14px;width:100%;border:1px dashed #B8A9F5;background:#fff;color:#4B30C9;font-weight:600}.fpe-rec-add:hover{background:#F7F5FF;border-color:#6A4BE8}.fpe-rec-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.fpe-rec-fields .fpe-wide{grid-column:1/-1}
@media(max-width:620px){.fpe-rec-row{grid-template-columns:28px minmax(0,1fr) auto;grid-template-areas:"pick name actions" "pick amount amount"}.fpe-rec-row>input,.fpe-rec-row>.fpe-rec-mark{grid-area:pick}.fpe-rec-name{grid-area:name}.fpe-rec-amount,.fpe-rec-value{grid-area:amount}.fpe-rec-actions{grid-area:actions}.fpe-rec-commit{flex-direction:column;align-items:stretch}.fpe-rec-commit button{width:100%}}
@media(max-width:520px){.fpe-rec-fields{grid-template-columns:minmax(0,1fr)}.fpe-rec-actions button{min-width:0;padding:6px 8px}}
