/* JoyJoy Bots — install choice UI v2
   Shared UI for TuneTune / Shieldy / Gamey.
   Server selector is full width, then two clear connection choices.
*/

#panel-bot-control .general-control-card.bot-install-choice-layout-v2 {
  --install-accent: #1597ff;
  --install-accent-strong: #0b79d0;
  --install-accent-soft: rgba(21,151,255,.08);
  position: relative;
  overflow: visible;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--install-accent) 18%, var(--account-border, #d0d7de));
  border-radius: 16px;
  background: var(--account-surface, #fff);
  box-shadow: 0 7px 22px rgba(26, 96, 156, .055);
}

#panel-bot-control .general-control-card.bot-install-choice-layout-v2[data-install-bot="shieldy"] {
  --install-accent: #2da44e;
  --install-accent-strong: #21863a;
  --install-accent-soft: rgba(45,164,78,.08);
}

#panel-bot-control .general-control-card.bot-install-choice-layout-v2[data-install-bot="gamey"] {
  --install-accent: #e83e82;
  --install-accent-strong: #c92f6a;
  --install-accent-soft: rgba(232,62,130,.08);
}

/* Remove the old two-column layout. */
#panel-bot-control .bot-install-choice-layout-v2 .general-control-grid.bot-install-choice-shell-v2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

/* Server selector — compact and full width. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-v2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  gap: 8px !important;
  min-width: 0;
  padding: 13px 14px !important;
  border: 1px solid color-mix(in srgb, var(--install-accent) 18%, var(--account-border, #d0d7de)) !important;
  border-radius: 13px !important;
  background: color-mix(in srgb, var(--account-surface, #fff) 97%, var(--install-accent) 3%) !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-head-v2 {
  display: grid;
  gap: 2px;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-head-v2 > small,
#panel-bot-control .bot-install-choice-layout-v2 #managed-server-hint {
  margin: 0;
  color: var(--account-muted, #667085);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}

#panel-bot-control .bot-install-choice-layout-v2 .control-context-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--account-text, #1f2328);
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.2;
}

#panel-bot-control .bot-install-choice-layout-v2 .control-context-label::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--install-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--install-accent) 12%, transparent);
}

#panel-bot-control .bot-install-choice-layout-v2 .managed-server-trigger-be58d3f52 {
  min-height: 50px !important;
  padding: 10px 48px 10px 14px !important;
  border: 1px solid color-mix(in srgb, var(--install-accent) 30%, var(--account-border, #d0d7de)) !important;
  border-radius: 11px !important;
  background: var(--account-surface, #fff) !important;
  box-shadow: none !important;
  font-size: 13.5px !important;
  font-weight: 900 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .managed-server-trigger-be58d3f52:hover:not(:disabled),
#panel-bot-control .bot-install-choice-layout-v2 .managed-server-trigger-be58d3f52:focus-visible,
#panel-bot-control .bot-install-choice-layout-v2 .managed-server-select-be58d3f52.is-open .managed-server-trigger-be58d3f52 {
  border-color: var(--install-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--install-accent) 12%, transparent) !important;
}

/* Keep the custom server dropdown inside the card instead of floating off-screen. */
#panel-bot-control .bot-install-choice-layout-v2 .managed-server-menu-be58d3f52 {
  position: static !important;
  inset: auto !important;
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 236px;
  margin: 8px 0 0 !important;
  box-sizing: border-box;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  box-shadow: 0 10px 28px rgba(13,25,43,.13) !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .managed-server-select-be58d3f52.is-open .managed-server-menu-be58d3f52 {
  display: block !important;
}

