/* 税務調査質問管理 v2: 2021/2–2026/1 / 税込主体 / 高密度一覧 / 詳細は側面に分離 */
.taxq{color:var(--text);background:var(--bg);max-width:1740px;margin:auto;padding:10px 14px;box-sizing:border-box;font-family:"Noto Sans JP",system-ui,sans-serif}
.taxq *{box-sizing:border-box}.taxq [hidden]{display:none!important}
.tq-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 9px;padding:0 2px}
.tq-header h1{font-size:19px;line-height:1.3;letter-spacing:-.02em;margin:0;font-weight:700}
.tq-header-sub{font-size:14px;color:#4b5563;font-weight:500;margin-left:8px}
.tq-header p{color:var(--text-muted);font-size:11px;margin:3px 0 0;white-space:nowrap}
.tq-header p strong{color:#243b54;font-weight:700;font-variant-numeric:tabular-nums}
.tq-divider{margin:0 5px;color:#cbd5e1}.tq-back{text-decoration:none;font-size:11px;border:1px solid var(--border);background:#fff;color:#4b5563;padding:6px 9px;border-radius:5px;white-space:nowrap}
.tq-layout{display:grid;grid-template-columns:198px minmax(0,1fr);gap:9px;align-items:start}
.tq-nav{background:var(--panel-bg);border:1px solid var(--border);border-radius:7px;max-height:calc(100dvh - 130px);overflow:auto;padding:5px;position:sticky;top:9px}
.tq-nav button{font:inherit;font-size:11px;color:#374151;display:flex;align-items:center;gap:7px;border:0;border-radius:4px;background:transparent;cursor:pointer;min-height:33px;width:100%;padding:5px 7px;text-align:left}
.tq-nav button:hover{background:#f3f6fa}.tq-nav button[aria-current="true"]{background:#e8f1fc;color:#123f6a;font-weight:700}
.tq-qno{flex:none;width:22px;font-size:11px;color:#9ca3af;font-variant-numeric:tabular-nums}
.tq-nav button[aria-current="true"] .tq-qno{color:#1d5fa7}
.tq-qname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.tq-nav .tq-qstate{font-size:9px;white-space:nowrap;color:#64748b}
.tq-nav .tq-qstate.done{color:#137348}
.tq-main{min-width:0;background:var(--panel-bg);border:1px solid var(--border);border-radius:7px;padding:9px 11px 8px}
.tq-question-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:43px}
.tq-question-title{min-width:0;flex:1}
.tq-question-head h2{font-size:15px;font-weight:700;margin:0;letter-spacing:-.01em}
.tq-question-head select{font:inherit;font-size:11px;max-width:110px;min-width:96px;padding:5px;border-radius:5px;border:1px solid #cbd5e1;background:#f8fafc;color:#374151}
.tq-question-note{margin:5px 0 8px;display:flex;align-items:center;gap:7px;min-width:0}
.tq-question-note label{white-space:nowrap;font-weight:700;font-size:10px;color:#657384}
.tq-question-note textarea{flex:1;font:inherit;font-size:11.5px;border:1px solid #d6dfe9;border-radius:4px;padding:5px 7px;min-height:30px;height:31px;max-height:125px;resize:vertical;line-height:1.5;color:#27354a;background:#fff}
.tq-save-state{font-size:10px;color:#64748b;min-width:38px;white-space:nowrap}
.tq-filter-bar{display:flex;gap:7px;align-items:end;flex-wrap:wrap;border-top:1px solid #edf0f4;padding:8px 0 6px}
.tq-filter-bar label{display:flex;flex-direction:column;gap:3px;color:#667386;font-size:10px;line-height:1.1;font-weight:500}
.tq-filter-bar select,.tq-filter-bar input{font:inherit;font-size:12px;height:32px;border-radius:5px;border:1px solid #ccd6e0;padding:5px 7px;line-height:normal;color:#202c3b;background:#fff}
.tq-filter-year select{width:151px}.tq-filter-mode select{width:156px}
.tq-filter-search{flex:1;min-width:155px}.tq-filter-search input{width:100%;min-width:0}
#tq-reload{height:32px;width:34px;border:1px solid #cbd5df;background:#fff;border-radius:5px;font-size:18px;cursor:pointer;color:#334155;line-height:20px}
.tq-result-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 1px 7px}
.tq-result-count{font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums}
.tq-gross-label{font-size:10px;color:#64748b}.tq-gross-label strong{color:#0f559b;font-weight:700}
.tq-list-head,.taxq .tq-line{display:grid;grid-template-columns:85px minmax(180px,1.8fr) 110px minmax(95px,.75fr) 102px;align-items:center;column-gap:8px}
.tq-list-head{position:sticky;top:0;z-index:2;background:#eef2f6;color:#59687a;font-size:10.5px;font-weight:700;border-top:1px solid #e2e8f0;border-bottom:1px solid #dce3eb;min-height:29px;padding:0 9px}
.tq-list-head span:last-child{text-align:right}
.tq-lines{border:1px solid #e3e9ef;border-top:0;max-height:calc(100dvh - 380px);min-height:300px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;background:#fff}
.taxq .tq-line{font:inherit;cursor:pointer;width:100%;text-align:left;background:#fff;color:inherit;border:0;border-radius:0;justify-content:normal;border-bottom:1px solid #edf0f3;min-height:49px;padding:6px 9px}
.taxq .tq-line:hover{background:#f8fbff}.taxq .tq-line.selected{background:#eaf4ff}
.taxq .tq-line:focus-visible{outline:2px solid #2178c7;outline-offset:-2px}
.tq-line-date{color:#536275;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.tq-line-title{font-size:12px;font-weight:650;line-height:1.35;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tq-line-preview{display:block;font-size:10px;color:#67798a;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}
.tq-line-account{font-size:10.5px;color:#516173;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tq-line-proof{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.tq-proof{font-size:10px;color:#5d6b7d;background:#f1f4f7;border-radius:3px;padding:2px 4px;white-space:nowrap}
.tq-proof.yes{color:#17603e;background:#e9f5ed}
.tq-proof.neutral{color:#596b7f;background:#f0f3f6}
.tq-proof.sched{color:#1f4f8f;background:#e8f0fb;max-width:132px;overflow:hidden;text-overflow:ellipsis}
.tq-sched-current{margin:0 0 6px;font-size:12px;line-height:1.5}
.tq-sched-auto{margin-left:4px;padding:1px 5px;border-radius:3px;background:#e8f0fb;color:#1f4f8f;font-size:10px}
.tq-sched-actions{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.tq-line-amount{text-align:right;font-weight:750;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap;color:#1b2c43}
.tq-line-amount small{font-weight:500;font-size:9px;color:#6b7c8f;display:block;margin-top:1px}
.tq-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:8px 0 3px;font-variant-numeric:tabular-nums;font-size:11px;color:#64748b}
.tq-pager button{font:inherit;color:#27394b;font-size:11px;padding:5px 12px;background:#fff;border:1px solid #d0dae4;border-radius:5px;cursor:pointer}
.tq-pager button:disabled{opacity:.35;cursor:default}
.tq-footer-note{color:#87909e;font-size:10px;margin:6px 0 0}
.tq-empty{padding:25px 10px;text-align:center;font-size:12px;color:#64748b}
#tq-alert{padding:8px 10px;margin:0 0 8px;background:#fff2f2;color:#a12626;font-size:12px;border-radius:5px;border:1px solid #f2c6c6}
.tq-backdrop{position:fixed;inset:0;z-index:190;background:rgba(15,23,42,.38)}
.tq-inspector{position:fixed;z-index:191;right:0;top:0;bottom:0;width:min(450px,100vw);background:#fff;color:#202b3b;box-shadow:-15px 0 40px rgba(14,27,42,.2);display:flex;flex-direction:column}
.tq-inspector-head{display:flex;align-items:start;justify-content:space-between;padding:14px 17px 10px;border-bottom:1px solid #e0e6ee;gap:12px}
.tq-inspector-kicker{color:#738398;font-size:11px;margin-bottom:4px}
.tq-inspector-head h2{font-size:15px;margin:0;line-height:1.4;overflow-wrap:anywhere}
#tq-inspector-close{font:inherit;font-size:22px;background:#f2f4f7;color:#334155;border:0;width:32px;height:32px;flex:none;border-radius:6px;cursor:pointer}
.tq-inspector-content{padding:12px 16px 22px;overflow-y:auto;flex:1;font-size:12px;line-height:1.6}
.tq-amount-card{display:flex;align-items:center;justify-content:space-between;background:#f1f6fc;border-radius:7px;padding:11px 12px;margin:0 0 11px}
.tq-amount-card span{color:#566b83;font-size:11px}.tq-amount-card strong{font-size:22px;font-weight:700;color:#12385c;font-variant-numeric:tabular-nums}
.tq-breakdown{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 12px}
.tq-breakdown div{background:#fafbfc;border:1px solid #e6ebf0;border-radius:5px;padding:6px 8px}
.tq-breakdown dt{font-size:10px;color:#7a8797}.tq-breakdown dd{margin:2px 0 0;font-size:12px;font-weight:600;overflow-wrap:anywhere}
.tq-section{border-top:1px solid #e6ebf0;padding:10px 0}.tq-section h3{font-size:12px;margin:0 0 5px;font-weight:700}
.tq-section p{font-size:11.5px;line-height:1.6;margin:3px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.tq-muted{font-size:11px;color:#7a8798}
.tq-evidence-file{font-size:11px;display:block;padding:3px 0;color:#42576e;overflow-wrap:anywhere}
.tq-secondary-btn{font:inherit;font-size:12px;background:#fff;color:#23537d;border:1px solid #b9cbdf;border-radius:5px;padding:7px 9px;cursor:pointer;margin-top:6px}
.tq-form-line{display:flex;gap:9px;align-items:center;margin:8px 0}
.tq-form-line label{font-size:11px;color:#5c6978;min-width:60px}
.tq-form-line select{font:inherit;font-size:12px;padding:6px;border:1px solid #cbd5e1;border-radius:5px;flex:1;min-width:0;background:#fff;color:#202b3b}
.tq-note-editor{font:inherit;font-size:12px;line-height:1.6;border:1px solid #bdcddd;border-radius:5px;width:100%;resize:vertical;min-height:85px;padding:8px;background:#fff;color:#1d2939}
.tq-note-save{font-size:10px;color:#61758a;margin-top:4px;min-height:14px}
.tq-note-helper{font-size:10px;color:#8a96a5}
@media(max-width:850px){
 .taxq{padding:6px 6px 10px}.tq-header{margin-bottom:7px}.tq-header h1{font-size:16px}.tq-header-sub{font-size:12px;margin-left:4px}
 .tq-header p{font-size:10px}.tq-back{font-size:10px;padding:5px 6px}
 .tq-layout{display:block}.tq-nav{max-height:none;position:static;display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;border:0;border-bottom:1px solid #e5e7eb;border-radius:0;background:transparent;padding:0 0 5px;margin-bottom:5px}
 .tq-nav::-webkit-scrollbar{display:none}.tq-nav button{flex:none;min-width:0;max-width:210px;width:auto;min-height:30px;background:#fff;border:1px solid #dce4ec;padding:5px 8px;font-size:11px}
 .tq-nav .tq-qno{width:auto}.tq-nav .tq-qname{max-width:145px}.tq-nav .tq-qstate{display:none}
 .tq-main{padding:7px;border-radius:5px}.tq-question-head h2{font-size:13px}
 .tq-question-head select{font-size:10px;min-width:84px;padding:4px}
 .tq-question-note{margin:5px 0 7px}.tq-question-note label{font-size:10px}.tq-question-note textarea{font-size:11px;height:30px;min-height:30px}
 .tq-filter-bar{display:grid;grid-template-columns:1fr 1fr 34px;gap:5px;padding:6px 0}
 .tq-filter-bar label{font-size:9px}.tq-filter-year{grid-column:1}.tq-filter-mode{grid-column:2}
 .tq-filter-year select,.tq-filter-mode select{width:100%}.tq-filter-search{grid-column:1 / 3;grid-row:2}
 #tq-reload{grid-column:3;grid-row:2}.tq-filter-bar select,.tq-filter-bar input{height:30px;font-size:11px}
 .tq-result-head{padding:4px 1px 6px}.tq-result-count{font-size:11px}.tq-gross-label{font-size:10px}
 .tq-list-head{grid-template-columns:70px minmax(0,1fr) 91px;gap:6px;padding:0 5px;min-height:25px;font-size:10px}
 .tq-list-head span:nth-child(3),.tq-list-head span:nth-child(4){display:none}
 .taxq .tq-line{grid-template-columns:70px minmax(0,1fr) 91px;gap:6px;padding:5px;min-height:55px}
 .tq-line-title{font-size:11.5px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .tq-line-preview{font-size:9.5px;margin-top:2px}
 .tq-line-account,.tq-line-proof{display:none}
 .tq-line-amount{font-size:12.5px}.tq-line-date{font-size:10px}
 .tq-lines{max-height:calc(100dvh - 341px);min-height:225px;overflow-y:auto}
 .tq-footer-note{font-size:9px}.tq-pager{padding:6px 0 3px}
 .tq-inspector{width:100vw;box-shadow:none}.tq-inspector-head{padding:11px 13px 9px}
 .tq-inspector-content{padding:10px 13px 22px}
}
@media(max-width:390px){
 .tq-header p{white-space:normal}.tq-header-sub{display:none}
 .tq-result-count{font-size:10px}
 .taxq .tq-line{grid-template-columns:63px minmax(0,1fr) 79px;gap:5px}
 .tq-list-head{grid-template-columns:63px minmax(0,1fr) 79px;gap:5px}
 .tq-line-amount{font-size:11.5px}
}


/* 2026-11-10: 共通 expenseCases.css の「.ec button {display:inline-flex;
   justify-content:center; border:...}」が明細行の grid を上書きしていた。
   HTMLを含む全画面に影響を与えず、税務調査の明細ボタンだけ強いセレクタで隔離する。 */
.ec.taxq {
  --tq-ledger-cols: 90px minmax(0,1fr) 130px 118px 126px;
  max-width: 1840px;
  width: 100%;
  padding: 10px 16px 20px;
  font-size: 13px;
}
.ec.taxq .tq-header {
  padding: 3px 2px 9px;
  border-bottom: 1px solid #e3e9f0;
  margin-bottom: 10px;
}
.ec.taxq .tq-header h1 { font-size: 20px; color: #19304a; }
.ec.taxq .tq-layout { grid-template-columns: 220px minmax(0,1fr); gap: 14px; }
.ec.taxq .tq-nav {
  border-color: #dde5ed;
  border-radius: 9px;
  padding: 6px;
  box-shadow: 0 2px 9px rgba(22,42,69,.025);
}
.ec.taxq .tq-nav button {
  justify-content: flex-start;
  box-shadow: none;
  margin: 0;
  text-align: left;
  min-height: 35px;
  font-size: 11.5px;
}
.ec.taxq .tq-nav button[aria-current="true"] {
  background: #eaf2fd;
  color: #164a7e;
  box-shadow: inset 3px 0 #2670bc;
}
.ec.taxq .tq-main {
  border-color: #dce5ee;
  border-radius: 9px;
  padding: 11px 13px 10px;
  box-shadow: 0 2px 11px rgba(22,42,69,.025);
}
.ec.taxq .tq-question-head h2 { font-size: 16px; margin: 0; color: #213954; }
.ec.taxq .tq-prompt { line-height: 1.4; margin: 4px 0 2px; }
.ec.taxq .tq-question-note textarea { width: 100%; min-width: 0; }
.ec.taxq .tq-list-head {
  grid-template-columns: var(--tq-ledger-cols);
  gap: 10px;
  padding: 0 12px;
  min-height: 34px;
  background: #eef3f8;
  border-top: 1px solid #dce5ef;
  border-bottom: 1px solid #d1dce9;
  font-size: 10.5px;
  letter-spacing: .015em;
  border-radius: 6px 6px 0 0;
}
.ec.taxq .tq-lines {
  background: #fff;
  border-color: #dce5ef;
  border-radius: 0 0 6px 6px;
  max-height: calc(100dvh - 276px);
}
.ec.taxq button.tq-line {
  /* .ec button より高い詳細度。ボタンの inline-flex を使わせない */
  display: grid;
  grid-template-columns: var(--tq-ledger-cols);
  align-items: center;
  justify-content: stretch;
  justify-items: stretch;
  column-gap: 10px;
  width: 100%;
  min-height: 43px;
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-bottom: 1px solid #e9eef4;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  white-space: normal;
  color: #233b53;
  background: #fff;
  cursor: pointer;
}
.ec.taxq button.tq-line:nth-child(even) { background: #fafcfe; }
.ec.taxq button.tq-line:hover { background: #f0f6fd; }
.ec.taxq button.tq-line.selected {
  background: #eaf3ff;
  box-shadow: inset 3px 0 0 #2777c6;
}
.ec.taxq button.tq-line:focus-visible {
  outline: 2px solid #2c78c4;
  outline-offset: -2px;
  z-index: 1;
  position: relative;
}
.ec.taxq .tq-line > span { min-width: 0; }
.ec.taxq .tq-line-date { color: #607187; font-size: 11px; }
.ec.taxq .tq-line-title {
  font-size: 12.2px;
  line-height: 1.35;
  color: #1e334b;
  font-weight: 650;
  letter-spacing: .005em;
}
.ec.taxq .tq-line-preview { line-height: 1.35; color: #758396; }
.ec.taxq .tq-line-account { color: #52677e; font-size: 10.5px; }
.ec.taxq .tq-line-proof { gap: 3px; }
.ec.taxq .tq-proof { padding: 2px 4px; border-radius: 3px; }
.ec.taxq .tq-line-amount { color: #172f4b; font-size: 13.5px; font-weight: 750; }
.ec.taxq .tq-result-count { color: #24405c; font-size: 11.5px; }
.ec.taxq .tq-gross-label { color: #647991; }
.ec.taxq .tq-filter-bar { border-top-color: #e8edf3; }
.ec.taxq .tq-inspector h2 { margin: 0; }
.ec.taxq .tq-inspector .tq-secondary-btn { width: auto; }
@media (max-width: 1020px) and (min-width: 851px) {
  .ec.taxq { --tq-ledger-cols: 80px minmax(0,1fr) 103px 94px 112px; }
  .ec.taxq .tq-layout { grid-template-columns: 195px minmax(0,1fr); gap: 9px; }
  .ec.taxq .tq-list-head, .ec.taxq button.tq-line { column-gap: 7px; }
}
@media (max-width: 850px) {
  .ec.taxq {
    --tq-ledger-cols: 74px minmax(0,1fr) 96px;
    padding: 6px 7px 13px;
  }
  .ec.taxq .tq-layout { display: block; }
  .ec.taxq .tq-nav {
    display: flex;
    position: static;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 0 0 5px;
    margin-bottom: 6px;
    box-shadow: none;
  }
  .ec.taxq .tq-nav button {
    flex: none;
    width: auto;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid #dae3ed;
    border-radius: 5px;
  }
  .ec.taxq .tq-nav button[aria-current="true"] {
    box-shadow: inset 0 -2px #2670bc;
  }
  .ec.taxq .tq-main { padding: 8px; border-radius: 7px; }
  .ec.taxq .tq-list-head {
    grid-template-columns: var(--tq-ledger-cols);
    gap: 7px;
    min-height: 30px;
    padding: 0 7px;
  }
  .ec.taxq button.tq-line {
    grid-template-columns: var(--tq-ledger-cols);
    gap: 7px;
    min-height: 49px;
    padding: 6px 7px;
  }
  .ec.taxq .tq-line-account, .ec.taxq .tq-line-proof,
  .ec.taxq .tq-list-head span:nth-child(3),
  .ec.taxq .tq-list-head span:nth-child(4) { display: none; }
  .ec.taxq .tq-line-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    font-size: 11.5px;
  }
  .ec.taxq .tq-line-amount { font-size: 12.5px; }
  .ec.taxq .tq-line-date { font-size: 10px; }
  .ec.taxq .tq-lines { max-height: none; min-height: 200px; overflow-y: visible; }
}
@media (max-width: 390px) {
  .ec.taxq { --tq-ledger-cols: 66px minmax(0,1fr) 88px; }
  .ec.taxq .tq-list-head, .ec.taxq button.tq-line { gap: 5px; }
  .ec.taxq .tq-line-amount { font-size: 11.5px; }
}


/* 2026-11-10: 期の並び・最大500件・雑費の利用先集約ツリー */
.ec.taxq .tq-filter-sort select{width:123px}
.ec.taxq .tq-filter-size select{width:85px}
.ec.taxq .tq-filter-year select{width:145px}
.ec.taxq .tq-filter-mode select{width:155px}
.ec.taxq .tq-filter-search{min-width:130px}
.ec.taxq .tq-fiscal-heading{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  min-height:29px;padding:4px 12px 4px 13px;
  background:#eaf1f9;color:#355574;border-top:1px solid #d2e0ed;
  border-bottom:1px solid #dce5ee;font-size:11px;font-weight:750;
}
.ec.taxq .tq-fiscal-heading span{color:#637c96;font-weight:500;font-size:10px}
.ec.taxq .tq-merchant-group{border-bottom:1px solid #e5ecf3;background:#fff}
.ec.taxq button.tq-merchant{
 display:grid;grid-template-columns:20px minmax(0,1fr) 94px 86px 124px;
 align-items:center;justify-items:stretch;justify-content:stretch;
 gap:8px;width:100%;min-height:47px;
 margin:0;padding:8px 13px;border:0;border-radius:0;
 background:#fff;color:#23405e;text-align:left;white-space:normal;
 cursor:pointer;font:inherit;box-shadow:none;
}
.ec.taxq button.tq-merchant:hover{background:#f2f7fd}
.ec.taxq button.tq-merchant[aria-expanded="true"]{
 background:#ecf4ff;box-shadow:inset 3px 0 #2d7ac1
}
.ec.taxq .tq-merchant-chevron{grid-column:1;color:#7b8fa4;font-size:15px}
.ec.taxq .tq-merchant-name{
 grid-column:2;min-width:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;
 font-size:12.5px;font-weight:700;
}
.ec.taxq .tq-merchant-unknown{grid-column:3;color:#915c19;font-size:10px;font-weight:600;white-space:nowrap}
.ec.taxq .tq-merchant-count{
 grid-column:4;justify-self:end;background:#eef2f6;color:#3b5872;
 border-radius:4px;padding:3px 7px;font-size:11px;font-weight:700;
 font-variant-numeric:tabular-nums;
}
.ec.taxq .tq-merchant-amount{
 grid-column:5;justify-self:end;font-size:13.5px;color:#183f60;
 font-variant-numeric:tabular-nums;white-space:nowrap;
}
.ec.taxq .tq-merchant-children{
 padding:5px 5px 6px 20px;background:#f9fbfe;border-top:1px solid #dbe7f2;
}
.ec.taxq .tq-merchant-subhead{
 color:#486580;font-size:10.5px;font-weight:700;padding:4px 7px 6px
}
.ec.taxq .tq-merchant-children button.tq-line{
 background:#fff;min-height:42px;border-bottom:1px solid #e4eaf0;
}
.ec.taxq .tq-merchant-children button.tq-line:nth-child(2n){background:#fcfdff}
.ec.taxq .tq-merchant-children button.tq-line:hover{background:#eef5fe}
.ec.taxq .tq-merchant-pager{
 display:flex;justify-content:center;align-items:center;gap:12px;padding:7px;
 font-size:11px;color:#526a80;
}
.ec.taxq .tq-merchant-pager button{
 width:auto;padding:5px 12px;border:1px solid #cad7e5;background:#fff;
 border-radius:4px;color:#35526b;cursor:pointer;font:inherit;font-size:11px;
}
.ec.taxq .tq-merchant-pager button:disabled{opacity:.35;cursor:default}
@media(max-width:1050px) and (min-width:851px){
 .ec.taxq button.tq-merchant{grid-template-columns:18px minmax(0,1fr) 82px 74px 104px;gap:6px}
 .ec.taxq .tq-merchant-name{font-size:11.5px}
 .ec.taxq .tq-merchant-amount{font-size:12.5px}
 .ec.taxq .tq-merchant-unknown{font-size:9px}
}
@media(max-width:850px){
 .ec.taxq .tq-filter-bar{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 34px;
  gap:6px;
 }
 .ec.taxq .tq-filter-year{grid-column:1;grid-row:1}
 .ec.taxq .tq-filter-mode{grid-column:2/4;grid-row:1}
 .ec.taxq .tq-filter-sort{grid-column:1;grid-row:2}
 .ec.taxq .tq-filter-size{grid-column:2/4;grid-row:2}
 .ec.taxq .tq-filter-search{grid-column:1/3;grid-row:3}
 .ec.taxq #tq-reload{grid-column:3;grid-row:3}
 .ec.taxq .tq-filter-bar select,.ec.taxq .tq-filter-bar input{width:100%;height:32px;min-width:0}
 .ec.taxq button.tq-merchant{
  grid-template-columns:16px minmax(0,1fr) 61px 91px;
  gap:6px;padding:8px 7px;min-height:44px;
 }
 .ec.taxq .tq-merchant-unknown{display:none}
 .ec.taxq .tq-merchant-count{grid-column:3;font-size:10px;padding:2px 5px}
 .ec.taxq .tq-merchant-amount{grid-column:4;font-size:12px}
 .ec.taxq .tq-merchant-name{font-size:11.5px}
 .ec.taxq .tq-merchant-children{padding:3px 3px 6px 8px}
 .ec.taxq .tq-fiscal-heading{padding:5px 7px;font-size:10px}
 .ec.taxq .tq-fiscal-heading span{font-size:9px}
}
@media(max-width:380px){
 .ec.taxq button.tq-merchant{grid-template-columns:14px minmax(0,1fr) 52px 80px;gap:4px}
 .ec.taxq .tq-merchant-amount{font-size:11px}
 .ec.taxq .tq-merchant-name{font-size:11px}
}
/* 依頼書の原文・対応方針(質問ごと)。原文は手書きの文字起こしなので、紙の色で区別する */
.tq-brief{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:4px 0 7px}
.tq-brief:empty{display:none}
.tq-brief section{border:1px solid #dfe6ee;border-radius:6px;padding:7px 10px;min-width:0}
.tq-brief section:only-child{grid-column:1 / -1}
.tq-brief h3{font-size:11px;font-weight:700;color:#59687a;margin:0 0 4px;display:flex;align-items:center;gap:5px}
.tq-source{background:#fffdf5;border-color:#eadfbd!important}.tq-source h3{color:#7a5a12}
.tq-source p{font-size:13px;line-height:1.6;color:#1f2937;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.tq-source-item{display:flex;gap:7px;align-items:flex-start}
.tq-source-item+.tq-source-item{border-top:1px dashed #e6dcc0;margin-top:5px;padding-top:5px}
.tq-source-no{flex:none;font-size:10.5px;font-weight:700;color:#7a5a12;background:#f6ecd0;border-radius:3px;padding:2px 5px;margin-top:2px;font-variant-numeric:tabular-nums}
.tq-policy{background:#f6f9fd}
.tq-policy p{font-size:12.5px;line-height:1.6;margin:0;color:#27354a;overflow-wrap:anywhere}
.tq-links{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}
.tq-links a{font-size:12px;color:#1d5fa7;background:#fff;border:1px solid #b9cbdf;border-radius:4px;padding:3px 8px;text-decoration:none}
.tq-links a:hover{background:#eef5fd}
.tq-help{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;background:#efe4c4;color:#7a5a12;font-size:10px;font-weight:700;cursor:help}
.tq-nav button.merged{color:#9aa4b1}.tq-nav button.merged .tq-qstate{color:#8a96a5;font-variant-numeric:tabular-nums}
/* 依頼書の前書き・結び(見出しの右。開くと下に重ねて出す) */
.tq-doc{position:relative;margin-left:auto;font-size:11px}
.tq-doc summary{cursor:pointer;color:#4b5563;border:1px solid var(--border);background:#fff;border-radius:5px;padding:6px 9px;white-space:nowrap;list-style:none}
.tq-doc summary::-webkit-details-marker{display:none}
.tq-doc[open] summary{background:#fffdf5;border-color:#eadfbd;color:#7a5a12}
.tq-doc-body{position:absolute;right:0;top:calc(100% + 4px);z-index:20;width:min(340px,90vw);background:#fffdf5;border:1px solid #eadfbd;border-radius:6px;box-shadow:0 8px 24px rgba(14,27,42,.16);padding:10px 12px}
.tq-doc-body p{font-size:13px;line-height:1.7;margin:0;color:#1f2937;white-space:normal}
.tq-doc-body p.tq-doc-gap{color:#9a8b62;font-size:11px;margin:4px 0}
.tq-doc-body small{display:block;margin-top:6px;color:#7a6a3a;font-size:10.5px}
/* 10: 出張管理の出張一覧(1件1行、金額は右揃え) */
.tq-trip-head,.tq-trip{display:grid;grid-template-columns:118px minmax(110px,1fr) minmax(190px,1.5fr) minmax(70px,1fr) 104px 152px;align-items:center;column-gap:10px}
.tq-trip-head{position:sticky;top:0;z-index:2;background:#eef2f6;color:#59687a;font-size:10.5px;font-weight:700;border-top:1px solid #e2e8f0;border-bottom:1px solid #dce3eb;min-height:29px;padding:0 9px}
.tq-trip-head span:nth-child(5),.tq-trip-head span:nth-child(6){text-align:right}
.tq-trip{border-bottom:1px solid #edf0f3;min-height:44px;padding:6px 9px;font-size:12px;background:#fff}
.tq-trip-dest{display:flex;align-items:center;gap:6px;min-width:0}
.tq-trip-dest strong{font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tq-trip-dest small{color:#67798a;font-size:10.5px;white-space:nowrap}
.tq-trip-members{display:flex;align-items:center;gap:4px 9px;flex-wrap:wrap;min-width:0}
.tq-trip-member{white-space:nowrap}.tq-trip-member small{color:#67798a;font-size:10px;margin-left:3px}
.tq-trip-guest{color:#516173;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.tq-trip-purpose{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#374151}
.tq-trip-links{display:flex;gap:5px;justify-content:flex-end}
.tq-trip-links a{font-size:11px;color:#1d5fa7;border:1px solid #c9d7e6;border-radius:4px;padding:3px 6px;text-decoration:none;white-space:nowrap;background:#fff}
.tq-trip-links a:hover{background:#eef5fd}
.tq-proof.warn{color:#8a4b0b;background:#fdf0dc}
/* サイドバーを開いた幅(本文 約990px)でも出張の行が横にはみ出さない */
@media(max-width:1100px) and (min-width:851px){.tq-trip-head,.tq-trip{grid-template-columns:104px minmax(96px,1.1fr) minmax(138px,1.4fr) minmax(40px,.5fr) 92px 150px;column-gap:7px}.tq-trip-dest strong{white-space:normal;overflow-wrap:anywhere}}
@media(max-width:850px){
 .tq-brief{grid-template-columns:minmax(0,1fr);gap:6px}.tq-source p{font-size:12.5px}.tq-policy p{font-size:12px}
 .tq-doc summary{font-size:10px;padding:5px 6px}
 .tq-trip-head{display:none}
 .tq-trip{grid-template-columns:minmax(0,1fr) auto;row-gap:4px;padding:7px 5px;border-top:0}
 .tq-trip .tq-line-date{grid-area:1 / 1}.tq-trip .tq-line-amount{grid-area:1 / 2}
 .tq-trip-dest{grid-area:2 / 1}.tq-trip-links{grid-area:2 / 2}
 .tq-trip-members{grid-area:3 / 1 / 4 / 3}.tq-trip-purpose{grid-area:4 / 1 / 5 / 3;white-space:normal}
}
@media(max-width:390px){.tq-doc summary{white-space:normal;word-break:keep-all;text-align:center;line-height:1.35;padding:3px 6px}}

/* 質問ごとのコメント(チャット)。メモ欄のすぐ下に1行、押すと右から開く */
.ec.taxq .tq-comment-bar{display:flex;align-items:center;gap:9px;margin:0 0 8px;min-width:0;height:28px}
.ec.taxq .tq-comments-open{flex:none;width:auto;min-height:0;font:inherit;font-size:11px;font-weight:700;color:#1d4f87;background:#eef5fd;border:1px solid #bcd3ec;border-radius:4px;height:28px;padding:0 9px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.ec.taxq .tq-comments-open:hover{background:#e1eefb}
.ec.taxq .tq-comments-count{min-width:18px;height:17px;padding:0 5px;border-radius:9px;background:#1d5fa7;color:#fff;font-size:10px;display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}
.ec.taxq .tq-comments-open.pending{border-color:#e0a13a;background:#fff6e5;color:#8a5200}
.ec.taxq .tq-comments-open.pending .tq-comments-count{background:#c97a00}
.ec.taxq .tq-comments-latest{flex:1;min-width:0;font-size:11px;color:#46566b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.ec.taxq .tq-chat-pending{color:#a35c00;margin-right:9px}
.ec.taxq .tq-chat-last b{color:#27354a}
.ec.taxq .tq-nav .tq-qchat{flex:none;min-width:16px;height:15px;padding:0 4px;border-radius:8px;background:#dbe7f5;color:#1d4f87;font-size:9.5px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:tabular-nums}
.ec.taxq .tq-nav .tq-qchat.pending{background:#c97a00;color:#fff}
.ec.taxq .tq-comments{width:min(480px,100vw)}
.ec.taxq #tq-comments-close{font:inherit;font-size:22px;background:#f2f4f7;color:#334155;border:0;width:32px;min-height:0;height:32px;padding:0;flex:none;border-radius:6px;cursor:pointer}
.ec.taxq .tq-comments-thread{flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:10px;background:#f5f7fa}
.ec.taxq .tq-chat-item{background:#fff;border:1px solid #dfe6ee;border-radius:8px;padding:8px 11px 9px;max-width:92%;min-width:55%;align-self:flex-start}
.ec.taxq .tq-chat-item.mine{align-self:flex-end;background:#eef5fd;border-color:#c9dcf1}
.ec.taxq .tq-chat-item.todo{border-color:#e0a13a;box-shadow:0 0 0 1px #e0a13a}
.ec.taxq .tq-chat-item header{display:flex;align-items:baseline;gap:8px;margin-bottom:3px}
.ec.taxq .tq-chat-item header strong{font-size:12px;color:#1f2d3d}
.ec.taxq .tq-chat-item header time{color:#7a8798;font-size:10.5px;font-variant-numeric:tabular-nums}
.ec.taxq .tq-chat-del{margin-left:auto;width:auto;min-height:0;font:inherit;font-size:10.5px;color:#7a8798;background:none;border:0;cursor:pointer;padding:0;text-decoration:underline}
.ec.taxq .tq-chat-del.armed{color:#b42318;font-weight:700}
.ec.taxq .tq-chat-item p{margin:0;font-size:12.5px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;color:#202b3b}
.ec.taxq .tq-mention{color:#1d5fa7;font-weight:700;background:#e0edfb;border-radius:3px;padding:0 3px}
.ec.taxq .tq-chat-to{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:7px;font-size:10.5px;color:#7a8798}
.ec.taxq .tq-chat-ack{border:1px solid #e3c68e;background:#fff8ea;color:#8a5200;border-radius:10px;padding:1px 8px}
.ec.taxq .tq-chat-ack.done{border-color:#b7dcc6;background:#edf8f1;color:#137348}
.ec.taxq .tq-chat-ackbtn{margin-top:8px;width:auto;min-height:0;font:inherit;font-size:12px;font-weight:700;color:#fff;background:#c97a00;border:0;border-radius:5px;padding:6px 14px;cursor:pointer}
.ec.taxq .tq-chat-ackbtn:hover{background:#b06a00}
.ec.taxq .tq-comments-form{border-top:1px solid #e0e6ee;padding:10px 16px 14px;background:#fff;display:flex;flex-direction:column;gap:7px;margin:0}
.ec.taxq .tq-comments-to{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:10.5px;color:#657384}
.ec.taxq .tq-comments-to button{width:auto;min-height:0;font:inherit;font-size:11px;font-weight:400;color:#1d4f87;background:#eef5fd;border:1px solid #c9dcf1;border-radius:11px;padding:2px 9px;cursor:pointer}
.ec.taxq .tq-comments-to button:hover{background:#e1eefb}
.ec.taxq .tq-comments-input{position:relative}
.ec.taxq .tq-comments-input textarea{display:block;width:100%;font:inherit;font-size:12.5px;line-height:1.6;border:1px solid #cfd9e4;border-radius:5px;padding:7px 9px;min-height:74px;max-height:200px;resize:vertical;color:#202b3b;background:#fff}
.ec.taxq .tq-comments-suggest{position:absolute;left:0;bottom:100%;margin-bottom:4px;background:#fff;border:1px solid #cfd9e4;border-radius:6px;box-shadow:0 6px 18px rgba(14,27,42,.16);min-width:210px;max-height:190px;overflow-y:auto;z-index:2;padding:3px}
.ec.taxq .tq-comments-suggest button{display:flex;width:100%;min-height:0;justify-content:space-between;align-items:baseline;gap:14px;font:inherit;font-size:12px;font-weight:400;border:0;background:none;padding:5px 8px;border-radius:4px;cursor:pointer;text-align:left;color:#202b3b}
.ec.taxq .tq-comments-suggest button[aria-selected="true"],.ec.taxq .tq-comments-suggest button:hover{background:#e8f1fc}
.ec.taxq .tq-comments-suggest small{color:#7a8798;font-size:10.5px}
.ec.taxq .tq-comments-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ec.taxq .tq-comments-hint{font-size:10.5px;color:#7a8798;min-width:0;overflow-wrap:anywhere}
.ec.taxq #tq-comments-send{flex:none;width:auto;min-height:0;font:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#1d5fa7;border:0;border-radius:5px;padding:6px 20px;cursor:pointer}
.ec.taxq #tq-comments-send:disabled{opacity:.55;cursor:default}
@media(max-width:850px){
 .ec.taxq .tq-comment-bar{margin:0 0 7px}
 .ec.taxq .tq-comments{width:100vw}
 .ec.taxq .tq-comments-thread{padding:10px 13px}.ec.taxq .tq-comments-form{padding:9px 13px 12px}
 .ec.taxq .tq-comments-input textarea{font-size:16px}
}
/* 返信(スレッド): 元のコメントの下に左の線でつないで並べ、返信には「誰のどのコメントへの返信か」を1行出す */
.ec.taxq .tq-chat-thread{display:flex;flex-direction:column;gap:6px}
.ec.taxq .tq-chat-thread .tq-chat-item,.ec.taxq .tq-board-thread .tq-chat-item{max-width:none;min-width:0;align-self:stretch}
.ec.taxq .tq-chat-replies{display:flex;flex-direction:column;gap:6px;margin-left:12px;padding-left:11px;border-left:2px solid #b9cbe0}
.ec.taxq .tq-chat-replies-label{font-size:11px;font-weight:700;color:#56677c}
.ec.taxq .tq-chat-tools{margin-left:auto;display:inline-flex;align-items:baseline;gap:11px;flex:none}
.ec.taxq .tq-chat-tools .tq-chat-del{margin-left:0}
.ec.taxq .tq-chat-reply{width:auto;min-height:0;font:inherit;font-size:11.5px;font-weight:700;color:#1d5fa7;background:none;border:0;padding:0;cursor:pointer}
.ec.taxq .tq-chat-reply:hover{text-decoration:underline}
.ec.taxq .tq-chat-quote{display:flex;align-items:baseline;gap:6px;width:100%;min-height:0;font:inherit;font-size:11.5px;font-weight:400;color:#3a4a5f;background:#f0f4f9;border:0;border-left:3px solid #7fa6d3;border-radius:3px;padding:4px 8px;margin:2px 0 6px;cursor:pointer;text-align:left;overflow:hidden}
.ec.taxq button.tq-chat-quote:hover{background:#e3ecf7}
.ec.taxq .tq-chat-quote-mark{flex:none;color:#1d5fa7;font-weight:700}
.ec.taxq .tq-chat-quote-who{flex:none}.ec.taxq .tq-chat-quote-who b{color:#1f2d3d}
.ec.taxq .tq-chat-quote-text{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#657384}
.ec.taxq .tq-chat-quote.gone{cursor:default;color:#7a8798;border-left-color:#cdd6e1}
.ec.taxq .tq-chat-quote.gone .tq-chat-quote-mark{color:#9aa7b7}
.ec.taxq .tq-chat-gone{font-size:11.5px;color:#7a8798;border:1px dashed #cdd6e1;border-radius:8px;padding:6px 11px;background:#fafbfc}
@keyframes tq-chat-flash{0%,55%{box-shadow:0 0 0 3px #f2b233;background:#fff6d8}100%{box-shadow:0 0 0 0 rgba(242,178,51,0)}}
.ec.taxq .tq-chat-item.flash{animation:tq-chat-flash 2.6s ease-out}
.ec.taxq .tq-comments-replying{display:flex;align-items:center;gap:8px;background:#eef5fd;border:1px solid #c9dcf1;border-left:3px solid #1d5fa7;border-radius:4px;padding:5px 8px;font-size:11.5px;color:#27354a}
.ec.taxq .tq-reply-text{flex:1;min-width:0}
.ec.taxq .tq-reply-text small{display:block;font-size:11px;color:#657384;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ec.taxq .tq-comments-replying button{flex:none;width:auto;min-height:0;font:inherit;font-size:11px;font-weight:400;color:#4b5563;background:#fff;border:1px solid #cfd9e4;border-radius:4px;padding:2px 9px;cursor:pointer}
.ec.taxq .tq-comments-board{margin-left:auto;align-self:center;flex:none;width:auto;min-height:0;font:inherit;font-size:11px;font-weight:700;color:#1d4f87;background:#fff;border:1px solid #bcd3ec;border-radius:4px;height:28px;padding:0 9px;cursor:pointer;white-space:nowrap}
.ec.taxq .tq-comments-board:hover{background:#eef5fd}
/* コメント一覧: 全質問のやり取りをスレッド単位でまとめて見る(画面いっぱいにはしない) */
.ec.taxq .tq-board-open{flex:none;width:auto;min-height:0;font:inherit;font-size:11px;font-weight:700;color:#1d4f87;background:#eef5fd;border:1px solid #bcd3ec;border-radius:5px;padding:5px 9px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.ec.taxq .tq-board-open:hover{background:#e1eefb}
.ec.taxq .tq-board-open.pending{border-color:#e0a13a;background:#fff6e5;color:#8a5200}
.ec.taxq .tq-board-todo{height:17px;padding:0 7px;border-radius:9px;background:#c97a00;color:#fff;font-size:10px;display:inline-flex;align-items:center;font-variant-numeric:tabular-nums}
.ec.taxq .tq-board{position:fixed;z-index:191;left:50%;top:50%;transform:translate(-50%,-50%);width:min(920px,calc(100vw - 32px));height:min(780px,calc(100vh - 56px));background:#fff;color:#202b3b;border-radius:10px;box-shadow:0 22px 60px rgba(14,27,42,.3);display:flex;flex-direction:column;overflow:hidden}
.ec.taxq .tq-board-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 18px 10px;border-bottom:1px solid #e0e6ee}
.ec.taxq .tq-board-head h2{font-size:16px;margin:0;line-height:1.4;color:#19304a}
.ec.taxq .tq-board-head p{margin:3px 0 0;font-size:11.5px;color:#657384}
.ec.taxq #tq-board-close{font:inherit;font-size:22px;background:#f2f4f7;color:#334155;border:0;width:32px;min-height:0;height:32px;padding:0;flex:none;border-radius:6px;cursor:pointer}
.ec.taxq .tq-board-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 18px;border-bottom:1px solid #e0e6ee}
.ec.taxq .tq-board-tabs{display:inline-flex;gap:5px;flex-wrap:wrap}
.ec.taxq .tq-board-tabs button{width:auto;min-height:0;font:inherit;font-size:12px;font-weight:700;color:#46566b;background:#f2f4f7;border:1px solid transparent;border-radius:15px;padding:4px 12px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.ec.taxq .tq-board-tabs button[aria-selected="true"]{background:#1d5fa7;color:#fff}
.ec.taxq .tq-board-tabs button span{font-size:10.5px;font-variant-numeric:tabular-nums;opacity:.85}
.ec.taxq .tq-board-state{font-size:11.5px;color:#b42318;min-width:0}
.ec.taxq #tq-board-question{margin-left:auto;width:auto;max-width:300px;min-height:0;height:30px;font:inherit;font-size:12px;color:#202b3b;border:1px solid #cfd9e4;border-radius:5px;padding:0 6px;background:#fff}
.ec.taxq .tq-board-list{flex:1;overflow-y:auto;background:#f5f7fa;padding:12px 18px;display:flex;flex-direction:column;gap:10px}
.ec.taxq .tq-board-row{display:grid;grid-template-columns:176px minmax(0,1fr);gap:14px;background:#fff;border:1px solid #dfe6ee;border-radius:9px;padding:11px 13px}
.ec.taxq .tq-board-row.todo{border-color:#e0a13a}
.ec.taxq .tq-board-q{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.ec.taxq .tq-board-qlink{width:100%;min-height:0;font:inherit;text-align:left;background:none;border:0;padding:0;cursor:pointer;display:flex;align-items:baseline;gap:7px;color:#19304a}
.ec.taxq .tq-board-qno{flex:none;font-size:11.5px;font-weight:700;color:#fff;background:#3c5878;border-radius:4px;padding:1px 6px;font-variant-numeric:tabular-nums}
.ec.taxq .tq-board-qname{font-size:12.5px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.ec.taxq .tq-board-qlink:hover .tq-board-qname{text-decoration:underline}
.ec.taxq .tq-board-meta{font-size:11px;color:#657384;font-variant-numeric:tabular-nums}
.ec.taxq .tq-board-flag{font-size:10.5px;font-weight:700;color:#8a5200;background:#fff6e5;border:1px solid #e3c68e;border-radius:10px;padding:1px 8px}
.ec.taxq .tq-board-go{width:auto;min-height:0;font:inherit;font-size:11px;font-weight:700;color:#1d4f87;background:#fff;border:1px solid #bcd3ec;border-radius:4px;padding:3px 9px;cursor:pointer}
.ec.taxq .tq-board-go:hover{background:#eef5fd}
.ec.taxq .tq-board-thread{display:flex;flex-direction:column;gap:6px;min-width:0}
.ec.taxq .tq-board-empty{margin:28px 0;text-align:center;font-size:12.5px;color:#657384}
@media(max-width:850px){
 .ec.taxq .tq-board{width:calc(100vw - 12px);height:calc(100vh - 20px);height:calc(100dvh - 20px)}
 .ec.taxq .tq-board-head{padding:11px 13px 9px}.ec.taxq .tq-board-filters{padding:8px 13px}.ec.taxq .tq-board-list{padding:10px 10px}
 .ec.taxq #tq-board-question{margin-left:0;max-width:none;flex:1 1 100%;height:34px;font-size:16px}
 .ec.taxq .tq-board-row{grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 10px}
 .ec.taxq .tq-board-q{flex-direction:row;flex-wrap:wrap;align-items:center;gap:5px 9px}
 .ec.taxq .tq-board-qlink{flex:1 1 100%}
 .ec.taxq .tq-board-open{font-size:10px;padding:4px 6px;gap:4px}
 .ec.taxq .tq-chat-replies{margin-left:6px;padding-left:9px}
}
/* スマホ幅: 見出しのボタン3つ(原文・コメント一覧・Expenseホーム)が1行に収まらず横にはみ出すので、題名の下の行へ回す */
@media(max-width:760px){
 .ec.taxq .tq-header{flex-wrap:wrap;row-gap:6px;position:relative}
 .ec.taxq .tq-header>div:first-child{flex:1 1 100%}
 .ec.taxq .tq-doc{position:static}
 .ec.taxq .tq-doc summary{white-space:nowrap}
}


/* Q09 recipient tree and fiscal subtotals; compact because the audit ledger is dense. */
.ec.taxq .tq-subtotals{
 display:flex;align-items:center;gap:11px;flex-wrap:wrap;
 min-height:36px;padding:6px 9px;margin:0 0 7px;
 border:1px solid #dce6f0;border-radius:5px;background:#f5f9fd;color:#264767;
 font-size:11px;font-variant-numeric:tabular-nums;
}
.ec.taxq .tq-subtotal-main{display:flex;gap:9px;align-items:center;flex:none}
.ec.taxq .tq-subtotal-main span{color:#536d85;font-size:11px}
.ec.taxq .tq-subtotal-main strong{font-size:14px;color:#113f6f;white-space:nowrap}
.ec.taxq .tq-subtotal-fiscal{display:flex;gap:5px;overflow-x:auto;max-width:100%;scrollbar-width:thin;flex:1;min-width:140px}
.ec.taxq .tq-fiscal-total{
 display:inline-flex;align-items:center;gap:6px;flex:none;white-space:nowrap;
 padding:4px 7px;border:1px solid #dae6f1;background:#fff;border-radius:4px;
 font-size:10px;color:#62768a;
}
.ec.taxq .tq-fiscal-total strong{color:#285374;font-size:11px;font-weight:700}
.ec.taxq .tq-subtotal-caution{flex-basis:100%;margin:0!important;font-size:10px;color:#7b6571;line-height:1.35}
.ec.taxq .tq-merchant-amount small{font-size:10px;font-weight:500;color:#6d8498;margin-right:5px}
.ec.taxq .tq-fiscal-heading span{font-variant-numeric:tabular-nums;white-space:normal;text-align:right}
@media(max-width:850px){
 .ec.taxq .tq-subtotals{padding:5px 7px;gap:5px;margin-bottom:5px}
 .ec.taxq .tq-subtotal-main strong{font-size:13px}
 .ec.taxq .tq-subtotal-main span{font-size:10px}
 .ec.taxq .tq-subtotal-fiscal{flex-basis:100%;min-width:0;max-width:100%}
 .ec.taxq .tq-fiscal-total{padding:3px 5px;font-size:9px}
 .ec.taxq .tq-fiscal-total strong{font-size:10px}
 .ec.taxq .tq-merchant-amount small{display:block;text-align:right;font-size:9px;line-height:1.05;margin:0 0 1px}
 .ec.taxq .tq-fiscal-heading{align-items:center}
 .ec.taxq .tq-fiscal-heading span{font-size:9px}
}
