/*
 * ChampiDex Desktop Compatibility v1
 * Desktop-only visual adaptation of the existing legacy Builder DOM.
 * No mobile selectors. No behavior. No state/engine logic.
 */

@media (min-width: 821px) {
  .builder-page {
    padding: 28px 0 64px;
    background: #fbf8f1;
    color: #0d1b46;
  }

  .builder-page .container {
    width: min(1180px, calc(100% - 40px));
  }

  .builder-intro {
    max-width: 820px;
    margin-bottom: 22px;
  }

  .builder-intro h1 {
    margin: 4px 0 10px;
    color: #0b1841;
    font-size: clamp(38px, 4.2vw, 58px);
    line-height: 1.02;
    letter-spacing: -.04em;
  }

  .builder-intro p {
    max-width: 720px;
    color: #667085;
    font-size: 15px;
    line-height: 1.6;
  }

  .builder-toolbar {
    gap: 12px;
    margin: 18px 0 14px;
    padding: 12px 14px;
    border: 1px solid #e3e4ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .05);
  }

  .team-progress strong {
    color: #0d1b46;
    font-size: 20px;
  }

  .team-progress span {
    color: #667085;
    font-size: 12px;
  }

  .builder-toolbar button {
    border-color: #d9dce5;
    border-radius: 11px;
    background: #fff;
    color: #155eef;
    padding: 9px 13px;
  }

  .builder-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, .85fr);
    gap: 16px;
  }

  .builder-slot-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .builder-slot {
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .05);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  }

  .builder-slot:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .07);
  }

  .builder-slot[data-active="true"] {
    border-color: #5965f2;
    box-shadow:
      0 0 0 2px rgba(89, 101, 242, .10),
      0 10px 28px rgba(17, 24, 39, .07);
  }

  .builder-slot-head {
    margin-bottom: 8px;
  }

  .slot-number,
  .slot-status,
  .editor-autosave {
    color: #667085;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
  }

  .slot-select {
    min-height: 72px;
  }

  .slot-select strong {
    color: #0d1b46;
    font-size: 18px;
  }

  .slot-select span {
    margin-top: 6px;
    color: #667085;
    font-size: 12px;
  }

  .slot-select small {
    display: block;
    margin-top: 5px;
    color: #475467;
    font-size: 10px;
    line-height: 1.3;
  }

  .slot-actions {
    gap: 6px;
    margin-top: 10px;
  }

  .slot-actions button {
    min-width: 36px;
    border: 1px solid #e3e4ea;
    border-radius: 9px;
    background: #fff;
    padding: 7px 9px;
    color: #475467;
    font-weight: 800;
  }

  .builder-editor {
    position: sticky;
    top: 16px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #4f46e5;
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .06);
  }

  .editor-heading {
    margin-bottom: 14px;
  }

  .editor-heading h2 {
    color: #0d1b46;
    font-size: 24px;
  }

  .builder-form-grid {
    gap: 11px;
  }

  .builder-form-grid label {
    gap: 5px;
  }

  .builder-form-grid label > span {
    color: #475467;
    font-size: 11px;
  }

  .builder-form-grid input,
  .builder-editor select {
    border-color: #dfe3e8;
    border-radius: 10px;
    background: #fff;
    padding: 10px 11px;
    color: #101828;
  }

  .builder-form-grid input:focus,
  .builder-editor select:focus {
    border-color: #5965f2;
    box-shadow: 0 0 0 3px rgba(89, 101, 242, .10);
  }

  .builder-editor .set-section {
    margin-top: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    background: #fff;
  }

  .builder-editor .set-section > summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 13px;
    border-radius: 13px;
    background: linear-gradient(100deg, #1768ef, #6545ef 72%, #7b2de2);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .01em;
  }

  .builder-editor .set-section > summary::after {
    content: "＋";
    width: 25px;
    height: 25px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 18px;
    line-height: 1;
  }

  .builder-editor .set-section[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: linear-gradient(100deg, #1768ef, #6545ef 72%, #7b2de2);
  }

  .builder-editor .set-section[open] > summary::after {
    content: "−";
    background: rgba(255, 255, 255, .22);
    color: #fff;
  }

  .builder-editor .set-section-body {
    gap: 10px;
    margin-top: 0;
    padding: 12px;
    border-top: 1px solid #e8eaf0;
    background: #fff;
  }

  .builder-editor .battle-field {
    position: relative;
  }

  .builder-editor .battle-search-results {
    border-color: #dfe3e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
  }

  .builder-editor .battle-search-option:hover,
  .builder-editor .battle-search-option:focus-visible {
    background: #f4f6ff;
  }

  .builder-editor .battle-search-option strong {
    color: #101828;
  }

  .builder-editor .battle-search-option small {
    color: #667085;
  }

  .builder-editor .move-grid {
    gap: 8px;
  }

  .builder-editor .select-field select {
    border-color: #dfe3e8;
    border-radius: 10px;
    background: #fff;
    padding: 10px 11px;
  }

  .builder-editor .stat-row {
    grid-template-columns: 54px 1fr 1fr;
    gap: 7px;
  }

  .builder-editor .stat-row strong {
    color: #475467;
    font-size: 11px;
  }

  .builder-editor .stat-row input {
    border-color: #dfe3e8;
    border-radius: 9px;
    background: #fff;
  }

  .builder-editor .ev-meter {
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #dbe4ff;
    border-radius: 11px;
    background: #f4f7ff;
  }

  .builder-editor .ev-meter span {
    color: #155eef;
    font-weight: 850;
  }

  .builder-editor .ev-meter strong {
    min-width: 82px;
    padding: 5px 9px;
    border-radius: 999px;
    background: linear-gradient(100deg, #1768ef, #6545ef);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
  }

  .builder-editor .ev-meter strong[data-over="true"] {
    background: #b42318;
    color: #fff;
  }

  .builder-editor-note {
    margin-top: 14px;
    padding-top: 12px;
    border-top-color: #eceef2;
    color: #667085;
    font-size: 11px;
    line-height: 1.5;
  }

  .builder-save-row {
    margin-top: 10px;
    color: #667085;
    font-size: 11px;
  }

  .builder-page .m46-result-toggle {
    border-color: rgba(91, 33, 182, .22);
  }
}
