:root {
  --bg: #f5f4ef;
  --card-bg: #fffefa;
  --ink: #2b3935;
  --muted: #727f78;
  --line: #e3e6de;
  --accent: #a45a3a;
  --green: #295546;
  --green-hover: #214538;
  --blue: #3472ad;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Header */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seal {
  background: var(--accent);
  color: #fff9ed;
  display: grid;
  place-items: center;
  width: 40px;
  height: 42px;
  border-radius: 4px;
  font: 26px Georgia, "Songti TC", serif;
  outline: 1px solid #d49f82;
  outline-offset: -4px;
  flex-shrink: 0;
}

.brand-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4caf50;
}
.dot.gray { background: #b0b8ac; }
.dot.red { background: #d9534f; }

.phase-badge {
  font-weight: 600;
  color: var(--green);
}

.account-badge {
  background: #edf2e8;
  color: #496352;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid #d8e2d2;
}

.area-switch-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f3ec;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

.area-label {
  font-weight: 600;
  color: var(--text);
  font-size: 11px;
}

.area-select {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
}

.btn-sm {
  padding: 2px 8px !important;
  font-size: 11px !important;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons */
button {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 5px;
  padding: 8px 16px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: var(--green-hover);
}

.outline {
  background: transparent;
  color: var(--green);
  border-color: #a4b39b;
}

.secondary {
  background: #f4f6ee;
  color: #385142;
  border-color: #d6ddcf;
}

.text-button {
  background: none;
  border: none;
  color: var(--green);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.text-button:hover {
  text-decoration: underline;
}

/* Notice Bar */
.notice {
  background: #eef2e7;
  border: 1px solid #d8e2d0;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 12px;
  color: #435b4b;
  margin-bottom: 16px;
}
.notice.error {
  background: #fbeee8;
  border-color: #ebcdc0;
  color: #9c452e;
}

/* Panels */
.panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.panel-heading {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #8c978b;
  margin: 0;
  text-transform: uppercase;
}

.muted {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  font-size: 10px;
  background: #eef2e7;
  color: #556c5c;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Login Panel */
.login-panel {
  background: #fafaf5;
  border: 1px solid #d8dfd0;
}
.login-form {
  padding: 18px 20px;
}
.login-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}
.login-field input {
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid #c9d4c2;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}
.login-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}
.login-hint {
  font-size: 11px;
  color: #657568;
}

/* Role Panel */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}
.role-item {
  display: flex;
  flex-direction: column;
  background: #f7f9f3;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #e5ebe0;
}
.role-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.role-item strong {
  font-size: 15px;
  color: var(--ink);
  font-family: Georgia, serif;
}
.role-item small {
  font-size: 10px;
  color: #7b887d;
  margin-top: 4px;
}

/* 官家小助手執行成果 */
.bz-log-header {
  background: #fdfdf9;
  padding: 12px 20px;
}
.bz-log-title-area {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.bz-log-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.bz-log-desc {
  font-size: 11px;
  color: var(--blue);
}
.bz-log-body {
  padding: 0;
}
.bz-log-textarea {
  width: 100%;
  height: 240px;
  background: #252a2d;
  color: #c9d6ce;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "PingFang TC", monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 14px 18px;
  border: none;
  border-radius: 0 0 8px 8px;
  resize: vertical;
  outline: none;
  display: block;
}

/* Baoshu Settings Section */
.bz-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: #fafbf7;
  border-bottom: 1px solid var(--line);
}
.bz-toolbar input[type=search] {
  padding: 7px 12px;
  border: 1px solid #c7d2c0;
  border-radius: 4px;
  width: 260px;
  background: #fff;
  font-size: 12px;
}
.follow-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.follow-label input[type=checkbox] {
  accent-color: var(--green);
}

#bz-sections {
  padding: 16px 20px;
}
.bz-sec {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 10px;
  background: #fdfdfa;
}
.bz-sec > summary {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: #f7f9f3;
  border-radius: 5px;
  display: flex;
  align-items: center;
  user-select: none;
}
.bz-sec > summary small {
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}
.bz-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px 16px;
  padding: 10px 16px 16px;
}
.bz-f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px dashed #e6ebd8;
}
.bz-f.chk {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.bz-f input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  flex-shrink: 0;
  cursor: pointer;
}
.bz-f input[type=number], .bz-f input[type=text], .bz-f select, .bz-f textarea {
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid #c8d3bf;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
.bz-f textarea { min-height: 48px; }
.bz-f .wired {
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 9px;
  margin-left: 6px;
  white-space: nowrap;
}
.bz-f.hide { display: none; }

/* Hero List (選擇門客) Styling */
.bz-f.hero-list-field {
  grid-column: 1 / -1;
  background: #fcfdf9;
  border: 1px solid #d9e3d3;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 4px;
}
.hero-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid #e1e7db;
  border-radius: 6px;
  padding: 8px 12px;
}
.hero-tags-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ebf3e8;
  border: 1px solid #b6d3b0;
  color: #214d2e;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.hero-tag:hover {
  background: #deeed9;
}
.tag-idx {
  font-size: 10px;
  color: #5d8164;
  font-weight: 600;
}
.tag-name {
  color: #1f3d27;
}
.hero-tag-del {
  background: transparent;
  border: none;
  color: #839786;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 4px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-tag-del:hover {
  color: #c0392b;
}
.hero-empty-notice {
  font-size: 11px;
  color: #8b998d;
  font-style: italic;
}
.hero-action-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px dashed #e8eee2;
  padding-top: 8px;
}
.btn-clear-heroes {
  font-size: 11px;
  padding: 4px 10px;
  background: #fbf5f4;
  border: 1px solid #e6c8c5;
  color: #a93226;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-clear-heroes:hover {
  background: #f9ebea;
}
.btn-pick-heroes {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  background: #27ae60;
  border: 1px solid #1e8449;
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-pick-heroes:hover {
  background: #219653;
}
.hero-add-select {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #c7d6c2;
  border-radius: 4px;
  background: #fff;
  color: #2b3935;
  cursor: pointer;
}
.hero-count-badge {
  font-size: 11px;
  color: #5c7463;
  font-weight: normal;
}

/* Hero Picker Modal */
.hero-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hero-modal-content {
  background: #ffffff;
  border-radius: 10px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
  border: 1px solid #ccd8c5;
  overflow: hidden;
}
.hero-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px 12px;
  background: #f7faf5;
  border-bottom: 1px solid #e1ebd9;
}
.hero-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #1e3d2b;
}
.hero-modal-desc {
  margin: 4px 0 0;
  font-size: 11px;
  color: #6a7c6f;
}
.hero-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #8c9e90;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.hero-modal-close:hover {
  color: #1e3d2b;
}
.hero-modal-search-bar {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  background: #fbfdf9;
  border-bottom: 1px solid #edf3e8;
}
.hero-modal-search-bar input {
  flex: 1;
  padding: 7px 12px;
  font-size: 12px;
  border: 1px solid #c8d8c2;
  border-radius: 6px;
  background: #ffffff;
}
.hero-modal-seq-bar {
  padding: 10px 20px;
  background: #f3f8f0;
  border-bottom: 1px solid #e4eedf;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-modal-seq-label {
  font-size: 11px;
  font-weight: 600;
  color: #2e593a;
}
.hero-modal-seq-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 90px;
  overflow-y: auto;
}
.hero-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding: 16px 20px;
  overflow-y: auto;
  max-height: 45vh;
  background: #ffffff;
}
.hero-picker-card {
  padding: 8px 10px;
  background: #fafbfa;
  border: 1px solid #dbe5d7;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.hero-picker-card:hover {
  background: #eef5eb;
  border-color: #aed0a3;
  transform: translateY(-1px);
}
.hero-picker-card.selected {
  background: #eafaf1;
  border-color: #27ae60;
  box-shadow: 0 0 0 1px #27ae60;
}
.picker-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.picker-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #1f3d27;
}
.picker-card-id {
  font-size: 10px;
  color: #8c9e90;
}
.picker-card-badge {
  font-size: 10px;
  font-weight: 700;
  color: #27ae60;
  background: #d4efdf;
  padding: 1px 5px;
  border-radius: 10px;
}
.hero-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #f7faf5;
  border-top: 1px solid #e1ebd9;
}
#hero-modal-status-text {
  font-size: 12px;
  color: #3b5242;
  font-weight: 500;
}