/* Main install area. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: none !important;
  gap: 12px !important;
  align-items: stretch !important;
  min-width: 0;
  padding: 14px !important;
  border: 1px solid color-mix(in srgb, var(--install-accent) 18%, var(--account-border, #d0d7de)) !important;
  border-radius: 13px !important;
  background: color-mix(in srgb, var(--account-surface, #fff) 98%, var(--install-accent) 2%) !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 {
  display: grid;
  gap: 3px;
  padding: 1px 1px 2px;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 > span {
  color: var(--install-accent-strong);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .085em;
  text-transform: uppercase;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 h3 {
  margin: 0;
  color: var(--account-text, #1f2328);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 950;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 p {
  margin: 0;
  max-width: 760px;
  color: var(--account-muted, #667085);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

/* Two equal connection choices. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2 {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-width: 0;
  min-height: 174px;
  padding: 14px;
  border: 1px solid var(--account-border, #d0d7de);
  border-radius: 13px;
  background: var(--account-surface, #fff);
  box-shadow: 0 3px 12px rgba(28, 52, 76, .035);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--install-accent) 30%, var(--account-border, #d0d7de));
  box-shadow: 0 7px 18px rgba(28,52,76,.065);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2.is-auto {
  border-color: color-mix(in srgb, var(--install-accent) 38%, var(--account-border, #d0d7de));
  background: linear-gradient(145deg, color-mix(in srgb, var(--install-accent) 6%, var(--account-surface, #fff)), var(--account-surface, #fff) 56%);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-top-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-icon-v2 {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--install-accent) 22%, var(--account-border, #d0d7de));
  border-radius: 11px;
  background: color-mix(in srgb, var(--install-accent) 8%, var(--account-surface, #fff));
  color: var(--install-accent-strong);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-icon-v2 svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-recommended-v2,
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-fallback-v2 {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-recommended-v2 {
  color: var(--install-accent-strong);
  background: color-mix(in srgb, var(--install-accent) 11%, var(--account-surface, #fff));
  border: 1px solid color-mix(in srgb, var(--install-accent) 23%, transparent);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-fallback-v2 {
  color: var(--account-muted, #667085);
  background: color-mix(in srgb, var(--account-muted, #667085) 6%, var(--account-surface, #fff));
  border: 1px solid color-mix(in srgb, var(--account-muted, #667085) 14%, var(--account-border, #d0d7de));
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-copy-v2 {
  display: grid;
  align-content: start;
  gap: 4px;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-copy-v2 h4 {
  margin: 0;
  color: var(--account-text, #1f2328);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-copy-v2 p {
  margin: 0;
  color: var(--account-muted, #667085);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.43;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-copy-v2 code {
  color: var(--install-accent-strong);
  font-weight: 900;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-button-v2 {
  width: 100%;
  min-height: 41px;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2.is-auto .primary {
  background: var(--install-accent) !important;
  border-color: var(--install-accent) !important;
  color: #fff !important;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--install-accent) 18%, transparent);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2.is-auto .primary:hover:not(:disabled) {
  filter: brightness(.96) saturate(1.03);
  transform: translateY(-1px);
}

/* Keep the requested two hints, but make them secondary to the choices. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-hints-v2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#panel-bot-control .bot-install-choice-layout-v2 .existing-bot-relink-note {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 10px 11px !important;
  border: 1px solid color-mix(in srgb, var(--install-accent) 17%, var(--account-border, #d0d7de)) !important;
  border-radius: 11px !important;
  background: color-mix(in srgb, var(--install-accent) 3.5%, var(--account-surface, #fff)) !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .existing-bot-relink-icon {
  width: 27px !important;
  height: 27px !important;
  flex: 0 0 27px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  background: color-mix(in srgb, var(--install-accent) 9%, var(--account-surface, #fff)) !important;
  color: var(--install-accent-strong) !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .existing-bot-relink-icon svg {
  width: 15px !important;
  height: 15px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .existing-bot-relink-copy {
  display: grid !important;
  gap: 2px !important;
  min-width: 0;
}

#panel-bot-control .bot-install-choice-layout-v2 .existing-bot-relink-copy strong {
  color: var(--account-text, #1f2328) !important;
  font-size: 11.8px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .existing-bot-relink-copy small {
  color: var(--account-muted, #667085) !important;
  font-size: 10.8px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
}

/* Waiting/checking panel. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-status-v2 {
  margin: 0 !important;
  border-radius: 12px !important;
  border-color: color-mix(in srgb, var(--install-accent) 24%, var(--account-border, #d0d7de)) !important;
  background: color-mix(in srgb, var(--install-accent) 4.5%, var(--account-surface, #fff)) !important;
}

/* Manual panel: one clean expanded area, not a card inside a card inside a card. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas: "copy actions" "result result" "hint hint" !important;
  gap: 10px 12px !important;
  margin: 0 !important;
  padding: 13px !important;
  border: 1px solid color-mix(in srgb, var(--install-accent) 30%, var(--account-border, #d0d7de)) !important;
  border-radius: 12px !important;
  background: color-mix(in srgb, var(--install-accent) 5%, var(--account-surface, #fff)) !important;
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--install-accent) 72%, transparent);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2[hidden] {
  display: none !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-kicker-v2 {
  color: var(--install-accent-strong);
  font-size: 9.8px;
  font-weight: 900;
  letter-spacing: .075em;
  line-height: 1.1;
  text-transform: uppercase;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-copy,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-copy {
  grid-area: copy !important;
  display: grid !important;
  align-content: center;
  gap: 3px !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-copy strong,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-copy strong {
  color: var(--account-text, #1f2328);
  font-size: 13px !important;
  font-weight: 950 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-copy small,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-copy small {
  color: var(--account-muted, #667085) !important;
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.4 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-actions,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-actions {
  grid-area: actions !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-actions button,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-actions button {
  min-height: 38px !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result {
  grid-area: result !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin: 0 !important;
  padding: 9px 10px !important;
  border: 1px solid color-mix(in srgb, var(--install-accent) 23%, var(--account-border, #d0d7de)) !important;
  border-radius: 10px !important;
  background: var(--account-surface, #fff) !important;
  box-shadow: none !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result[hidden] {
  display: none !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--install-accent-strong) !important;
  font-size: 14px !important;
  font-weight: 900;
  letter-spacing: .035em !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-hint,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-hint {
  grid-area: hint !important;
  margin: 0 !important;
  color: var(--account-muted, #667085) !important;
  font-size: 10.8px !important;
  font-weight: 650;
  line-height: 1.42 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-hint code,
#panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-hint code {
  color: var(--install-accent-strong) !important;
  font-weight: 900 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 #quick-link-message {
  margin: 0 !important;
}

/* Remove-server stays separate from the connection decision. */
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card {
  margin-top: 12px !important;
}

