/* 計算機 */
.tool { display: flex; flex-direction: column; gap: 20px; }

.notice { margin: 0; text-align: center; color: var(--pen); font-weight: 500; }

/* 發票範例圖：手機上維持紙本比例，左右滑動 */
.pen { color: var(--pen); font-weight: 500; font-variant-numeric: tabular-nums; }
.paper-scroll { overflow-x: auto; }
.paper {
  min-width: 720px; background: var(--paper); color: var(--print); font-family: var(--print-font);
  border: 2px solid var(--accent); border-radius: 8px; padding: 22px 26px 16px;
}
.p-title { text-align: center; }
.p-title h3 { margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: .35em; }
.p-period { margin: 2px 0 0; font-size: .9375rem; font-weight: 600; }
.p-line { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.p-line.between { justify-content: space-between; }
.p-label { white-space: nowrap; font-weight: 600; letter-spacing: .05em; }
.p-value { font-family: var(--font); font-size: 1.0625rem; }
.p-date { margin: 0; white-space: nowrap; font-weight: 600; }
.p-date .pen { font-family: var(--font); margin-inline: 2px; }
.p-ubn { display: inline-flex; align-items: center; gap: 4px; }
.ubn-boxes { display: inline-grid; grid-template-columns: repeat(8, 1.9rem); border: 1px solid var(--rule); height: 2rem; }
.ubn-box { display: grid; place-items: center; border-left: 1px solid var(--rule); font-family: var(--font); font-size: 1.0625rem; }
.ubn-box:first-child { border-left: 0; }
.ubn-box.wide { grid-column: span 2; }
/* 可省略的欄位：一條橫線劃過，右上角標「可省略」 */
.omit { position: relative; display: flex; align-items: baseline; gap: 6px; }
.p-line.omit { justify-content: space-between; }
span.omit { flex: 0 1 22rem; justify-content: space-between; }
.omit::after { content: ""; position: absolute; left: 0; right: 0; top: 55%; height: 3px; background: var(--omit); opacity: .85; }
.omit-tag { font-family: var(--font); color: var(--omit); font-weight: 700; font-size: .9375rem; transform: translateY(-.55em); }

.items { width: 100%; border-collapse: collapse; margin-top: 10px; border: 1.5px solid var(--rule); table-layout: fixed; }
.items .w-name { width: 27%; } .items .w-num { width: 10%; } .items .w-amt { width: 20%; } .items .w-note { width: 33%; }
.items th, .items td { border: 1px solid var(--rule); padding: 0 6px; height: var(--rowh); }
.items th { font-weight: 600; }
.items .spread { text-align: center; letter-spacing: 1.4em; text-indent: 1.4em; white-space: nowrap; }
.items .spread.wide { letter-spacing: 2.2em; text-indent: 2.2em; }
.items .spread.tight { letter-spacing: .6em; text-indent: .6em; }
.items .c-num { text-align: right; }
.items .c-amt { text-align: right; font-size: 1.0625rem; }
.items .c-amt.total { font-weight: 700; font-size: 1.1875rem; }
.items td.pen, .items .hint-cell { font-family: var(--font); }
.hint-cell { font-size: 1.0625rem; }
/* 沒用到的金額欄：一條連續的斜線 */
.items td.c-amt.void { position: relative; padding: 0; }
.void-line { position: absolute; left: 0; top: 0; width: 100%; overflow: visible; pointer-events: none; }
.void-line line { stroke: var(--rule); stroke-width: 1.5; }
.stamp { vertical-align: top; text-align: center; background: var(--stamp); padding-top: 6px !important; }
.stamp-label { display: block; font-weight: 600; font-size: .9375rem; letter-spacing: .08em; }
.stamp-hint { display: block; margin-top: 18%; font-family: var(--font); font-size: 2rem; line-height: 1.6; font-weight: 700; color: var(--pen); }
.items td.flush { padding: 0; }
.tax-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.tg-h { font-size: .75rem; text-align: center; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); padding: 1px 0; }
.tg-h:first-child { border-left: 0; }
.tax-grid .tick { border-left: 1px solid var(--rule); }
.tax-grid .tick:nth-of-type(1) { border-left: 0; }
.tick { min-height: 30px; display: grid; place-items: center; }
.tick-mark { font-family: var(--font); font-size: 1.125rem; font-weight: 700; }
.up-cells { display: flex; align-items: center; padding-inline: 2px; }
.up-label { flex: 0 0 auto; font-size: .75rem; line-height: 1.25; font-weight: 600; padding-right: 8px; }
.up-cell { flex: 1; display: inline-flex; justify-content: flex-end; align-items: baseline; gap: 1px; padding-right: 4px; }
.up-digit { font-family: var(--font); font-size: 1.1875rem; font-weight: 700; min-width: 1.2em; text-align: center; }
.up-unit { font-weight: 600; }
.kind-row { display: flex; align-items: stretch; height: var(--rowh); }
.kind-cell { flex: 1; display: grid; grid-template-columns: 1fr 2.6rem; border-left: 1px solid var(--rule); }
.kind-cell:first-child { border-left: 0; }
.kind-name { display: grid; place-items: center; font-weight: 600; }
.kind-cell .tick { border-left: 1px solid var(--rule); }
.p-foot { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 0; font-size: .75rem; }
.p-copy { letter-spacing: .4em; white-space: nowrap; }




/* 公司名稱候選清單 */
.suggest-host { position: relative; }
.suggest {
  position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none;
  background: var(--panel); border: 2px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 24px rgba(14, 22, 35, .12);
}
.suggest button {
  width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; min-height: 44px;
  font: inherit; text-align: left; color: var(--ink); background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.suggest button:hover, .suggest button:focus-visible { background: var(--accent-soft); outline: none; }
.suggest-no { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