/* Sticky Save Bar */
.sticky-save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 99;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e6ede2;
  border: 1px solid #c2d4bc;
  border-radius: 8px;
  padding: 12px 20px;
  margin: 16px 20px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}
.save-status-text {
  font-size: 12px;
  color: #3b5242;
  font-weight: 500;
}
.save-all-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 9px 20px;
}

/* Footer */
.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: #8c978d;
  padding: 14px 4px 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .app-layout { padding: 12px 10px 40px; }
  .app-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .header-actions { justify-content: stretch; }
  .header-actions button { flex: 1 1 45%; }
  .role-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bz-fields { grid-template-columns: 1fr; }
  .sticky-save-bar { margin: 12px 10px 16px; flex-direction: column; gap: 8px; text-align: center; }
  .bz-toolbar input[type=search] { width: 100%; }
}

.audited-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;padding:20px}.audited-controls label{display:flex;align-items:center;gap:8px;font-size:13px}.audited-options{display:flex;flex-wrap:wrap;gap:18px;align-items:end;padding:20px}.audited-options label{display:grid;gap:8px;font-size:12px}.audited-options input,.audited-options select{padding:9px;border:1px solid var(--line);border-radius:5px}.execution-health,#settings-revision,.execution-preview,#history-count{margin:16px 20px;font-size:12px;line-height:1.8}.execution-preview,.history-entry pre{white-space:pre-wrap;max-height:300px;overflow:auto;background:#f3f4ef;padding:14px}.pending-badge{font-size:10px;color:#8b6652;margin-left:8px}.bz-f[data-wired=""]{opacity:.65}.history-entry{padding:12px 20px;border-top:1px solid var(--line);font-size:12px;overflow-wrap:anywhere}.history-entry.error{border-left:3px solid #a45a3a}.history-entry summary{cursor:pointer;color:var(--muted)}
.native-task-state{display:block;font-size:11px;line-height:1.6;color:var(--muted);font-weight:400;margin-top:5px}.audited-controls label{align-items:flex-start}.audited-controls input[type=checkbox]{margin-top:3px}