/* Dark mode. */
html[data-theme="dark"] #panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-v2,
html[data-theme="dark"] #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2,
html.dark #panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-v2,
html.dark #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2 {
  background: color-mix(in srgb, var(--account-surface-soft, #121d30) 96%, var(--install-accent) 4%) !important;
}

html[data-theme="dark"] #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2,
html.dark #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2 {
  background: var(--account-surface, #101a2c) !important;
}

html[data-theme="dark"] #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2.is-auto,
html.dark #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2.is-auto {
  background: linear-gradient(145deg, color-mix(in srgb, var(--install-accent) 9%, var(--account-surface, #101a2c)), var(--account-surface, #101a2c) 60%) !important;
}

html[data-theme="dark"] #panel-bot-control .bot-install-choice-layout-v2 .managed-server-trigger-be58d3f52,
html[data-theme="dark"] #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result,
html.dark #panel-bot-control .bot-install-choice-layout-v2 .managed-server-trigger-be58d3f52,
html.dark #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result {
  background: var(--account-surface, #101a2c) !important;
}

/* Tablet / phone. */
@media (max-width: 760px) {
  #panel-bot-control .general-control-card.bot-install-choice-layout-v2 {
    padding: 10px;
    border-radius: 14px;
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-v2,
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2 {
    padding: 12px !important;
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-grid-v2,
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-hints-v2 {
    grid-template-columns: minmax(0, 1fr);
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2 {
    min-height: 0;
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "copy" "actions" "result" "hint" !important;
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-actions,
  #panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-actions button,
  #panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-actions button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-manual-actions,
  #panel-bot-control .bot-install-choice-layout-v2 .tunetune-install-manual-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2 .quick-link-result > span {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* Selected mode feedback without extra JS. */
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2:has(.bot-install-choice-manual-v2:not([hidden])) .bot-install-choice-card-v2.is-manual {
  border-color: color-mix(in srgb, var(--install-accent) 48%, var(--account-border, #d0d7de));
  background: color-mix(in srgb, var(--install-accent) 5%, var(--account-surface, #fff));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--install-accent) 9%, transparent);
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2:has(.bot-install-choice-status-v2:not([hidden])) .bot-install-choice-card-v2.is-auto {
  border-color: var(--install-accent);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--install-accent) 12%, transparent);
}

/* FIX1 2026-09-04 — isolate the new install UI from legacy quick-link grid rules.
   Keep all direct sections horizontal and compact regardless of old cabinet bundles. */
#panel-bot-control .general-control-card.bot-install-choice-layout-v2 {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .general-control-grid.bot-install-choice-shell-v2 {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-server-v2 {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 12px !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2 {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 14px !important;
  border-left: 1px solid color-mix(in srgb, var(--install-accent) 18%, var(--account-border, #d0d7de)) !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-area-v2 > * {
  grid-area: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 > span,
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 h3,
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 p {
  display: block !important;
  width: auto !important;
  max-width: 850px !important;
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-head-v2 h3 {
  margin: 3px 0 4px !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-grid-v2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  align-items: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 10px !important;
  gap: 10px !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2 {
  width: 100% !important;
  height: auto !important;
  min-height: 172px !important;
  max-height: none !important;
  align-self: stretch !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-hints-v2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  align-items: start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  gap: 10px !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-hints-v2 > .existing-bot-relink-note {
  height: auto !important;
  min-height: 92px !important;
  align-self: stretch !important;
}

#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-status-v2,
#panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-manual-v2,
#panel-bot-control .bot-install-choice-layout-v2 .api-form-message {
  margin-top: 10px !important;
}

@media (max-width: 900px) {
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-grid-v2,
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-hints-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-choice-card-v2,
  #panel-bot-control .bot-install-choice-layout-v2 .bot-install-hints-v2 > .existing-bot-relink-note {
    min-height: 0 !important;
  }
}

/* FIX2 — remove-server card must not inherit unbounded SVG sizing after the
   TuneTune install layout switched away from .tunetune-server-control-v1. */
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
  min-height:72px!important;
  padding:14px 16px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card .remove-bot-server-copy{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0!important;
  flex:1 1 auto!important;
}
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card .remove-bot-server-icon{
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  max-width:38px!important;
  max-height:38px!important;
  overflow:hidden!important;
  border-radius:10px!important;
  box-sizing:border-box!important;
}
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card .remove-bot-server-icon svg{
  display:block!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card .remove-bot-server-text{
  display:grid!important;
  gap:3px!important;
  min-width:0!important;
  flex:1 1 auto!important;
}
#panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card .danger-solid{
  flex:0 0 auto!important;
  width:auto!important;
  max-width:220px!important;
  white-space:nowrap!important;
}
@media(max-width:680px){
  #panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  #panel-bot-control .bot-install-choice-layout-v2 > .remove-bot-server-card .danger-solid{
    width:100%!important;
    max-width:none!important;
  }
}
