#fox-desktop-shell { display: none; }

@media (min-width: 900px) {
  :root {
    --fox-bg: #121722;
    --fox-panel: #1a202c;
    --fox-panel-2: #1f2633;
    --fox-side: #202633;
    --fox-line: rgba(191, 96, 255, .28);
    --fox-line-soft: rgba(255, 255, 255, .08);
    --fox-text: #f7f4ff;
    --fox-muted: #9aa3b4;
    --fox-purple: #cf49ff;
    --fox-blue: #2f66ff;
    --fox-warn: #ffb120;
    --fox-radius: 8px;
    --fox-side-w: 244px;
  }

  html,
  body {
    width: 100% !important;
    min-width: 900px;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: var(--fox-bg) !important;
    color: var(--fox-text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  }

  body::before,
  body::after { content: none !important; display: none !important; }
  #app,
  uni-app,
  uni-page,
  uni-page-wrapper,
  uni-page-body,
  uni-tabbar {
    display: none !important;
  }
  #fox-desktop-shell { display: block; }
  #fox-desktop-shell * { box-sizing: border-box; }
  #fox-desktop-shell svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .fox-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--fox-side-w);
    padding: 28px 0;
    background: linear-gradient(180deg, rgba(103, 51, 129, .7), rgba(32, 38, 51, .98) 120px);
    border-right: 1px solid var(--fox-line-soft);
  }

  .fox-side-mark {
    position: absolute;
    left: 0;
    top: 48px;
    width: 4px;
    height: 60px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--fox-blue), var(--fox-purple));
    box-shadow: 0 0 22px rgba(207, 73, 255, .8);
  }

  .fox-side-item {
    width: 100%;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 28px;
    border: 0;
    background: transparent;
    color: #cbd3df;
    font: inherit;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
  }

  .fox-side-item:hover,
  .fox-side-item:first-of-type {
    background: rgba(137, 74, 173, .28);
    color: #fff;
  }

  .fox-side-spacer { height: 28px; }

  .fox-workbench {
    position: fixed;
    inset: 0 0 0 var(--fox-side-w);
    overflow: auto;
    padding: 28px 36px 42px;
    background:
      radial-gradient(circle at 48% 0, rgba(149, 70, 222, .22), transparent 250px),
      linear-gradient(180deg, #111722 0, #141923 100%);
  }

  .fox-modebar {
    position: sticky;
    z-index: 10;
    top: 0;
    width: max-content;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 56px;
    padding: 8px 30px;
    border: 1px solid rgba(200, 98, 255, .55);
    border-radius: 26px;
    background: rgba(31, 38, 51, .88);
    box-shadow: 0 0 26px rgba(177, 69, 255, .32);
    backdrop-filter: blur(8px);
  }

  .fox-mode,
  .fox-clear,
  .fox-flow-card button,
  .fox-flow-card select,
  .fox-flow-card input,
  .fox-flow-card textarea {
    font: inherit;
  }

  .fox-mode {
    height: 31px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 3px;
    background: rgba(22, 27, 38, .75);
    color: #fff;
    cursor: pointer;
  }
  .fox-mode.is-active { background: linear-gradient(90deg, var(--fox-blue), var(--fox-purple)); }
  .fox-mode-help { width: 31px; padding: 0; justify-content: center; border-radius: 50%; }

  .fox-clear {
    position: fixed;
    top: 33px;
    right: 36px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--fox-line);
    border-radius: 6px;
    background: rgba(31, 38, 51, .86);
    color: #fff;
    cursor: pointer;
  }

  .fox-top-actions {
    position: fixed;
    z-index: 20;
    top: 33px;
    right: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .fox-top-actions .fox-clear {
    position: static;
  }

  .fox-workbench-link {
    height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid rgba(200, 98, 255, .45);
    border-radius: 6px;
    background: rgba(31, 38, 51, .86);
    color: #fff;
    text-decoration: none;
  }

  .fox-project-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 1280px;
    margin: -36px 0 16px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    background: rgba(20, 25, 36, .72);
    color: #bfc8d8;
    font-size: 13px;
  }

  .fox-step-strip {
    min-width: 1280px;
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 8px;
    margin: 0 0 16px;
  }

  .fox-step-pill {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 7px;
    background: rgba(20, 25, 36, .7);
    color: #c7d0df;
    font-size: 12px;
  }

  .fox-step-pill b {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 12px;
  }

  .fox-step-pill em {
    margin-left: auto;
    color: #8893a6;
    font-style: normal;
    white-space: nowrap;
  }

  .fox-step-pill.is-running {
    border-color: rgba(86, 136, 255, .65);
    box-shadow: 0 0 18px rgba(86, 136, 255, .16);
  }

  .fox-step-pill.is-running b {
    background: linear-gradient(90deg, #2d68ff, #ef4dff);
  }

  .fox-step-pill.is-done {
    border-color: rgba(83, 230, 143, .38);
  }

  .fox-step-pill.is-done b {
    background: rgba(83, 230, 143, .22);
    color: #9ff1bd;
  }

  .fox-step-pill.is-danger {
    border-color: rgba(255, 92, 120, .5);
  }

  .fox-step-pill.is-danger b {
    background: rgba(255, 92, 120, .22);
    color: #ff9aaa;
  }

  .fox-step-pill.is-stale {
    border-color: rgba(255, 176, 32, .48);
  }

  .fox-grid {
    display: grid;
    grid-template-columns: minmax(360px, .86fr) minmax(360px, .86fr) minmax(640px, 1.55fr);
    gap: 12px;
    min-width: 1280px;
  }

  .fox-col {
    display: grid;
    gap: 12px;
    align-content: start;
  }

  .fox-bottom-row {
    display: grid;
    grid-template-columns: 1fr .78fr;
    gap: 12px;
  }

  .fox-flow-card {
    min-height: 220px;
    border: 1px solid var(--fox-line);
    border-radius: var(--fox-radius);
    background: rgba(27, 33, 45, .97);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 40px rgba(0,0,0,.18);
    overflow: hidden;
  }

  .fox-card-head {
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(31, 38, 51, .88);
    border-bottom: 1px solid var(--fox-line-soft);
  }

  .fox-card-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
  }

  .fox-card-title > button {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c8d0df;
  }

  .fox-card-icon {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #2f66ff, #ec4dff);
    box-shadow: 0 0 18px rgba(207, 73, 255, .35);
  }

  .fox-card-link {
    border: 0;
    background: transparent;
    color: #e161ff;
    cursor: pointer;
  }

  .fox-card-body {
    padding: 18px 20px 22px;
  }

  .fox-mini-tabs {
    display: flex;
    gap: 44px;
    margin: 4px 0 22px;
    color: #d9e0ef;
    font-size: 16px;
  }
  .fox-mini-tabs span { padding-bottom: 13px; border-bottom: 2px solid transparent; }
  .fox-mini-tabs .is-active { color: #fff; border-color: #bb4dff; }

  .fox-flow-card label {
    display: block;
    margin: 13px 0 8px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
  }

  .fox-flow-card input,
  .fox-flow-card select,
  .fox-flow-card textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(204, 90, 255, .42);
    border-radius: 5px;
    background: #171c27;
    color: #f6f2ff;
    outline: none;
  }
  .fox-flow-card input,
  .fox-flow-card select { height: 36px; padding: 0 12px; }
  .fox-flow-card textarea {
    min-height: 214px;
    resize: vertical;
    padding: 14px;
    line-height: 1.6;
  }

  .fox-inline { display: flex; align-items: center; gap: 8px; }
  .fox-inline input,
  .fox-inline select { flex: 1; }

  .fox-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
  }

  .fox-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .fox-actions {
    display: flex;
    gap: 10px;
    margin: 12px 0;
  }

  .fox-gradient,
  .fox-warn,
  .fox-secondary,
  .fox-icon-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
  }
  .fox-gradient {
    padding: 0 22px;
    background: linear-gradient(90deg, #2d68ff, #ef4dff);
    box-shadow: 0 8px 20px rgba(88, 88, 255, .22);
  }
  .fox-warn { flex: 1; background: #ffb022; color: #fff; }
  .fox-secondary { flex: 1; background: #202839; border: 1px solid rgba(255,255,255,.12); }
  .fox-wide { width: 100%; margin: 14px 0 2px; }
  .fox-icon-btn { width: 44px; padding: 0; background: #171c27; border: 1px solid rgba(204, 90, 255, .42); }
  .fox-flow-card button:disabled {
    opacity: .62;
    cursor: wait;
  }

  .fox-result {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 6px;
    background: rgba(17, 22, 33, .68);
    color: #b9c3d4;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
  }

  .fox-result strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
  }

  .fox-result ul {
    margin: 6px 0 0;
    padding-left: 18px;
  }

  .fox-empty,
  .fox-preview,
  .fox-cover {
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(220, 111, 255, .6);
    background: rgba(25, 31, 43, .65);
    color: #b8c1d2;
  }
  .fox-empty { min-height: 118px; border-radius: 7px; padding: 20px; }
  .fox-empty-tall { min-height: 180px; }
  .fox-empty svg,
  .fox-preview svg {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    color: #f5f7ff;
  }
  .fox-empty strong,
  .fox-preview strong { display: block; color: #dce3f0; font-weight: 500; }
  .fox-empty span,
  .fox-preview span { display: block; margin-top: 7px; font-size: 12px; color: #7f899a; }

  .fox-empty audio,
  .fox-empty video,
  .fox-preview video {
    width: 100%;
    max-height: 360px;
  }

  .audio-wide {
    width: 100%;
  }

  .fox-compose {
    display: grid;
    grid-template-columns: minmax(430px, .95fr) minmax(300px, .85fr);
    gap: 26px;
  }
  .fox-preview {
    min-height: 395px;
    height: calc(100% - 25px);
    border-radius: 8px;
  }

  .fox-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    color: #c7d0df;
    font-size: 13px;
  }
  .fox-checks button {
    height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 4px;
    background: #202839;
    color: #f5f7ff;
  }
  .fox-switch {
    width: 25px;
    height: 14px;
    border-radius: 99px;
    background: #dfe5ee;
    position: relative;
  }
  .fox-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
  }
  .fox-switch.is-on { background: linear-gradient(90deg, #208fff, #55d1ff); }
  .fox-switch.is-on::after { left: 14px; }
  .fox-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
  }

  .fox-cover-row {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: start;
  }
  .fox-cover {
    height: 90px;
    border-radius: 5px;
  }
  .fox-cover svg { width: 28px; height: 28px; }
  .fox-cover span { color: #96a0b0; font-size: 12px; }

  .fox-radio {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 30px;
    color: #d9e0ef;
  }
  .fox-radio span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.8);
  }
  .fox-radio.is-on span {
    border-color: #e452ff;
    background: #e452ff;
  }

  .fox-toast {
    position: fixed;
    z-index: 40;
    right: 36px;
    bottom: 32px;
    max-width: 460px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    background: rgba(12, 16, 24, .95);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,.38);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    white-space: pre-wrap;
  }

  .fox-toast.is-show {
    opacity: 1;
    transform: translateY(0);
  }

  .fox-toast.success { border-color: rgba(83, 230, 143, .45); }
  .fox-toast.warn { border-color: rgba(255, 176, 32, .5); }
  .fox-toast.danger { border-color: rgba(255, 92, 120, .56); }
}

@media (min-width: 900px) and (max-width: 1350px) {
  :root { --fox-side-w: 86px; }
  .fox-side-item span { display: none; }
  .fox-side-item { justify-content: center; padding: 0; }
  .fox-grid { grid-template-columns: 380px 380px 660px; }
}

@media (max-width: 899px) {
  #fox-desktop-shell { display: none !important; }
}




@media (min-width: 900px) {
  .fox-module-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(17, 22, 33, .72);
    color: #c8d2e2;
    font-size: 12px;
    line-height: 1.55;
  }
  .fox-module-note strong {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
  }
  .fox-module-note span { color: #aeb9ca; }
  .fox-module-note.is-ready strong { background: rgba(83, 230, 143, .22); color: #a9f4c3; }
  .fox-module-note.is-queued strong { background: rgba(255, 176, 32, .24); color: #ffd28a; }
  .fox-module-note.is-pending strong { background: rgba(255, 92, 120, .22); color: #ffacb9; }
  .fox-result-hint {
    display: block;
    margin-top: 8px;
    color: #ffcf8a !important;
    font-size: 12px;
  }
}