#verification-panel table{border-collapse:collapse;width:100%;font-size:13px}#verification-panel th,#verification-panel td{text-align:left;vertical-align:top;padding:9px 12px;border-bottom:1px solid var(--border,#e2e8f0)}#verification-panel th{white-space:nowrap}#verification-panel details{margin-top:10px}#verification-panel summary{cursor:pointer}

/* Settings: one category at a time, generous checkbox targets. */
.settings-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);align-items:start;min-height:460px}
#bz-nav{position:sticky;top:12px;max-height:72vh;overflow-y:auto;padding:12px;border-right:1px solid var(--line);display:grid;gap:3px;background:#f7f9f3}
#bz-nav button{text-align:left;border:0;background:transparent;color:var(--ink);padding:10px 12px;border-radius:6px;font-size:13px;line-height:1.5;cursor:pointer}
#bz-nav button.active{background:var(--green);color:white;font-weight:600}
#bz-sections{min-width:0;padding:12px 16px;width:100%;box-sizing:border-box}
.bz-fields{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px 16px}
.bz-f.bz-check{display:flex;align-items:stretch;min-height:46px;border:1px solid var(--line);border-radius:7px;padding:0 10px;gap:8px;background:white}
.bz-f.bz-check input{width:19px;height:19px;flex:none;align-self:center;cursor:pointer;accent-color:var(--green)}
.bz-f.bz-check label{flex:1;cursor:pointer;padding:11px 0;line-height:1.6;font-size:13px}
.bz-f.bz-check:has(input:checked){background:#edf5e8;border-color:var(--green)}
.bz-f .wired{font-size:10px;margin-left:5px;white-space:nowrap}
.bz-toolbar{position:sticky;top:0;z-index:5;background:#fff;padding:12px 20px;border-bottom:1px solid var(--line)}
@media(max-width:760px){.settings-workspace{grid-template-columns:1fr}#bz-nav{position:static;display:flex;overflow:auto;max-height:130px;flex-wrap:wrap;border-right:0;border-bottom:1px solid var(--line)}#bz-nav button{white-space:nowrap;font-size:12px;padding:8px}.bz-fields{grid-template-columns:1fr}.bz-toolbar{flex-wrap:wrap}}

.bz-f .wired{display:none}

/* Explicit in-page confirmations remain visible even when native confirm is suppressed. */
.book-dialog{width:min(560px,calc(100vw - 32px));max-height:85vh;box-sizing:border-box;overflow:auto;padding:24px;border:1px solid #a28c62;border-radius:16px;background:#fffaf1;color:#332b24;box-shadow:0 18px 70px #0005;}
.book-dialog::backdrop{background:rgba(25,23,20,.6);}
.book-dialog h2{margin:0 0 16px;font-size:21px;}
.book-dialog-details{white-space:pre-wrap;line-height:1.75;margin:0 0 20px;}
.book-dialog-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;}
.book-dialog-actions button{min-height:44px;padding:10px 16px;}

/* Settings hierarchy: parent controls, nested choices, and independent groups. */
.bz-fields.bz-hierarchical{display:flex;flex-direction:column;gap:20px}
.bz-group{min-width:0;background:#fff;border:1px solid #d7e1dd;border-radius:12px;padding:16px}
.bz-group-title{font-size:15px;line-height:1.5;margin:0 0 12px;color:#244f40;font-weight:700}
.bz-group-fields,.bz-children{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(235px,100%),1fr));gap:10px 14px;align-items:start}
.bz-group-fields>.bz-group,.bz-group-fields>.bz-branch,.bz-children>.bz-branch{grid-column:1/-1}
.bz-group .bz-group{background:#f7faf8;padding:12px}
.bz-group .bz-f{min-width:0;margin:0}
.bz-group .bz-f select,.bz-group .bz-f input:not([type=checkbox]),.bz-group .bz-f textarea{max-width:100%;box-sizing:border-box}
.bz-parent{font-weight:650;flex-wrap:wrap;background:#f1f7f4!important;border-color:#bacfc4!important}
.bz-parent label{flex:1}
.bz-branch-state{display:block;flex-basis:100%;font-size:12px;line-height:1.5;font-weight:400;color:#416753;padding:0 12px 8px 38px}
.bz-children{margin:10px 0 0 20px;padding:4px 0 4px 16px;border-left:3px solid #9bbbad}
.bz-branch-off>.bz-children{border-left-color:#d4dad7;background:#fafbfa}
.bz-branch-off>.bz-parent .bz-branch-state{color:#69736d}
@media(max-width:760px){.bz-group{padding:12px}.bz-group-fields,.bz-children{grid-template-columns:minmax(0,1fr)}.bz-children{margin-left:8px;padding-left:10px}.bz-group .hero-action-box{flex-wrap:wrap}.bz-group .hero-action-box select{min-width:0;max-width:100%}}

.bz-hierarchy-note{font-size:13px;line-height:1.7;color:#65736a;margin:4px 0 16px}

.bz-children>.bz-group{grid-column:1/-1}

/* 抄書局：目標與消耗各一組；寬螢幕四項並列，窄螢幕兩欄。 */
.bz-children>.bz-group>.bz-group-fields:has(>.bz-f [data-bz^="cbxBookCopy"]){grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:760px){.bz-children>.bz-group>.bz-group-fields:has(>.bz-f [data-bz^="cbxBookCopy"]){grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 兵庫：強化對象與材料品質分組。 */
.bz-children>.bz-group>.bz-group-fields:has(>.bz-f [data-bz^="cbxWeaponBuildColorList"]){grid-template-columns:repeat(3,minmax(0,1fr))}
.bz-children>.bz-group>.bz-group-fields:has(>.bz-f [data-bz^="cbxWeaponDistroyColorList"]){grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:760px){.bz-children>.bz-group>.bz-group-fields:has(>.bz-f [data-bz^="cbxWeaponBuildColorList"]),.bz-children>.bz-group>.bz-group-fields:has(>.bz-f [data-bz^="cbxWeaponDistroyColorList"]){grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 溫泉三項依原介面獨立逐列；兵庫模式在品質分組上方逐列。 */
.bz-group-fields:has(>.bz-f [data-bz="cbxWq"]),#bz-children-cbxWeapon{grid-template-columns:minmax(0,1fr)}
