:root {
  --bg: #0e1218;
  --panel: #161c26;
  --panel2: #1c2431;
  --line: #2a3545;
  --text: #e8eef6;
  --muted: #8b9bb0;
  --accent: #d4a017;
  --ally: #2f8f6b;
  --enemy: #c45c4a;
  --radius: 10px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --left: 280px;
  --right: 300px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2433 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1f1810 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(900px 500px at 20% 0%, #1a2433 0%, transparent 55%),
    rgba(8, 10, 14, 0.92);
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-card {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 18px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.auth-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 10px;
  text-decoration: none;
}

.auth-buy[hidden] {
  display: none !important;
}

.admin-create {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.user-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.user-badge.member {
  border-color: #d4a01766;
  color: var(--accent);
  background: #2a2210;
}

.user-badge.admin {
  border-color: #3d7eff66;
  color: #8eb6ff;
  background: #121a2a;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.admin-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-name {
  font-weight: 600;
}

.admin-role {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-duration {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-custom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-months {
  width: 72px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.admin-modal-panel {
  width: min(720px, 100%);
  max-height: min(86vh, 760px);
}

.admin-modal-panel .admin-list {
  flex: 1;
  overflow: auto;
  margin-top: 4px;
  padding-right: 2px;
}

.admin-actions .ghost {
  font-size: 0.78rem;
  padding: 4px 8px;
}

.admin-actions .ghost.danger {
  color: #e88;
  border-color: #e886;
}

#app-main[hidden] {
  display: none !important;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mode-nav {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e1218;
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.on {
  background: var(--panel);
  color: var(--accent);
  font-weight: 700;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr) var(--right);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}

.layout[hidden] {
  display: none !important;
}

.practice-roles {
  margin: 8px 0;
  flex-wrap: wrap;
}

.layout-practice .side-left .card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.practice-hero-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.practice-hero-list-sm {
  flex: none;
  max-height: min(28vh, 220px);
}

.practice-hero-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: 1px solid transparent;
  background: #121820;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.preset-mark {
  flex: none;
  font-size: 0.7rem;
  color: #c4a35a;
  letter-spacing: 0.04em;
}

.practice-hero-btn:hover {
  border-color: var(--line);
  background: var(--panel2);
}

.practice-hero-btn.on {
  border-color: #d4a01788;
  background: #1a160e;
  color: #f0c14b;
  font-weight: 600;
}

.practice-hero-title h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.skill-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-card {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #121820;
}

.skill-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.skill-slot {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

.skill-tag {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1e3a2f;
  color: #7dcea0;
}

.skill-tag.muted {
  background: #1c2431;
  color: var(--muted);
}

.skill-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}

.skill-combo-note {
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.skill-combo-lab {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c4a35a;
  letter-spacing: 0.04em;
}

.combo-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.combo-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #121820;
}

.combo-item.curated {
  border-color: #d4a01766;
  background: #1a160e;
}

.combo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.combo-idx {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #243044;
  font-size: 0.75rem;
  font-weight: 700;
}

.combo-tag {
  color: #f0c14b;
  font-weight: 700;
  font-size: 0.86rem;
}

.combo-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #d4a01733;
  color: #f0c14b;
}

.combo-chain {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.55;
  color: #f0c14b;
}

.combo-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.mech-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mech-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.mech-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mech-name {
  font-weight: 700;
  margin-bottom: 6px;
}

.mech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.mech-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #d4a01766;
  color: #f0c14b;
}

.mech-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
}

.mech-row .skill-desc {
  margin-top: 8px;
}

.combo-branch {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid #d4a017;
  background: #121820;
}

.combo-branch-from {
  font-weight: 700;
  margin-bottom: 6px;
}

.combo-branch ul {
  margin: 0;
  padding-left: 1.1em;
}

.combo-branch li {
  margin: 0 0 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.combo-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 12px;
}

.combo-step {
  min-width: 120px;
  max-width: 200px;
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d4a01766;
  background: #0e1218;
}

.combo-step-n {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.combo-step-do {
  display: block;
  font-weight: 700;
  color: #f0c14b;
  font-size: 0.88rem;
  line-height: 1.4;
}

.combo-step-cond {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.combo-step-arrow {
  align-self: center;
  color: #f0c14b;
  font-weight: 700;
}

.combo-teach {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.combo-teach div {
  margin: 0;
}

.combo-teach dt {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 2px;
}

.combo-teach dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.practice-side-h {
  margin: 12px 0 6px;
  font-size: 0.82rem;
  color: var(--accent);
}

.dont-list {
  color: #f0a79c;
}

.side,
.main-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.side-left,
.side-right {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 70px);
  overflow: auto;
}

.main-center {
  min-width: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.card-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.hero-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: auto;
  padding: 2px;
}

.modal-hero-list {
  max-height: min(52vh, 420px);
  margin-top: 4px;
}

.hero-chip {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.hero-chip:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-chip.selected {
  border-color: var(--accent);
  background: #2a2210;
  color: var(--accent);
}

.hero-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 弹窗 */
body.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1rem;
}

.modal-sub {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.role-tab {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.role-tab:hover {
  border-color: #5a6a80;
}

.role-tab.on {
  border-color: var(--accent);
  background: #2a2210;
  color: var(--accent);
}

.modal-empty {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.88rem;
  width: 100%;
}

.modal-foot {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.result-head h2 {
  margin: 0;
}

input[type="password"] {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.deepseek-box {
  margin-top: 14px;
  padding: 0;
  border: none;
  background: transparent;
}

.deepseek-head {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d4a01755;
  background: #1a160e;
}

.deepseek-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--accent);
}

.ds-modules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ds-module {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.ds-module-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.ds-module-body h5 {
  margin: 10px 0 4px;
  font-size: 0.85rem;
  color: #c9b27a;
}

.ds-module-body p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.ds-module-body ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}

.ds-module-body li {
  margin: 0 0 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.handbook {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.hb-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e1218;
}

.hb-nav-btn {
  flex: 1 1 auto;
  min-width: 5.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: #d7dde8;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.hb-nav-btn:hover {
  color: #fff;
  background: #1a2130;
}

.hb-nav-btn.on {
  background: #2a2210;
  border-color: #d4a01788;
  color: #f0c14b;
  font-weight: 700;
}

.hb-stage {
  min-height: 0;
}

.hb-card[hidden] {
  display: none !important;
}

.hb-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

.hb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel2, #161a22);
}

.hb-card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.hb-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.hb-tag.engage {
  color: #f0b27a;
  border-color: #c47a3a66;
  background: #2a1c12;
}

.hb-tag.counter {
  color: #8fd6b5;
  border-color: #2f8f6b55;
  background: #12201a;
}

.hb-tag.stall {
  color: #a8b4c8;
  border-color: #8b9bb055;
  background: #1a1f27;
}

.hb-card-body {
  padding: 12px 14px 14px;
}

.hb-summary {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.hb-summary-em {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  font-weight: 600;
}

.hb-key,
.ds-module-body strong.hb-key {
  color: #f0c14b;
  font-weight: 700;
}

.hb-keyline {
  padding-left: 2px;
}

.item-core {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
}

.item-name {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #3d8bfd88;
  background: #122033;
  color: #8ec5ff;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ds-module-body .item-name {
  margin: 0 2px;
  vertical-align: baseline;
}

.item-arrow {
  color: #f0c14b;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 2px;
}

.item-or {
  color: var(--muted);
  margin: 0 2px;
  font-size: 0.8rem;
}

.ming-name {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #c084fc88;
  background: #1a1228;
  color: #e9d5ff;
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
}

.hb-focus-ming {
  border-color: #c084fc66;
  background: #16101f;
  margin-top: 10px;
}

.hb-focus-ming h4 {
  color: #e9d5ff;
}

.ming-list {
  margin: 0;
  padding-left: 1.1em;
}

.hb-focus-items {
  border-color: #3d8bfd66;
  background: #0f1824;
}

.hb-focus-items h4 {
  color: #8ec5ff;
}

.hb-focus-basic {
  border-color: #d4a01766;
}

.hb-sub + .hb-sub {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.hb-sub h4,
.hb-tab-panel h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.hb-card-body ul {
  margin: 0;
  padding-left: 1.15em;
}

.hb-card-body li {
  margin: 0 0 5px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hb-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0e1218;
}

.hb-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.hb-tab.on {
  background: var(--panel);
  color: var(--accent);
  font-weight: 600;
}

.hb-tab-panel[hidden] {
  display: none !important;
}

.hb-focus {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d4a01766;
  background: #1a160e;
}

.hb-focus h4 {
  margin: 0 0 8px;
  color: #f0c14b;
}

.hb-focus ul {
  margin: 0;
}

.hb-subhead {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--accent);
}

.hb-fight-extra {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ds-module-body h5 {
  margin: 12px 0 6px;
  padding: 4px 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0c14b;
  border-bottom: 1px solid #d4a01744;
}

.error-line {
  color: #f0a79c;
  font-size: 0.9rem;
}

.result-head h2 {
  margin: 0;
}

#result {
  flex: 1;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge.ally {
  color: #8fd6b5;
  border-color: #2f8f6b55;
}

.badge.enemy {
  color: #f0a79c;
  border-color: #c45c4a55;
}

.slots-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.slot {
  min-height: 48px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel2);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 10px;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.slot .lane-tag {
  flex: 0 0 auto;
  min-width: 52px;
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid #d4a01744;
  background: #2a2210;
  border-radius: 6px;
  padding: 3px 6px;
  text-align: center;
}

.slot .slot-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lane-readonly {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.92rem;
  color: var(--accent);
}

.slot:hover,
.slot.active {
  border-color: var(--accent);
  background: #241e12;
}

.slot.filled {
  border-style: solid;
  border-color: #3d4b5f;
}

.slot .name {
  font-size: 0.86rem;
}

.slot .hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

input[type="search"],
select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label,
.tag-group label.title {
  font-size: 0.75rem;
  color: var(--muted);
}

.tags {
  display: grid;
  gap: 12px;
}

.tag-group label.title {
  display: block;
  margin-bottom: 6px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.seg button.on {
  border-color: var(--accent);
  background: #2a2210;
  color: var(--accent);
}

button.primary,
a.primary {
  background: var(--accent);
  color: #1a1408;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.result-mode {
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.result-mode.engage {
  background: #2a210f;
  border-color: #d4a01766;
}

.result-mode.counter {
  background: #132230;
  border-color: #3d7ea666;
}

.result-mode.stall {
  background: #1a1f27;
  border-color: #8b9bb055;
}

.result-mode h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.result-mode p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.block {
  margin-top: 14px;
}

.block h4 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.block ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.side-hint {
  margin: -4px 0 10px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.focus-banner {
  opacity: 0.95;
}

.focus-banner h3 {
  font-size: 1.05rem;
}

.muted-line {
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 24px 0;
  text-align: center;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-left,
  .side-right {
    position: static;
    max-height: none;
  }

  .slots-col {
    grid-template-columns: repeat(5, 1fr);
  }
}
