.chat-settings-summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0 8px;
  position: relative;
  z-index: 7;
}

.chat-setting-chip {
  min-width: 0;
  height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #30323b;
  border-radius: 12px;
  background: #121319;
  color: #f6f7f9;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.chat-setting-chip:hover,
.chat-settings-summary.is-open .chat-setting-chip:focus {
  border-color: #9fc52d;
  background: #171b12;
}

.chat-setting-chip:active { transform: translateY(1px); }
.chat-setting-chip span { color: #858894; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chat-setting-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.chat-setting-chip i { color: #c8f34a; font-size: 16px; font-style: normal; transition: transform .18s ease; }
.chat-settings-summary.is-open .chat-setting-chip:focus i { transform: rotate(180deg); }

.chat-settings-close {
  display: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #202127;
  color: #e7e8ec;
  font-size: 22px;
  cursor: pointer;
}

.chat-mode-panel.chameleon-compact-source { display: none; }
.chat-mode-panel.chameleon-compact-source.compact-open {
  display: block;
  position: relative;
  z-index: 6;
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid #30323b;
  border-radius: 16px;
  background: #0f1015;
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
}

.chat-mode-panel.compact-reply .mode-section:nth-child(2),
.chat-mode-panel.compact-style .mode-section:nth-child(1) { display: none; }

.chat-mode-panel.chameleon-compact-source .mode-heading { margin-bottom: 10px; }
.chat-mode-panel.chameleon-compact-source .model-options,
.chat-mode-panel.chameleon-compact-source .behavior-options { gap: 8px; }
.chat-mode-panel.chameleon-compact-source .model-options button,
.chat-mode-panel.chameleon-compact-source .behavior-options button { min-height: 76px; }

@media (max-width: 760px) {
  .chat-settings-summary { padding: 8px 0 6px; }
  .chat-setting-chip { flex: 1; width: calc(50% - 4px); height: 44px; padding: 0 10px; gap: 6px; }
  .chat-setting-chip span { display: none; }
  .chat-setting-chip b { font-size: 12px; }
  .chat-mode-panel.chameleon-compact-source.compact-open {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 90;
    max-height: min(72vh, 620px);
    overflow: auto;
    margin: 0;
    padding: 16px;
    border-radius: 20px;
    box-shadow: 0 -18px 60px rgba(0,0,0,.58);
  }
  .chat-settings-summary.is-open .chat-settings-close { display: block; position: fixed; right: 20px; bottom: min(68vh, 580px); z-index: 91; }
  .chat-mode-panel.chameleon-compact-source .model-options,
  .chat-mode-panel.chameleon-compact-source .behavior-options { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .chat-mode-panel.chameleon-compact-source .model-options,
  .chat-mode-panel.chameleon-compact-source .behavior-options { grid-template-columns: 1fr; }
}
