/* A案：色は名前ラベルの中にまとめ、担当者欄の外側は本文と揃える。 */
.ar-page .ar-targets .ar-table tbody th:has(> button) {
  background: var(--ar-bg);
}

.ar-page .ar-targets .ar-table tbody th > button {
  --owner-color: #3568c7;
  --owner-text: #2958ae;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 174px;
  max-width: 220px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--owner-color) 14%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--owner-color) 8%, var(--ar-bg));
  color: var(--owner-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.ar-page .ar-targets .ar-table tbody th > button::after {
  content: "内訳";
  margin-left: auto;
  color: inherit;
  font-size: 11px;
  font-weight: 500;
  opacity: .8;
}

.ar-page .ar-targets .ar-table tbody th > button > i {
  flex-shrink: 0;
}

.ar-page .ar-targets .ar-table tbody th > button > .lucide-arrow-up-right {
  display: none;
}

.ar-page .ar-targets .ar-table tbody th > button:is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--owner-color) 15%, var(--ar-bg));
  box-shadow: 0 3px 9px color-mix(in srgb, var(--owner-color) 14%, transparent);
  transform: translateY(-2px);
  filter: none;
}

.ar-page .ar-targets .ar-table tbody th > button:has(> i:is([style*="rgb(128, 90, 199)"], [style*="#805ac7"])) {
  --owner-color: #805ac7;
  --owner-text: #6d45ad;
}
.ar-page .ar-targets .ar-table tbody th > button:has(> i:is([style*="rgb(41, 151, 102)"], [style*="#299766"])) {
  --owner-color: #299766;
  --owner-text: #20734e;
}
.ar-page .ar-targets .ar-table tbody th > button:has(> i:is([style*="rgb(200, 84, 131)"], [style*="#c85483"])) {
  --owner-color: #c85483;
  --owner-text: #aa3c69;
}
.ar-page .ar-targets .ar-table tbody th > button:has(> i:is([style*="rgb(194, 151, 45)"], [style*="#c2972d"])) {
  --owner-color: #c2972d;
  --owner-text: #8b681b;
}

.ar-page .ar-targets .ar-table tfoot th:first-child {
  color: var(--ar-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
}

[data-theme="dark"] .ar-page .ar-targets .ar-table tbody th > button {
  color: color-mix(in srgb, var(--owner-color) 60%, white);
}

@media (prefers-reduced-motion: reduce) {
  .ar-page .ar-targets .ar-table tbody th > button {
    transition: none;
    transform: none;
  }
}
