/* 設定 → 請求書受領箱（管理者専用） */
.pci h2 { margin: 6px 0; }
.pci h2 small { font-size: 12px; font-weight: 400; color: var(--muted); }
.pci h3 { margin: 12px 0 4px; font-size: 14px; }
.pci .table-wrap { overflow-x: auto; max-width: 100%; }
.pci .num { text-align: right; white-space: nowrap; }
.pci .invo-table td, .pci .invo-table th { vertical-align: top; }
.pci .invo-tag { display: inline-block; border-radius: 6px; padding: 1px 6px; font-size: 11px; border: 1px solid var(--line); white-space: nowrap; }
.pci .invo-tag.ok { color: var(--green); border-color: var(--green); }
.pci .invo-tag.warn { color: var(--amber); border-color: var(--amber); }
.pci .invo-tag.failed { color: var(--red); border-color: var(--red); }
.pci .invo-tag.none { color: var(--muted); }
.pci-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 10px 0; }
.pci-filter label { margin: 0; }
.pci-paging { display: flex; gap: 8px; margin: 8px 0; }
/* 詳細：左に原本PDF、右に基本情報などの欄。明細は表が広く必要なので、下に横幅いっぱいで置く（フォームは display: contents で、中身を同じ格子に並べる） */
.pci .invo-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.pci .invo-split > .pci-form { display: contents; }
.pci .invo-split > .pci-form > * { grid-column: 2; }
.pci .invo-split > .pci-form > .pci-lines, .pci .invo-split > .pci-form > .pci-actions, .pci .invo-split > .pci-form > .pci-reason, .pci .invo-split > .pci-form > .pci-return { grid-column: 1 / -1; }
.pci-pdf { position: static; grid-column: 1; grid-row: 1 / span 6; align-self: start; }  /* 固定表示にすると、明細の表に重なって見切れるため、固定しない */
.pci-lines { min-width: 0; }  /* fieldsetは既定で中身の幅まで広がるため、明細の表が編集欄からはみ出さないよう、表は.table-wrapの中で横にスクロールさせる */
.pci-lines .invo-table { min-width: 860px; }
.pci-lines input, .pci-lines select { width: 100%; box-sizing: border-box; }
.pci-lines .c-date { min-width: 9.5em; } .pci-lines .c-item { min-width: 16em; } .pci-lines .c-tax_class { min-width: 6.5em; }
.pci-form input.num, .pci-lines input.num { text-align: right; font-variant-numeric: tabular-nums; }
.pci-lines .c-quantity, .pci-lines .c-unit_price, .pci-lines .c-amount { min-width: 7em; } .pci-lines .c-unit { min-width: 4.5em; }
.pci-lines .c-account { min-width: 11em; white-space: nowrap; }
.pci-pdf iframe { width: 100%; height: calc(100vh - 140px); min-height: 480px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pci-form .invo-group { margin: 0 0 12px; }
.pci-form .invo-field { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 6px; align-items: center; margin: 3px 0; }
.pci-form .invo-field label { margin: 0; font-size: 12px; }
.pci-val { overflow-wrap: anywhere; }
.pci-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pci-reason { display: block; margin-top: 12px; }
.pci-reason textarea, .pci-return textarea { width: 100%; }
.pci-return { margin: 8px 0; }
.pci-history { margin: 8px 0 12px; }
.pci-history ul { margin: 4px 0; padding-left: 20px; font-size: 13px; }
.pci tr.note td { color: var(--muted); }
@media (max-width: 900px) { .pci .invo-split { grid-template-columns: 1fr; } .pci .invo-split > .pci-form > * { grid-column: 1; } .pci-pdf { position: static; grid-row: auto; } .pci-pdf iframe { height: 60vh; } .pci-form .invo-field { grid-template-columns: 1fr; } }
.pci-month { display: flex; flex-direction: column; justify-content: center; min-width: 11em; }
.pci-month strong { font-size: 18px; }
/* 設定 → 請求書台帳 */
.ivl-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin: 10px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.ivl-form h3 { grid-column: 1 / -1; margin: 0; }
.ivl-form label { margin: 0; }
.ivl-form .pci-actions { grid-column: 1 / -1; margin: 4px 0 0; }
.ivl-form .ivl-bank { grid-column: 1 / -1; margin: 14px 0 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 14px; }
.ivl-form .ivl-bank legend { padding: 0 6px; }
.ivl-import { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0 12px; }
.ivl-overwrite { flex: 1 1 100%; margin: 0; padding: 8px 12px; }
.ivl-overwrite label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 6px 0; font-weight: 500; }
.ivl-overwrite input[type=checkbox] { width: 18px; min-width: 18px; padding: 0; }
.ivl-plan { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.ivl-plan ul { margin: 6px 0; padding-left: 20px; }
.ivl .error { color: var(--red); }
.pci-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.pci-csv { align-self: center; margin-left: auto; }
.pci-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.pci-stats > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.pci-stats strong { display: block; font-size: 15px; }
.pci-monthly tr.pci-group td { font-weight: 600; background: color-mix(in srgb, var(--green) 6%, transparent); }
.pci-monthly tr.pci-group td small { font-weight: 400; }
.pci-monthly tr.pci-item td { font-size: 13px; }
/* 支払予定タブ：列の幅を固定して、入力欄を潰さず、右端のボタンまで画面に収める（狭いときは横にスクロール） */
.ivp-table{table-layout:fixed;width:100%;min-width:1000px}
.ivp-table th,.ivp-table td{padding:.5em .4em}
.ivp-table td:nth-child(12) small{white-space:normal}
.ivp-table th:nth-child(1){width:2.5em}.ivp-table th:nth-child(2){width:7.5em}.ivp-table th:nth-child(3){width:4.5em}.ivp-table th:nth-child(4){width:22em}.ivp-table th:nth-child(5){width:7em}  /* 先頭はチェック欄 */
.ivp-table th:nth-child(6),.ivp-table th:nth-child(7),.ivp-table th:nth-child(9),.ivp-table th:nth-child(10),.ivp-table th:nth-child(11){width:7.5em}.ivp-table th:nth-child(8){width:11em}
.ivp-table th:nth-child(12){width:10em}.ivp-table th:nth-child(13){width:9em}
.ivp-table td,.ivp-table th{overflow-wrap:anywhere}
.ivp-table .num{white-space:nowrap}
.ivp-table td.ivp-adv{white-space:normal}
.ivp-table td.ivp-adv button{height:auto;white-space:normal;line-height:1.3;padding:.15em .5em;max-width:100%}
.ivp-table input.ivp-input{width:100%;min-width:0;text-align:right;box-sizing:border-box}
/* 一覧性優先：行の余白・ボタン・入力欄を細くして1画面に多く出す */
.ivp-table{font-size:13px;line-height:1.25}
.ivp-table th,.ivp-table td{padding:.15em .35em;vertical-align:middle}
.ivp-table th{font-size:12px}
.ivp-table button{padding:0 .6em;min-height:0;height:1.2em;font-size:12px;line-height:1.2;border-radius:6px}
.ivp-table input.ivp-input{padding:0 .4em;min-height:0;height:1.2em;font-size:13px;line-height:1.2;border-radius:6px}
.ivp-table .invo-tag{padding:0 .4em;font-size:11px;line-height:1.5}
.ivp-table td small{font-size:11px}
.pci-top .pci-actions { margin: 0 0 12px; }
/* 詳細画面：PC版の「確認・編集」と同じ構造（表示範囲の調整・左右の仕切り・タブ・操作の帯） */
.pci .layout-controls { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 0 0 14px; }
.pci .layout-controls summary { font-weight: 600; cursor: pointer; }
.pci .layout-controls .help { margin: 8px 0 0; }
.pci .layout-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; margin-top: 10px; }
.pci .layout-options label { display: grid; gap: 4px; margin: 0; }
.pci .layout-options .actions { display: flex; gap: 8px; }
.pci .review { display: grid; grid-template-columns: minmax(0, var(--pdf-share, 48fr)) 14px minmax(0, var(--editor-share, 52fr)); gap: 8px; align-items: start; }
.pci .review[data-layout=stack] { grid-template-columns: minmax(0, 1fr); }
.pci .review[data-layout=stack] .splitter { display: none; }
.pci .review .pcr-pdf { display: block; width: 100%; height: var(--pdf-height, 650px); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pci .review .pdf-card { padding: 12px; }
.pci .review .pdf-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pci .review-editor { min-width: 0; container-type: inline-size; }
.pci .splitter { cursor: col-resize; touch-action: none; border-radius: 8px; background: var(--line); display: flex; justify-content: center; align-items: flex-start; min-height: 200px; align-self: stretch; }
.pci .splitter span { position: sticky; top: 45vh; font-size: 24px; }
.pci .splitter:hover, .pci .splitter:focus-visible { background: rgba(200, 170, 90, .45); outline: none; }
.pci .pcr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.pci .pcr-tabs button[aria-pressed=true] { border-color: var(--brass, #c8aa5a); background: rgba(200, 170, 90, .2); }
.pci .pcr-panel[hidden] { display: none; }
.pci .invoice-info { display: grid; gap: 5px; }
.pci .invoice-info .field, .pci .pcr-form .formgrid .field { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px; align-items: center; min-width: 0; }
.pci .invoice-info label, .pci .pcr-form .formgrid label { margin: 0; line-height: 1.3; font-size: 12px; }
.pci .invoice-info input, .pci .invoice-info select, .pci .pcr-form .formgrid input, .pci .pcr-form .formgrid select { min-height: 30px; padding: 3px 7px; font-size: 15px; }
.pci .invoice-vendor, .pci .invoice-project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.pci .invoice-vendor .field:last-child, .pci .invoice-project .field:last-child { grid-template-columns: 45px minmax(0, 1fr); }
.pci .invoice-dates, .pci .invoice-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.pci .invoice-money { row-gap: 4px; }
.pci .invoice-money input { max-width: 200px; }
.pci .pcr-form .formgrid { display: grid; gap: 3px; }
.pci .pcr-bar { position: sticky; bottom: 0; margin-top: 12px; padding: 8px 0 2px; background: linear-gradient(180deg, rgba(4, 20, 14, 0), rgba(4, 20, 14, .9) 25%); }
.pci .pcr-bar .pci-actions { margin: 6px 0; }
@container (max-width: 650px) { .pci .invoice-info .field { grid-template-columns: 75px minmax(0, 1fr); } .pci .invoice-vendor, .pci .invoice-project { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 8px; } .pci .invoice-vendor .field:last-child, .pci .invoice-project .field:last-child { grid-template-columns: 40px minmax(0, 1fr); } }
@container (max-width: 480px) { .pci .invoice-vendor, .pci .invoice-project, .pci .invoice-dates, .pci .invoice-money { grid-template-columns: minmax(0, 1fr); } .pci .invoice-money .money-spacer { display: none; } }
@media (max-width: 1200px) { .pci .review[data-layout=auto] { grid-template-columns: minmax(0, 1fr); } .pci .review[data-layout=auto] .splitter { display: none; } }
@media (max-width: 700px) { .pci .layout-options { grid-template-columns: 1fr; } }
.pci .intro-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; } .pci .intro-actions select { flex: 0 1 560px; min-width: 260px; }
.pci .pcr-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; } .pci .pcr-pages button { font-size: 12px; padding: 4px 10px; }
.pcl { margin: 10px 0; }
.pcl-box { padding: 8px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.7; }
.pcl-warn { color: var(--amber, #9a6a1f); font-size: 13px; line-height: 1.7; margin: 4px 0; }
ul.pcl-warn { padding-left: 20px; margin: 4px 0 0; }
.pcl button.small { margin-left: 8px; }
select[data-pcl-account] { min-width: 12em; max-width: 22em; }
select[data-pcl-account] + [data-pcl-sub] { display: block; box-sizing: border-box; width: 100%; max-width: 22em; margin-top: .3em; text-align: left; }
[data-pcl-sub][hidden] { display: none; }
.pci-head-tabs { display: flex; align-items: center; }
.pci-head-tabs .pci-tabs { margin: 0; }
.pci-filter .pci-note { flex: 1 1 18em; align-self: center; min-width: 14em; }
.pci-monthly tr.pci-returned td, tr.pci-returned td { box-shadow: inset 0 2px 0 var(--accent, #b08d3c), inset 0 -2px 0 var(--accent, #b08d3c); background: rgba(176,141,60,.15); }

.eyebrow:empty { display: none; }
.pci .pcr-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 10px; }
.pci .pcr-headline h2 { margin: 0; }

.ivp-table td.ivp-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}
.ivp-table tr.ivp-lines-row td{padding:.3em .35em .6em}
.ivp-table tr.ivp-lines-row fieldset.pci-lines{margin:0}
.ivp-table tr.ivp-lines-row .invo-table{table-layout:auto;min-width:0;width:100%}
.ivp-table tr.ivp-lines-row .invo-table td,.ivp-table tr.ivp-lines-row .invo-table th{white-space:normal}
.ivp-table tr.ivp-lines-row .invo-table th,.ivp-table tr.ivp-lines-row .invo-table td{width:auto}

/* 明細（確認・訂正画面）：列の幅を広げ（単価・金額は億まで）、行の高さ・余白を詰めて多くの行を出す。表は縦横にスクロールし、横のスクロールバーは常に表の下に見える */
.pci .pcr-panel .pci-lines { margin: 0; padding: 4px 8px 6px; }
.pci .pcr-panel .pci-lines .table-wrap { overflow: auto; max-height: calc(100vh - 380px); min-height: 220px; }
.pci .pcr-panel .pci-lines .invo-table { table-layout: fixed; width: 1206px; min-width: 0; border-collapse: separate; border-spacing: 0; }
.pci .pcr-panel .pci-lines .invo-table th { position: sticky; top: 0; z-index: 1; background: #123325; padding: 4px 6px; white-space: nowrap; }
.pci .pcr-panel .pci-lines .invo-table td { padding: 2px 4px; vertical-align: middle; }
.pci .pcr-panel .pci-lines input, .pci .pcr-panel .pci-lines select { min-height: 28px; height: 28px; padding: 1px 6px; font-size: 14px; }
/* 列の幅（合計1206px。単価・金額は 999,999,999 まで切れずに入る） */
.pci .pcr-panel .pci-lines .c-date { width: 130px; min-width: 0; } .pci .pcr-panel .pci-lines .c-item { width: 240px; min-width: 0; } .pci .pcr-panel .pci-lines .c-tax_class { width: 100px; min-width: 0; }
.pci .pcr-panel .pci-lines .c-quantity { width: 76px; min-width: 0; } .pci .pcr-panel .pci-lines .c-unit { width: 80px; min-width: 0; }
.pci .pcr-panel .pci-lines .c-unit_price, .pci .pcr-panel .pci-lines .c-amount { width: 120px; min-width: 0; }
.pci .pcr-panel .pci-lines .c-account { width: 190px; min-width: 0; }
.pci .pcr-panel .pci-lines .c-ops { width: 150px; white-space: nowrap; }
.pci .pcr-panel .pci-lines .c-ops .checkline { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 0 0; font-size: 12px; white-space: nowrap; }
.pci .pcr-panel .pci-lines .c-ops .checkline input { width: 16px; min-width: 16px; height: 16px; min-height: 16px; margin: 0; }
.pci .pcr-panel .pci-lines .c-ops button { padding: 2px 10px; min-height: 28px; font-size: 12px; }
/* 横・縦のスクロールバーは常に見える太さで出す（細い自動表示だと見失うため） */
.pci .pcr-panel .pci-lines .table-wrap::-webkit-scrollbar { width: 14px; height: 14px; }
.pci .pcr-panel .pci-lines .table-wrap::-webkit-scrollbar-track { background: #0b1f16; }
.pci .pcr-panel .pci-lines .table-wrap::-webkit-scrollbar-thumb { background: #b9a15a; border-radius: 7px; border: 2px solid #0b1f16; }
/* 立替金タブ：支払予定と同じ表（取引先の行＋開いた立替の行）。金額の列は右揃えで、取引先の行と立替の行で同じ位置に並べる */
.ivp-adv-table{table-layout:fixed;width:100%;min-width:1000px;font-size:13px;line-height:1.3}
.ivp-adv-table th,.ivp-adv-table td{padding:.3em .4em;vertical-align:middle;overflow-wrap:anywhere}
.ivp-adv-table th{font-size:12px}
.ivp-adv-table th:nth-child(1){width:8em}.ivp-adv-table th:nth-child(2){width:17em}
.ivp-adv-table th:nth-child(4),.ivp-adv-table th:nth-child(5),.ivp-adv-table th:nth-child(6){width:8.5em}
.ivp-adv-table th:nth-child(7){width:6.5em}.ivp-adv-table th:nth-child(8){width:9.5em}
.ivp-adv-table .num{white-space:nowrap;text-align:right}
.ivp-adv-table td.ivp-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}
.ivp-adv-table button{padding:.15em .7em;min-height:0;height:auto;font-size:12px;line-height:1.3;border-radius:6px;white-space:nowrap}
.ivp-adv-table .invo-tag{padding:0 .4em;font-size:11px;line-height:1.5}
/* 支払予定表：表示は22行分の高さにして、それより多いときは縦にスクロールする（見出しは固定） */
.pci .table-wrap:has(> .ivp-table){--ivp-row:24px;--ivp-head:28px;max-height:calc(var(--ivp-head) + 22 * var(--ivp-row));overflow:auto}
.ivp-table tbody tr{height:var(--ivp-row,24px)}
.pci .table-wrap:has(> .ivp-table) .ivp-table thead th{position:sticky;top:0;z-index:2;height:var(--ivp-head,28px);background:var(--theme-surface,var(--white,#fff))}
/* 原本PDFの表示部品（pc-invoice-pdf.js。スマホ・タブレットとPDF表示機能のない端末） */
.pci .review .pcr-viewer{display:flex;flex-direction:column;overflow:hidden;background:var(--theme-surface,#fff)}
.pcrv-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px;border-bottom:1px solid var(--line)}
.pcrv-bar button{min-width:40px;min-height:36px}
.pcrv-zoom{display:inline-flex;align-items:center;gap:6px;margin-left:auto}
.pcrv-zoom output{min-width:3.5em;text-align:center}
.pcrv-scroll{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;background:#e9ecef}
.pcrv-pages{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:8px;width:max-content;min-width:100%;box-sizing:border-box}
.pcrv-page-box{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);margin:0 auto}
.pcrv-page-box canvas{display:block;width:100%;height:100%}
.pcrv-status{padding:16px}
/* 請求書取込・確認編集：PC版（desktop/invoice-browser/static/app.css）と同じ見た目。.pcx の中だけに効かせる（2026-10-23） */
.pcx .actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pcx .help{color:var(--muted);font-size:12px}
.pcx .empty{padding:35px;text-align:center;color:var(--muted)}
.pcx .danger-btn{color:var(--red);border-color:var(--red)}.pcx .danger-btn:disabled{color:inherit;border-color:inherit}
.pcx .import-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 8px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel,rgba(8,30,22,.55))}
.pcx .import-bar h1{font-size:18px;margin:0 6px 0 0;line-height:1.2;white-space:nowrap}
.pcx .import-bar input[type=file]{flex:0 1 260px;min-width:160px;padding:3px 6px;font-size:12px}
.pcx .import-bar button{padding:5px 12px;font-size:13px;min-height:0;white-space:nowrap}
.pcx .import-bar .import-live{display:flex;align-items:center;gap:6px;border:0;padding:0;margin:0;min-width:0;flex:0 1 auto;font-size:12px}
.pcx .import-bar .import-live .live-message{font-size:12px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px}
.pcx .import-bar .import-search{flex:1 1 220px;min-width:160px;margin:0;padding:5px 10px;font-size:13px}
.pcx .import-info{position:relative;flex:0 0 auto}
.pcx .import-info>summary{list-style:none;cursor:pointer;width:24px;height:24px;border-radius:50%;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:13px;font-style:italic}
.pcx .import-info>summary::-webkit-details-marker{display:none}
.pcx .import-info-body{position:absolute;right:0;top:30px;z-index:20;width:min(520px,80vw);padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel-solid,#10281f);font-size:12px;line-height:1.6;box-shadow:0 6px 24px rgba(0,0,0,.45)}
.pcx .import-info-body p{margin:0 0 6px}
.pcx .import-status{padding:6px 10px}
.pcx .import-status>.actions{margin:0 0 4px;gap:8px;width:100%}
.pcx .import-status>.actions #bulk-purge{margin-left:auto}
.pcx .import-status .tablewrap{max-height:none;overflow:auto}
.pcx .import-status table{table-layout:fixed;width:100%}
.pcx .import-status table th{padding:3px 8px;font-size:13px}
.pcx .import-status table td{padding:2px 8px;font-size:13px;line-height:1.25;vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
.pcx .import-status table td:first-child{white-space:nowrap}
.pcx .import-status table td:last-child{overflow:visible}
.pcx .import-status table td .help{display:inline;margin:0 0 0 6px;font-size:11px;white-space:nowrap}
.pcx .import-status table td p{margin:0}
.pcx .import-status button{padding:0 9px;font-size:12px;min-height:22px;line-height:1.3}
.pcx .import-status table td .actions{gap:4px;flex-wrap:nowrap}
.pcx .import-status table td .pill,.pcx .import-status table td .invo-tag{padding:0 7px;font-size:12px}
.pcx .import-status table th:nth-child(1){width:7%}.pcx .import-status table th:nth-child(2){width:18%}.pcx .import-status table th:nth-child(3){width:8%}.pcx .import-status table th:nth-child(4){width:9%}.pcx .import-status table th:nth-child(5){width:9%}.pcx .import-status table th:nth-child(6){width:15%}
.pcx .import-status .blank-mark{display:inline-block;padding:0 7px;border-radius:5px;border:1px solid #d9a441;background:rgba(217,164,65,.22);color:#ffd98a;font-size:11px;font-weight:700;line-height:1.5}
.pcx .import-status .import-group td{background:rgba(120,170,130,.16);font-weight:500;border-top:1px solid var(--line)}
.pcx .import-status .import-group td .help{font-weight:400}
.pcx .sub-page td{color:var(--muted);font-size:13px}.pcx .sub-page td:first-child{padding-left:18px}
.pcx .code{font-variant-numeric:tabular-nums}
/* 確認・編集 */
.pcx .review-bar{position:relative}
.pcx .review-bar select{padding:4px 8px;font-size:13px;min-height:0;max-width:340px;flex:0 1 300px}
.pcx .review-bar select#pcr-page-select{flex:0 1 230px}
.pcx .review-bar .rb-label{font-size:12px;color:var(--muted);white-space:nowrap;margin:0}
.pcx .review-bar .rb-spacer{flex:1 1 0}
.pcx .review-bar details.layout-pop{position:relative;border:0;padding:0;margin:0;background:none}
.pcx .review-bar details.layout-pop>summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:5px 12px;font-size:13px;font-weight:400;white-space:nowrap}
.pcx .review-bar details.layout-pop>summary::-webkit-details-marker{display:none}
.pcx .review-bar .pop{position:absolute;right:0;top:calc(100% + 6px);z-index:30;width:min(560px,80vw);padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:rgba(6,24,17,.97);box-shadow:0 12px 30px rgba(0,0,0,.45)}
.pcx .review-bar .layout-options{display:grid;grid-template-columns:1fr;gap:10px}
.pcx .review-bar .layout-options label{display:grid;grid-template-columns:110px 1fr auto;align-items:center;gap:8px;font-size:13px;margin:0}
.pcx .review-bar .layout-options label select{grid-column:2/4;max-width:none;flex:none}
.pcx .review-bar .layout-options output{float:none}
.pcx .review-bar .layout-options input[type=range]{padding:0;border:0;min-height:28px}
.pcx .review-bar .pop .help{margin:8px 0 0;font-size:12px}
.pcx .review{display:grid;align-items:start}
.pcx .review[data-layout]{grid-template-columns:minmax(0,var(--pdf-share,48fr)) 14px minmax(0,var(--editor-share,52fr));gap:8px}
.pcx .review[data-layout=stack]{grid-template-columns:minmax(0,1fr)}.pcx .review[data-layout=stack] .splitter{display:none}.pcx .review[data-layout=stack] .pdf-card{position:static}
@media(max-width:1200px){.pcx .review[data-layout=auto]{grid-template-columns:minmax(0,1fr)}.pcx .review[data-layout=auto] .splitter{display:none}.pcx .review[data-layout=auto] .pdf-card{position:static}}
.pcx .pdf-card{padding:8px 10px;overflow:hidden;position:sticky;top:16px;margin:0}
.pcx .review .pdf-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;margin-bottom:6px;padding:0;border:0}
.pcx .review .pdf-toolbar>strong{white-space:nowrap;font-size:14px}
.pcx .review .pdf-toolbar>strong .badge{display:none}
.pcx .review .pdf-toolbar .actions{gap:6px;flex-wrap:nowrap;margin:0}
.pcx .review .pdf-toolbar .actions:last-child{margin-left:auto}
.pcx .review .pdf-toolbar button,.pcx .review .pdf-toolbar select{padding:4px 10px;font-size:13px;min-height:0;height:30px;white-space:nowrap}
.pcx .review .pdf-toolbar select{padding:2px 8px}
.pcx .review .pdf-toolbar [data-pcr-page].active{border-color:var(--green);background:var(--leaf);color:var(--green)}
.pcx .review .pdf-card>.help{display:none;padding:10px 0 0;margin:0}
.pcx .review[data-layout=stack] .pdf-card>.help{display:block}
.pcx .review .pcr-viewer{height:var(--pdf-height,650px);min-height:0}
@media(pointer:fine){.pcx .review .pcr-viewer .pcrv-bar{display:none}}  /* マウスの端末はPC版と同じ帯の −／＋ を使う。タッチの端末は表示部品の帯を残す */
.pcx .splitter{cursor:col-resize;touch-action:none;border-radius:8px;background:var(--line);display:flex;justify-content:center;align-items:flex-start;min-height:200px}
.pcx .splitter span{position:sticky;top:45vh;font-size:24px;color:var(--green)}
.pcx .review-editor{min-width:0;container-type:inline-size}
.pcx .review-card{padding:20px;margin:0}
.pcx .review-editor .review-card>.actions{gap:6px 8px;margin-bottom:4px}
.pcx .review-editor .review-card>.actions select,.pcx .review-editor .review-card>.actions button{padding:3px 10px;font-size:13px;min-height:0;height:30px}
.pcx .review-editor .review-card>.actions .help{font-size:12px}
.pcx .rotate-tools{display:inline-flex;gap:0}
.pcx .tabs{display:flex;gap:6px;margin:6px 0 10px;border-bottom:1px solid var(--line);padding-bottom:7px;flex-wrap:wrap}
.pcx .tabs button{flex:1 1 110px;font-size:12px;padding:4px 7px;min-height:34px}
.pcx .tabs button.active{border-color:var(--green);background:var(--leaf);color:var(--green)}
@container(min-width:600px){.pcx .review-editor .tabs{flex-wrap:nowrap}.pcx .review-editor .tabs button{flex:1 1 auto;min-width:0;padding:5px 6px;white-space:nowrap}}
.pcx .review-editor .formgrid{display:grid;grid-template-columns:minmax(0,1fr);gap:3px}
.pcx .review-editor .formgrid .field{display:grid;grid-template-columns:105px minmax(0,1fr);align-items:center;gap:7px;grid-column:auto}
.pcx .review-editor .formgrid .field label{margin:0;line-height:1.3}
.pcx .review-editor .formgrid input,.pcx .review-editor .formgrid select{padding:3px 7px;min-height:30px;font-size:15px}
.pcx .savebar{position:sticky;bottom:12px;background:var(--white);border:1px solid var(--line);padding:9px;border-radius:12px;box-shadow:0 6px 24px #0004;z-index:2;margin-top:10px}
.pcx .savebar .actions{justify-content:space-between}
.pcx .savebar button{padding:6px 12px;min-height:36px}
.pcx .savebar .help{margin:6px 0 0}
.pcx .savebar .pcr-state.dirty{color:#f0c36a;font-weight:600}
.pcx .pcr-subbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;margin:0 0 10px}
.pcx .pcr-subbar .pci-reason{flex:1 1 260px;margin:0;font-size:12px}
.pcx .pcr-subbar .pci-actions{margin:0}
.pcx .pcr-panel .pci-lines .table-wrap{min-height:160px}  /* 下に固定の保存の帯があるため、明細の表の最小の高さを少し下げる */

/* 支払予定：表示のボタンとまとめて操作のボタンを1行に並べ、説明は1行にまとめる（表を画面に収めるため） */
.pci .ivp-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:6px 0}
.pci .ivp-bar p{margin:0;display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
.pci .ivp-bar .pci-bulk .caption{display:none}
.pci .ivp-note{margin:0 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
/* 台帳から検索（PC版の確認・編集と同じ） */
.pcx .ledger-search{margin:10px 0}.pcx .ledger-search input{display:block;width:100%;max-width:420px;margin:4px 0}.pcx .ledger-search button{min-height:28px;padding:2px 8px;margin:2px 2px 2px 0}

/* 科目一覧：文字の大きさを保ち、余白を詰めて多くの行を表示する。 */
.ivl .ivl-accounts-table th, .ivl .ivl-accounts-table td { padding: 5px 12px; }
.ivl .ivl-accounts-table button { min-height: 28px; padding: 3px 12px; }
@media (max-width: 700px) {
 .ivl .ivl-accounts-table button { min-height: 40px; }
}
