:root {
  --ink: #15171a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #f6f7fb;
  --panel: #ffffff;
  --red: #dc2626;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #b45309;
  --green: #15803d;
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(248, 252, 255, 0.96), rgba(245, 247, 255, 0.93) 46%, rgba(255, 248, 248, 0.94)),
    repeating-linear-gradient(90deg, rgba(6, 182, 212, 0.08) 0, rgba(6, 182, 212, 0.08) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(124, 58, 237, 0.055) 0, rgba(124, 58, 237, 0.055) 1px, transparent 1px, transparent 42px),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

body.importing {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(103, 232, 249, 0.2);
  background:
    linear-gradient(180deg, rgba(10, 15, 28, 0.95), rgba(17, 24, 39, 0.92)),
    #111827;
  backdrop-filter: blur(18px);
  color: #e5faff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #06b6d4 62%, #7c3aed);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}

.brand-block h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.brand-block p {
  margin: 5px 0 0;
  color: #9ca3af;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 750;
}

.nav-list a:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #ecfeff;
}

.nav-list a.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.92), rgba(124, 58, 237, 0.88));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.22);
}

.nav-list a[data-nav-scope="project"] {
  margin-left: 0;
  padding-left: 12px;
  font-size: 15px;
}

.nav-list a[data-nav-scope="project"]::before {
  display: none;
}

[data-view][hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.side-status {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
}

.dot.ok {
  background: #22c55e;
}

.dot.bad {
  background: #ef4444;
}

.main {
  min-width: 0;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.band {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.82)),
    rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(6, 182, 212, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(18px);
}

.workspace-stack {
  display: block;
  min-width: 0;
}

.workspace-stack[hidden] {
  display: none;
}

.workspace-section {
  scroll-margin-top: 92px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.primary-btn,
.secondary-btn,
.mini-btn,
.danger-btn {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(135deg, #0f172a, #155e75);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.secondary-btn {
  border: 1px solid rgba(6, 182, 212, 0.26);
  background: rgba(255, 255, 255, 0.76);
  color: #0f172a;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.mini-btn,
.clone-btn,
.download-plugin-btn {
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.mini-btn:hover,
.clone-btn:hover,
.download-plugin-btn:hover {
  transform: translateY(-1px);
}

.yellow-btn {
  background: #facc15;
  color: #3f2f00;
}

.yellow-btn:hover {
  background: #eab308;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #111827, #0891b2);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.2);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.mini-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.secondary-btn,
.mini-btn {
  border: 1px solid rgba(6, 182, 212, 0.24);
  background: rgba(255, 255, 255, 0.76);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.secondary-btn:hover,
.mini-btn:hover {
  background: rgba(236, 254, 255, 0.9);
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.14);
}

.danger-btn {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.danger-btn:hover {
  background: #ffe4e6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.project-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-board {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.project-board-actions {
  display: flex;
  justify-content: flex-end;
}

.project-editor {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.project-editor h3 {
  margin: 0;
  font-size: 17px;
}

.platform-picker {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
}

.platform-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.platform-picker-head > div {
  min-width: 0;
}

.platform-picker-head strong {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
}

.field-hint {
  margin-left: 8px;
  color: #b45309;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.platform-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.platform-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.platform-group.domestic {
  border-left: 4px solid #ef4444;
  background: #fff;
}

.platform-group.international {
  border-left: 4px solid #10b981;
  background: #fff;
}

.platform-group-title {
  display: none;
}

.platform-group.domestic .platform-group-title {
  color: #b42318;
}

.platform-group.international .platform-group-title {
  color: #047857;
}

.platform-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 14px;
  align-items: center;
}

.platform-chip {
  min-height: 116px;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #1f2937;
  font-weight: 850;
  cursor: pointer;
}

.platform-logo-only span:not(.platform-logo):not(.platform-logo-fallback) {
  display: none;
}

.platform-logo {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #111827;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
}

.platform-chip .platform-logo {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  font-size: 24px;
}

.platform-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 2px;
}

.platform-chip .platform-logo img {
  padding: 8px;
}

.platform-logo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #111827;
  color: #fff;
}

.platform-logo-fallback[hidden] {
  display: none;
}

.platform-chip:hover,
.platform-chip.active {
  border-color: #111827;
  background: #f9fafb;
  color: #111827;
}

.platform-chip small {
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(4, 120, 87, 0.1);
  color: #047857;
  font-size: 11px;
  font-weight: 850;
}

.local-field[hidden] {
  display: none;
}

.project-platform-field {
  position: relative;
}

.native-platform-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.platform-select {
  position: relative;
  margin-top: 6px;
}

.platform-select-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(231, 184, 104, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 249, 237, 0.95);
  color: #24190f;
  text-align: left;
}

.platform-select-current,
.platform-select-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.platform-select-current > span:last-child,
.platform-select-option > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.platform-select-arrow {
  flex: 0 0 auto;
  color: #8a5515;
  font-size: 18px;
  line-height: 1;
}

.platform-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 330px;
  overflow: auto;
  border: 1px solid rgba(231, 184, 104, 0.38);
  border-radius: 8px;
  padding: 8px;
  background: rgba(29, 20, 12, 0.98);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.platform-select-option {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  padding: 8px;
  color: #f8ead2;
  background: transparent;
}

.platform-select-option:hover,
.platform-select-option.active {
  background: rgba(245, 180, 74, 0.16);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.project-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.project-card:hover,
.project-card.active {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.project-card.delete-mode {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.project-card.selected-delete {
  border-color: #ef4444;
  background: #fff1f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.project-delete-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: #991b1b;
  font-size: 12px;
  font-weight: 900;
}

.project-delete-control input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.project-card-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.project-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-card-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-main strong,
.project-card-main span,
.project-card-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-main span,
.project-card-main small {
  color: var(--muted);
}

.platform-pill {
  width: fit-content;
  max-width: 100%;
  border-radius: 8px;
  padding: 3px 9px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 850;
}

.project-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.section-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.api-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.api-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 1fr) 78px;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.api-row:last-child {
  border-bottom: 0;
}

.api-row > div {
  display: grid;
  gap: 3px;
}

.api-row span,
.endpoint-row span {
  color: var(--muted);
  font-size: 12px;
}

.api-row code,
.endpoint-row code {
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 12px;
}

.api-status {
  justify-self: end;
  min-width: 66px;
  border-radius: 999px;
  padding: 6px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.api-status.connected {
  background: #dcfce7;
  color: #166534;
}

.api-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.settings-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.settings-section h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.endpoint-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.endpoint-row {
  display: grid;
  grid-template-columns: 110px minmax(260px, 1fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.endpoint-row:last-child {
  border-bottom: 0;
}

.endpoint-row b {
  color: var(--teal);
  font-size: 12px;
}

.endpoint-head {
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd6e2;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.url-input {
  resize: vertical;
  min-height: 130px;
}

.status-line {
  margin-top: 12px;
  min-height: 24px;
  color: var(--muted);
}

.status-line.error {
  color: var(--red);
}

.status-line.ok {
  color: var(--green);
}

.install-alert {
  margin-bottom: 14px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  padding: 14px 16px;
  background:
    linear-gradient(90deg, rgba(17,24,39,0.98), rgba(31,41,55,0.96)),
    #111827;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.install-alert strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.install-alert span {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.install-alert .primary-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #ef4444;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.25);
}

.install-alert .primary-btn:hover {
  background: #dc2626;
}

.plugin-install-panel {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.38);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.plugin-install-toggle {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  list-style: none;
  cursor: pointer;
  background:
    linear-gradient(90deg, #dc2626, #ef4444 48%, #fb7185);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.plugin-install-toggle::-webkit-details-marker {
  display: none;
}

.plugin-install-toggle::after {
  content: "展开";
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.plugin-install-panel[open] .plugin-install-toggle::after {
  content: "收起";
}

.plugin-install-content {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(18, 30, 56, 0.92)),
    repeating-linear-gradient(90deg, rgba(34, 211, 238, 0.08) 0, rgba(34, 211, 238, 0.08) 1px, transparent 1px, transparent 36px);
}

.plugin-install-panel:not([open]) .plugin-install-content {
  display: none;
}

.plugin-install-panel[open] .plugin-install-content {
  display: block;
}

.plugin-install-hero {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  background:
    linear-gradient(110deg, rgba(8, 13, 28, 0.72) 0%, rgba(15, 23, 42, 0.62) 58%, rgba(127, 29, 29, 0.5) 100%),
    repeating-linear-gradient(45deg, rgba(34, 211, 238, 0.08) 0, rgba(34, 211, 238, 0.08) 1px, transparent 1px, transparent 18px);
}

.plugin-install-hero h3 {
  margin: 0 0 8px;
  font-size: 23px;
  line-height: 1.2;
  color: #f8fafc;
}

.plugin-install-hero .eyebrow {
  color: #67e8f9;
}

.plugin-install-hero p:not(.eyebrow) {
  max-width: 580px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.download-plugin-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 0 18px;
  background: #dc2626;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2);
}

.download-plugin-btn:hover {
  background: #b91c1c;
}

.browser-support,
.install-steps {
  padding: 16px 18px 18px;
}

.browser-support {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.install-steps {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.36);
}

.browser-support h4,
.install-steps h4 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #e0f2fe;
}

.support-table {
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.support-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 96px minmax(190px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
  font-size: 13px;
}

.support-row:last-child {
  border-bottom: 0;
}

.support-head {
  min-height: 38px;
  background: rgba(34, 211, 238, 0.12);
  color: #ecfeff;
  font-weight: 900;
}

.support-ok,
.support-warn,
.support-no {
  width: fit-content;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 900;
}

.support-ok {
  background: #dcfce7;
  color: #166534;
}

.support-warn {
  background: #fef3c7;
  color: #92400e;
}

.support-no {
  background: #fee2e2;
  color: #991b1b;
}

.install-steps ol {
  margin: 0;
  padding-left: 22px;
  color: #dbeafe;
  line-height: 1.8;
}

.platform-filter-panel {
  margin-bottom: 12px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.93), rgba(8, 47, 73, 0.82)),
    repeating-linear-gradient(90deg, rgba(103, 232, 249, 0.08) 0, rgba(103, 232, 249, 0.08) 1px, transparent 1px, transparent 34px);
  box-shadow: 0 16px 36px rgba(8, 47, 73, 0.18);
  color: #f8fafc;
}

.platform-filter-panel > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.platform-filter-panel > div:first-child strong {
  margin-right: auto;
  color: #ecfeff;
  font-size: 18px;
}

.platform-filter-panel .case-meta {
  color: #a5f3fc;
}

.platform-filter-panel label {
  color: #cbd5e1;
}

.platform-filter-panel input,
.platform-filter-panel select {
  border-color: rgba(103, 232, 249, 0.28);
  background: transparent;
  color: #f8fafc;
  -webkit-text-fill-color: #f8fafc;
}

.platform-filter-panel input::placeholder {
  color: rgba(248, 250, 252, 0.56);
}

.go-collect-btn {
  min-height: 34px;
  padding-inline: 14px;
}

.collect-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
}

.platform-filter-keyword input {
  width: 100%;
}

.locked-filter {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 8px;
  padding: 0 12px;
  color: #ecfeff;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.08);
}

.locked-filter input {
  width: 16px;
  height: 16px;
}

.reference-head-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.reference-head-actions label {
  min-width: 108px;
  display: grid;
  gap: 6px;
  color: #e8d5b5;
  font-size: 12px;
  font-weight: 800;
}

.reference-head-actions input {
  width: 108px;
  min-height: 36px;
  padding: 6px 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.reference-head-actions .primary-btn {
  min-height: 36px;
}

.plugin-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff;
}

.plugin-bar .case-meta {
  margin-left: auto;
}

.plugin-status-ok {
  color: #22c55e;
}

.plugin-download-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.plugin-download-link:hover {
  color: #ef4444;
}

.pending-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.pending-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.pending-marker {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.pending-marker.disabled {
  background: #9ca3af;
}

.pending-title {
  font-weight: 850;
  line-height: 1.35;
}

.pending-state {
  min-width: 80px;
  color: var(--teal);
  text-align: right;
  font-size: 12px;
  font-weight: 800;
}

.import-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.import-footer .status-line {
  margin: 0;
  flex: 1;
}

.collector-network-tip {
  flex: 0 1 420px;
  max-width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(217, 154, 50, 0.34);
  border-radius: 8px;
  background: #fff8e8;
  color: #8a5a12;
  font-size: 12px;
  line-height: 1.55;
}

.import-footer + .section-head {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.case-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.case-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 6px;
  background: #fbfcfe;
}

.case-title {
  font-weight: 850;
}

.case-meta {
  color: var(--muted);
  font-size: 13px;
}

.pending-warning {
  display: block;
  margin-top: 5px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 850;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.matrix-table .style-column {
  width: 35%;
}

.matrix-table .count-column {
  width: 13%;
}

.matrix-table .mode-column {
  width: 27%;
}

.matrix-table .asset-column {
  width: 25%;
}

.matrix-table th,
.matrix-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.matrix-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
}

.matrix-table tr:last-child td {
  border-bottom: 0;
}

.style-name {
  font-weight: 850;
  margin-bottom: 7px;
}

.dna-line {
  color: var(--muted);
  font-size: 12px;
  max-width: 340px;
}

.count-input {
  max-width: 88px;
}

.mode-cell {
  min-width: 250px;
}

.mode-cell select + select {
  margin-top: 8px;
}

.asset-cell {
  min-width: 250px;
}

.asset-cell .lamp,
.asset-cell .file-input,
.asset-cell .asset-note {
  margin-bottom: 8px;
}

.asset-cell .file-input {
  display: block;
}

.asset-cell .file-input[hidden] {
  display: none;
}

.matrix-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.source-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.source-post {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.source-post:hover {
  border-color: #9ca3af;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.source-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(9, minmax(72px, 1fr));
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.source-gallery-single {
  grid-template-columns: 126px;
}

.source-gallery img,
.source-thumb-empty {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: #f1f5f9;
  object-fit: cover;
}

.source-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.source-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.source-title-row strong {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.source-title-row span {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.source-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source-imported-at {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.source-imported-at time {
  color: var(--text);
  font-weight: 700;
}

.source-metrics {
  min-width: 190px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
}

.source-metric {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #606773;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.source-metric svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-footer {
  grid-column: 1 / -1;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.source-footer a {
  color: var(--blue);
  text-decoration: none;
  text-align: center;
  font-weight: 800;
}

.clone-controls {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.clone-count-label {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.delete-source-btn {
  min-height: 32px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.delete-source-btn:hover {
  background: #fff1f2;
}

.clone-btn {
  min-height: 32px;
  border-radius: 7px;
  padding: 0 10px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.clone-btn:hover {
  background: #374151;
}

.clone-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.direct-task-btn {
  background: #475569;
}

.direct-task-btn:hover {
  background: #334155;
}

.add-full-task-btn {
  background: #10b981;
}

.add-full-task-btn:hover {
  background: #059669;
}

.clone-count {
  width: 48px;
  min-height: 32px;
  padding: 5px 3px;
  text-align: center;
  font-size: 12px;
}

.lamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
}

.lamp.green {
  background: #dcfce7;
  color: #166534;
}

.lamp.yellow {
  background: #fef3c7;
  color: #92400e;
}

.file-input {
  font-size: 12px;
}

.empty-state {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.progress {
  height: 7px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.task-history {
  display: grid;
  gap: 14px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.history-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.history-group-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
}

.history-group-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-group-head > span:not(.history-status):not(.history-token) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-group-list {
  display: grid;
  gap: 7px;
}

.history-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 56px 100px minmax(120px, 0.8fr) 72px 86px minmax(144px, auto);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
}

.history-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.history-retry-btn,
.history-view-btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.history-retry-btn {
  background: #f97316;
  color: #fff;
}

.history-retry-btn.retrying {
  background: #94a3b8;
  color: #fff;
}

.history-retry-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.history-view-btn {
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
}

.history-row:not(.expired):hover {
  border-color: #94a3b8;
  filter: brightness(0.985);
}

.history-group.history-batch-0 {
  border-color: #fb923c;
  background: #ffedd5;
}

.history-group.history-batch-0 .history-group-head {
  background: #fed7aa;
}

.history-row.history-batch-0 {
  background: #fff1df;
}

.history-group.history-batch-1 {
  border-color: #818cf8;
  background: #e0e7ff;
}

.history-group.history-batch-1 .history-group-head {
  background: #c7d2fe;
}

.history-row.history-batch-1 {
  background: #eef2ff;
}

.history-group.history-batch-2 {
  border-color: #34d399;
  background: #d1fae5;
}

.history-group.history-batch-2 .history-group-head {
  background: #a7f3d0;
}

.history-row.history-batch-2 {
  background: #e1faed;
}

.history-group.history-batch-3 {
  border-color: #f472b6;
  background: #fce7f3;
}

.history-group.history-batch-3 .history-group-head {
  background: #fbcfe8;
}

.history-row.history-batch-3 {
  background: #fdf2f8;
}

.history-group.history-batch-4 {
  border-color: #2dd4bf;
  background: #ccfbf1;
}

.history-group.history-batch-4 .history-group-head {
  background: #99f6e4;
}

.history-row.history-batch-4 {
  background: #e4fbf6;
}

.history-group.history-batch-5 {
  border-color: #94a3b8;
  background: #e2e8f0;
}

.history-group.history-batch-5 .history-group-head {
  background: #cbd5e1;
}

.history-row.history-batch-5 {
  background: #f1f5f9;
}

.history-group.history-batch-6 {
  border-color: #facc15;
  background: #fef3c7;
}

.history-group.history-batch-6 .history-group-head {
  background: #fde68a;
}

.history-row.history-batch-6 {
  background: #fffbeb;
}

.history-group.history-batch-7 {
  border-color: #38bdf8;
  background: #dbeafe;
}

.history-group.history-batch-7 .history-group-head {
  background: #bfdbfe;
}

.history-row.history-batch-7 {
  background: #eff6ff;
}

.history-row.placeholder {
  border: 1px dashed #94a3b8;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.history-row.placeholder .history-title strong,
.history-row.placeholder .history-title small {
  color: #64748b;
}

.history-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.history-title strong,
.history-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-title small {
  color: var(--muted);
  font-size: 11px;
}

.history-title .history-subtitle {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.history-subtitle-text {
  width: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-model-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  background: #fff;
}

.history-model-badge.flux {
  color: #0f766e;
  background: #ccfbf1;
}

.history-model-badge.image2 {
  color: #1d4ed8;
  background: #dbeafe;
}

.history-model-badge.qwen {
  color: #7e22ce;
  background: #f3e8ff;
}

.history-title .history-error {
  color: #b42318;
  font-weight: 700;
}

.history-count,
.history-row time,
.history-token {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.history-token {
  justify-self: end;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.account-card {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.account-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.account-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.15;
}

.history-progress {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.history-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.history-progress-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.history-progress small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.history-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.history-status.completed {
  color: var(--green);
}

.history-status.completed::before {
  background: var(--green);
}

.history-status.generating {
  color: var(--amber);
}

.history-status.pending {
  color: #64748b;
}

.history-status.pending::before {
  background: #cbd5e1;
}

.history-status.published {
  color: var(--teal);
}

.history-status.published::before {
  background: var(--teal);
}

.history-status.expired {
  color: #8b93a1;
}

.history-status.failed {
  color: var(--red);
}

.history-status.failed::before {
  background: var(--red);
}

.history-status.expired::before {
  background: #9ca3af;
}

.history-row.expired {
  cursor: not-allowed;
  color: #7c8492;
  opacity: 0.72;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.post-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
}

.post-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.text-only-box {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.post-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.post-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.post-body pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: #374151;
  line-height: 1.55;
  max-height: 230px;
  overflow: auto;
}

.tag-line {
  color: var(--teal);
  font-weight: 800;
  margin: 0;
}

.post-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatch-link {
  color: var(--blue);
  word-break: break-all;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 420px;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 13px 15px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.toast.is-center {
  left: 50%;
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 1200;
  text-align: center;
}

.import-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
}

.import-overlay[hidden] {
  display: none;
}

.import-overlay-panel {
  width: min(560px, 100%);
  min-height: 280px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.import-overlay-panel h2 {
  color: var(--ink);
  font-size: 30px;
}

.import-overlay-panel p {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.import-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: import-spin 0.8s linear infinite;
}

.import-overlay-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.import-overlay-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 180ms ease;
}

.import-overlay-panel > strong {
  color: var(--teal);
  font-size: 18px;
}

@keyframes import-spin {
  to {
    transform: rotate(360deg);
  }
}

.dispatch-body {
  background: #f3f4f6;
}

.dispatch-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  padding: 24px;
}

.result-page {
  min-height: 100vh;
  padding: 28px;
  background: var(--paper);
}

.result-progress-shell {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-progress-shell h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.result-back {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.result-step-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.result-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.result-step p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.result-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.result-badge.completed {
  background: #dcfce7;
  color: #166534;
}

.result-badge.published {
  background: #ccfbf1;
  color: #115e59;
}

.result-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

/* Watermark removal status badge */
.wm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.wm-badge-row {
  margin-top: 12px;
  margin-bottom: 8px;
}
.wm-badge.wm-done {
  background: #dcfce7;
  color: #166534;
}
.wm-badge.wm-partial {
  background: #fef3c7;
  color: #92400e;
}
.wm-badge.wm-failed {
  background: #fee2e2;
  color: #991b1b;
}
.wm-badge.wm-processing {
  background: #dbeafe;
  color: #1e40af;
}
.wm-badge.wm-pending {
  background: #f3f4f6;
  color: #6b7280;
}
.wm-badge.wm-skipped {
  background: #f3f4f6;
  color: #6b7280;
}
.wm-badge.wm-disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

.dispatch-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  gap: 12px;
  align-content: start;
  align-items: start;
}

.dispatch-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: initial;
  align-self: start;
  overflow: visible;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.broken-media {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px dashed #ef4444;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0 25%, transparent 25% 50%, rgba(239, 68, 68, 0.08) 50% 75%, transparent 75%),
    #fff7f7;
  color: #991b1b;
  font-weight: 900;
  text-align: center;
}

.broken-media span::before {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  border: 3px solid currentColor;
  border-radius: 6px;
  transform: rotate(-5deg);
}

.image-failure-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.dispatch-actions .retry-image-action {
  background: #f97316;
}

.dispatch-content {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  align-self: start;
  color: #111827;
}

.dispatch-content h1 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.25;
}

.mobile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-title-row h1 {
  flex: 1 1 auto;
  min-width: min(100%, 220px);
  margin: 0;
}

.copy-title-inline {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.dispatch-content pre {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.65;
  background: transparent;
  color: #111827;
}

.dispatch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dispatch-actions button {
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.dispatch-actions .secondary-action {
  background: var(--teal);
}

.mobile-copy-actions button {
  flex: 1 1 190px;
}

.body-copy-row {
  margin-top: 0;
  margin-bottom: 12px;
}

.dispatch-actions .copy-body-orange {
  background: #f97316;
}

.dispatch-actions .copy-body-orange:hover {
  background: #ea580c;
}

.copy-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.manual-copy-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.manual-copy-panel[hidden] {
  display: none;
}

.manual-copy-panel p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.manual-copy-panel textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  resize: vertical;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.5;
}

.publish-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.58);
}

.publish-qr-modal[hidden] {
  display: none;
}

.publish-qr-panel {
  width: min(420px, 100%);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.publish-qr-panel h2 {
  margin: 8px 0 6px;
  font-size: 24px;
}

.publish-qr-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.publish-qr-close {
  float: right;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.publish-qr-code {
  width: min(290px, 82vw);
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.publish-qr-svg {
  display: block;
  width: 100%;
  height: auto;
}

.publish-direct-link {
  display: block;
  max-width: 100%;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.empty-media {
  min-height: 320px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .form-grid,
  .settings-grid,
  .platform-filter-grid,
  .dispatch-shell {
    grid-template-columns: 1fr;
  }

  .dispatch-content {
    order: -1;
  }

}

@media (max-width: 640px) {
  .main {
    padding: 14px;
  }

  .band {
    padding: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reference-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .plugin-bar,
  .platform-filter-panel > div:first-child,
  .import-footer,
  .install-alert,
  .plugin-install-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-plugin-btn,
  .install-alert .primary-btn {
    width: 100%;
  }

  .support-table {
    border: 0;
    display: grid;
    gap: 8px;
  }

  .support-row {
    grid-template-columns: 1fr;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .support-head {
    display: none;
  }

  .plugin-bar .case-meta {
    margin-left: 0;
  }

  .pending-item {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .source-post-list {
    grid-template-columns: 1fr;
  }

  .source-post {
    display: flex;
  }

  .source-gallery {
    grid-template-columns: repeat(9, 78px);
  }

  .source-footer {
    flex-wrap: wrap;
  }

  .source-footer a {
    margin-left: 0;
  }

  .clone-controls {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .pending-state {
    grid-column: 2;
    text-align: left;
  }

  .post-controls {
    grid-template-columns: 1fr;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }

  .history-group-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .history-group-head .history-status,
  .history-group-head .history-token {
    justify-self: start;
  }

  .history-count {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .history-row time {
    grid-column: 1;
    grid-row: 2;
  }

  .history-progress {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .history-status {
    grid-column: 2;
    grid-row: 2;
  }

  .history-token {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: start;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .import-overlay-panel {
    min-height: 250px;
    padding: 28px 20px;
  }

  .import-overlay-panel h2 {
    font-size: 24px;
  }

  .api-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .api-row code {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .endpoint-table {
    overflow-x: auto;
  }

  .endpoint-row {
    min-width: 650px;
  }
}

/* Grand gold visual theme inspired by the referenced premium landing page. */
:root {
  --ink: #1b140d;
  --muted: #8a7660;
  --line: rgba(201, 151, 72, 0.28);
  --paper: #120c07;
  --panel: rgba(30, 24, 17, 0.72);
  --blue: #c98f2d;
  --amber: #d99a32;
  --gold: #d99a32;
  --gold-soft: #f5c978;
  --gold-pale: #fff4dc;
  --brown: #21160d;
  --shadow: 0 24px 70px rgba(20, 12, 4, 0.28);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(14, 9, 5, 0.96) 0%, rgba(28, 17, 8, 0.84) 44%, rgba(92, 54, 17, 0.44) 100%),
    radial-gradient(circle at 73% 20%, rgba(255, 217, 145, 0.62) 0 7%, rgba(255, 217, 145, 0.08) 22%, transparent 42%),
    radial-gradient(circle at 57% 58%, rgba(209, 143, 45, 0.38) 0 10%, transparent 35%),
    repeating-linear-gradient(90deg, rgba(255, 225, 170, 0.08) 0, rgba(255, 225, 170, 0.08) 1px, transparent 1px, transparent 92px),
    linear-gradient(180deg, #fff2d2 0 90px, #140d07 90px 100%);
  background-attachment: fixed;
  color: #f8ead2;
}

body::before {
  content: "";
  position: fixed;
  inset: 90px 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18) 58%, rgba(255, 201, 120, 0.12)),
    radial-gradient(ellipse at 74% 22%, rgba(255, 224, 165, 0.34), transparent 32%),
    linear-gradient(90deg, transparent 0 55%, rgba(255, 228, 179, 0.1) 55% 57%, transparent 57% 61%, rgba(255, 228, 179, 0.08) 61% 63%, transparent 63%);
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
  border: 1px solid rgba(231, 184, 104, 0.22);
  border-radius: 8px;
  padding: 16px 18px;
  background:
    linear-gradient(90deg, rgba(35, 24, 14, 0.96), rgba(16, 11, 7, 0.9)),
    radial-gradient(circle at 86% 0%, rgba(245, 180, 74, 0.22), transparent 34%),
    #140d07;
  color: #fff1d6;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 235, 192, 0.06);
  backdrop-filter: blur(20px);
}

body:not(.project-mode) .app-topbar {
  display: none;
}

.app-topbar h1,
.app-topbar .side-status {
  display: none;
}

body.project-mode .app-topbar {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-height: auto;
  padding: 12px 14px;
}

.workspace-section {
  scroll-margin-top: 142px;
}

.top-model-picker {
  display: flex;
  align-items: center;
  justify-self: start;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 42px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid rgba(231, 184, 104, 0.3);
  border-radius: 8px;
  background: rgba(8, 6, 4, 0.58);
}

.top-model-label {
  padding: 0 7px;
  color: #dbc7a6;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.top-model-picker .model-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 5px;
  min-width: 78px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #f5e6cf;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.top-model-picker .model-option:has(input:checked) {
  border-color: #ffd58a;
  background: #f5b44a;
  color: #1b1208;
}

.top-model-picker .model-option input {
  margin: 0;
  accent-color: #7c4a10;
  cursor: pointer;
}

.flux-model-control {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  white-space: nowrap;
}

.flux-model-control .model-option {
  min-width: auto;
  padding-right: 8px;
  padding-left: 8px;
}

.reference-flux-freedom {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: #ff5a5a;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.reference-flux-freedom input {
  width: 2.25em;
  min-height: 24px;
  margin: 0 1px;
  padding: 0 1px;
  border: 1px solid #fff;
  border-radius: 5px;
  background: #fff;
  color: #14532d;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.reference-flux-freedom input::-webkit-inner-spin-button,
.reference-flux-freedom input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.reference-flux-freedom input:focus {
  outline: 2px solid rgba(255, 107, 107, 0.45);
  outline-offset: 1px;
}

/* “省钱”与其专属自由度是同一项选择，选中时一起高亮。 */
.flux-model-control:has(.model-option input:checked) .reference-flux-freedom {
  padding: 4px 6px 4px 3px;
  border: 1px solid #ffd58a;
  border-radius: 6px;
  background: #f5b44a;
  color: #1b1208;
}

/* 图片处理模型：高档为金色、快速为银色、省钱与自由度为绿色。 */
.top-model-picker .model-option:has(input[value="image2"]:checked) {
  border-color: #f5d675;
  background: #c99a20;
  color: #1f1704;
}

.top-model-picker .model-option:has(input[value="qwen"]:checked) {
  border-color: #f2f4f7;
  background: #b9c0c9;
  color: #202936;
}

.flux-model-control:has(.model-option input:checked) {
  gap: 0;
  border-radius: 6px;
  background: #169c4a;
}

.flux-model-control:has(.model-option input:checked) .model-option,
.flux-model-control:has(.model-option input:checked) .reference-flux-freedom {
  border-color: #75df9a;
  background: #169c4a;
  color: #fff;
}

.flux-model-control:has(.model-option input:checked) .model-option {
  border-radius: 6px 0 0 6px;
}

.flux-model-control:has(.model-option input:checked) .reference-flux-freedom {
  border-radius: 0 6px 6px 0;
}

/* “电商/产品”等业务类型选择器使用深色底，保持页面统一。 */
.welcome-page #businessType {
  border-color: rgba(255, 255, 255, 0.46);
  background: #080d0b;
  color: #fff;
}

.welcome-page #businessType option {
  background: #080d0b;
  color: #fff;
}

.feedback-prompt {
  position: fixed;
  z-index: 60;
  top: 16px;
  right: 16px;
  width: min(310px, calc(100vw - 32px));
  padding: 11px 12px;
  border: 1px solid rgba(250, 204, 21, 0.46);
  border-radius: 10px;
  background: rgba(20, 13, 6, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  color: #fff3d2;
  cursor: text;
}

.feedback-prompt-main {
  top: 118px;
}

.feedback-prompt p {
  margin: 0 0 8px;
  color: #fff3d2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.feedback-prompt label {
  display: grid;
  gap: 5px;
  color: #ffd88f;
  font-size: 12px;
  font-weight: 900;
}

.feedback-prompt textarea {
  width: 100%;
  min-height: 66px;
  max-height: 66px;
  resize: none;
  overflow: hidden;
  border: 1px solid rgba(255, 218, 143, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #2a1b0c;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  transition: min-height .18s ease, max-height .18s ease, box-shadow .18s ease;
}

.feedback-prompt textarea:focus,
.feedback-prompt:focus-within textarea {
  min-height: 188px;
  max-height: 188px;
  resize: vertical;
  overflow: auto;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.24);
}

.app-topbar h1 {
  margin: 0;
  color: #fff0d2;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-block {
  min-width: 0;
  align-items: center;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px 16px 10px 10px;
  background:
    linear-gradient(150deg, #ffe7a8 0%, #c68421 48%, #704414 100%);
  color: #fff8e8;
  box-shadow: inset 0 0 0 2px rgba(255, 244, 211, 0.4), 0 10px 24px rgba(113, 68, 20, 0.2);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.brand-block h1 {
  color: #fff0d2;
  font-size: 21px;
  font-weight: 950;
}

.brand-block p {
  color: #cda768;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-list a {
  color: #f4dfba;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 15px;
  font-weight: 850;
  border: 1px solid transparent;
}

.nav-list a.home-return-link {
  color: #f6fff8;
  border-color: rgba(190, 255, 210, 0.38);
  background: rgba(42, 123, 82, 0.22);
}

.nav-list a.home-return-link:hover {
  color: #ffffff;
  border-color: rgba(194, 255, 215, 0.62);
  background: rgba(44, 151, 96, 0.34);
}

.nav-list a:hover {
  background: rgba(255, 226, 169, 0.1);
  border-color: rgba(231, 184, 104, 0.24);
  color: #ffe9bd;
}

.nav-list a.active {
  background:
    linear-gradient(135deg, rgba(245, 180, 74, 0.22), rgba(110, 65, 16, 0.12)),
    rgba(255, 244, 220, 0.06);
  color: #fff6e3;
  border-color: rgba(245, 180, 74, 0.42);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18), inset 0 -3px 0 #f5b44a;
}

.nav-list a.active::after {
  display: none;
}

body:not(.project-mode) .nav-list [data-nav-scope="project"] {
  display: none;
}

.side-status {
  min-height: 46px;
  border: 1px solid rgba(196, 130, 31, 0.28);
  background: rgba(255, 244, 220, 0.08);
  color: #fff9ec;
  font-weight: 900;
  box-shadow: none;
}

.main {
  min-height: 100vh;
  padding: 34px 54px 72px;
  gap: 24px;
}

.band {
  border: 1px solid rgba(244, 198, 118, 0.22);
  background:
    linear-gradient(145deg, rgba(36, 28, 19, 0.82), rgba(19, 14, 10, 0.74)),
    rgba(21, 14, 8, 0.78);
  color: #fff4dd;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 235, 192, 0.1);
  backdrop-filter: blur(24px);
}

.top-band {
  min-height: calc(100vh - 138px);
  display: grid;
  align-content: start;
  border-color: rgba(244, 198, 118, 0.26);
  background:
    linear-gradient(110deg, rgba(15, 9, 4, 0.92), rgba(38, 24, 11, 0.8) 56%, rgba(127, 78, 22, 0.42)),
    radial-gradient(circle at 80% 20%, rgba(255, 226, 169, 0.28), transparent 30%);
}

.section-head,
.imports-title-row {
  color: #fff4dd;
}

.eyebrow {
  color: #e4b361;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  color: #fff0d2;
  font-size: 28px;
  font-weight: 950;
}

h3,
h4 {
  color: #fff0d2;
}

.case-meta,
.muted,
.status-line {
  color: #cbb79a;
}

.primary-btn,
.download-plugin-btn {
  border: 1px solid rgba(255, 225, 169, 0.38);
  background: linear-gradient(135deg, #f4b24b, #c77917);
  color: #fff8e8;
  box-shadow: 0 15px 34px rgba(194, 124, 24, 0.24);
}

.primary-btn:hover,
.download-plugin-btn:hover {
  background: linear-gradient(135deg, #ffc766, #bd7112);
  box-shadow: 0 18px 38px rgba(194, 124, 24, 0.34);
}

.secondary-btn,
.mini-btn {
  border: 1px solid rgba(231, 184, 104, 0.38);
  background: rgba(255, 244, 220, 0.08);
  color: #f9e7c6;
  box-shadow: none;
}

.secondary-btn:hover,
.mini-btn:hover {
  background: rgba(255, 226, 169, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.danger-btn {
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
}

input,
select,
textarea {
  border-color: rgba(231, 184, 104, 0.3);
  background: rgba(255, 249, 237, 0.95);
  color: #24190f;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f5b44a;
  box-shadow: 0 0 0 3px rgba(245, 180, 74, 0.2);
}

.plugin-install-panel {
  margin-bottom: 18px;
  border-color: rgba(255, 203, 112, 0.38);
  background: rgba(26, 18, 10, 0.78);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 235, 192, 0.06);
}

.plugin-install-toggle {
  min-height: 58px;
  background:
    linear-gradient(90deg, #c51f1f, #ef3f36 42%, #d9912c 100%);
  color: #fffaf0;
  font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.plugin-install-toggle::after {
  border-color: rgba(255, 240, 210, 0.5);
  background: rgba(45, 28, 9, 0.24);
}

.plugin-install-content {
  background:
    linear-gradient(135deg, rgba(31, 21, 12, 0.96), rgba(17, 12, 8, 0.94)),
    repeating-linear-gradient(90deg, rgba(255, 207, 126, 0.08) 0, rgba(255, 207, 126, 0.08) 1px, transparent 1px, transparent 42px);
}

.plugin-install-hero {
  background:
    linear-gradient(110deg, rgba(33, 22, 13, 0.86), rgba(65, 39, 12, 0.62), rgba(17, 12, 8, 0.82)),
    radial-gradient(circle at 84% 20%, rgba(255, 213, 133, 0.32), transparent 32%);
}

.plugin-install-hero .eyebrow {
  color: #f5c978;
}

.browser-support,
.install-steps {
  border-top-color: rgba(231, 184, 104, 0.2);
}

.install-steps {
  background: rgba(15, 10, 6, 0.34);
}

.browser-support h4,
.install-steps h4 {
  color: #f8dfad;
}

.support-table {
  border-color: rgba(231, 184, 104, 0.28);
  background: rgba(255, 244, 220, 0.04);
}

.support-row {
  border-bottom-color: rgba(231, 184, 104, 0.18);
  color: #f3dfbd;
}

.support-head {
  background: rgba(245, 180, 74, 0.12);
  color: #ffe9b8;
}

.support-ok {
  background: rgba(245, 180, 74, 0.16);
  color: #ffe0a3;
}

.install-steps ol {
  color: #ead5b3;
}

.platform-filter-panel {
  border-color: rgba(231, 184, 104, 0.28);
  background:
    linear-gradient(135deg, rgba(37, 26, 16, 0.86), rgba(20, 14, 8, 0.76)),
    radial-gradient(circle at 92% 0%, rgba(245, 180, 74, 0.2), transparent 28%);
  color: #fff0d2;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.platform-filter-panel > div:first-child strong {
  color: #fff0d2;
  font-size: 20px;
}

.platform-filter-panel .case-meta {
  color: #e4c694;
}

.platform-filter-panel label,
.locked-filter {
  color: #f0dcb8;
}

.locked-filter {
  border-color: rgba(231, 184, 104, 0.3);
  background: rgba(255, 244, 220, 0.07);
}

.plugin-bar,
.empty-state,
.task-section,
.project-editor,
.platform-picker,
.project-board,
.source-post,
.history-group,
.history-row,
.pending-item {
  border-color: rgba(231, 184, 104, 0.24);
  background: rgba(255, 244, 220, 0.07);
  color: #f5e6cf;
}

.project-list .project-card,
.platform-pill {
  border-color: rgba(231, 184, 104, 0.24);
  background: rgba(255, 244, 220, 0.08);
  color: #f8ead2;
}

.project-list .project-card:hover,
.platform-pill:hover {
  border-color: rgba(245, 180, 74, 0.54);
  background: rgba(255, 244, 220, 0.12);
}

.yellow-btn {
  background: linear-gradient(135deg, #ffd46f, #d49225);
  color: #291a08;
}

.toast {
  background: rgba(30, 22, 14, 0.94);
  color: #fff1d6;
  border: 1px solid rgba(231, 184, 104, 0.3);
}

@media (max-width: 1100px) {
  .app-shell {
    display: block;
  }

  .app-topbar {
    position: static;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px 24px;
    gap: 14px;
  }

  body.project-mode .app-topbar {
    grid-template-columns: 1fr;
  }

  .workspace-section {
    scroll-margin-top: 16px;
  }

  .top-model-picker {
    justify-self: start;
  }

  .nav-list {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .side-status {
    justify-self: start;
  }

  .main {
    padding: 28px 22px 48px;
  }
}

@media (max-width: 640px) {
  .feedback-prompt-main {
    top: 12px;
  }
  .brand-block h1 {
    font-size: 18px;
  }

  .app-topbar h1 {
    font-size: 24px;
  }

  .nav-list {
    gap: 6px;
  }

  .nav-list a {
    padding: 9px 10px;
    font-size: 14px;
  }

  .top-model-picker {
    width: 100%;
    justify-self: stretch;
  }

  .top-model-picker .model-option {
    flex: 0 0 88px;
  }

  .flux-model-control {
    flex: 0 0 auto;
  }

  .plugin-install-toggle {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
    font-size: 16px;
  }

  .support-row {
    background: rgba(255, 244, 220, 0.07);
  }
}

@media (max-width: 560px) {
  .platform-picker-list {
    grid-template-columns: 1fr;
  }
}

.section-assist {
  max-width: 58ch;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.55;
}

.clone-count-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.source-task-feedback {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.source-task-feedback.ok { color: #0f766e; }
.source-task-feedback.error { color: #be123c; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #f7c948;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1024px) {
  .section-assist,
  #pluginStatus,
  #localBatchMeta,
  .status-line,
  .clone-count-hint {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .section-head,
  .imports-title-row,
  .reference-head-actions,
  .import-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 390px) {
  .section-assist { font-size: 12px; }
  .clone-controls { gap: 8px; }
}

/* Welcome-style project entry page. */
.welcome-page {
  min-height: calc(100vh - 80px);
  align-content: start;
  gap: 20px;
}

.welcome-hero {
  min-height: 230px;
  align-items: center;
  margin: -2px -2px 22px;
  border: 1px solid rgba(245, 180, 74, 0.24);
  border-radius: 8px;
  padding: 34px;
  background:
    linear-gradient(100deg, rgba(12, 8, 4, 0.88), rgba(46, 29, 12, 0.72) 56%, rgba(181, 113, 24, 0.26)),
    radial-gradient(circle at 82% 20%, rgba(255, 226, 169, 0.32), transparent 32%);
  box-shadow: inset 0 1px 0 rgba(255, 235, 192, 0.1), 0 24px 70px rgba(0, 0, 0, 0.18);
}

.welcome-hero h2 {
  max-width: 680px;
  font-size: 42px;
  line-height: 1.16;
  letter-spacing: 0;
}

.welcome-copy {
  max-width: 760px;
  margin: 16px 0 0;
  color: #e9d3ad;
  font-size: 16px;
  line-height: 1.8;
}

.welcome-metrics {
  min-width: 280px;
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: 10px;
}

.welcome-metrics span {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(231, 184, 104, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 244, 220, 0.08);
  color: #dcc49d;
  text-align: center;
}

.welcome-metrics strong {
  color: #f7bf62;
  font-size: 26px;
  line-height: 1;
}

.welcome-page .project-board,
.welcome-page .platform-picker,
.welcome-page .project-editor {
  border: 1px solid rgba(231, 184, 104, 0.2);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 244, 220, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 235, 192, 0.06);
}

.welcome-page .project-board {
  margin-top: 20px;
  margin-bottom: 0;
}

.welcome-page .project-board-actions {
  justify-content: flex-end;
}

.welcome-page .project-list {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.welcome-page .project-card {
  min-height: 132px;
  align-content: center;
  cursor: pointer;
}

.welcome-page .project-card::after {
  content: "进入工作台";
  justify-self: start;
  width: fit-content;
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(245, 180, 74, 0.14);
  color: #ffd37e;
  font-size: 12px;
  font-weight: 900;
}

.welcome-page .project-card.delete-mode::after {
  content: "";
  display: none;
}

@media (max-width: 980px) {
  .welcome-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .welcome-hero h2 {
    font-size: 34px;
  }

  .welcome-metrics {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .welcome-hero {
    padding: 22px;
  }

  .welcome-hero h2 {
    font-size: 28px;
  }

  .welcome-metrics {
    grid-template-columns: 1fr;
  }
}

/* Fresh light-green home theme. */
:root {
  --ink: #10201b;
  --muted: #698078;
  --line: rgba(80, 152, 124, 0.2);
  --paper: #f3fbf6;
  --panel: rgba(255, 255, 255, 0.86);
  --blue: #12865e;
  --amber: #3f9f72;
  --gold: #2f9c6d;
  --gold-soft: #9fe2bf;
  --gold-pale: #effaf3;
  --brown: #163228;
  --shadow: 0 22px 58px rgba(31, 96, 72, 0.12);
}

body {
  background:
    radial-gradient(circle at 14% 8%, rgba(178, 236, 204, 0.58), transparent 32%),
    radial-gradient(circle at 82% 0%, rgba(204, 245, 223, 0.52), transparent 30%),
    linear-gradient(180deg, #f7fff9 0%, #eef9f1 48%, #f8fbf7 100%);
  color: var(--ink);
}

body::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(219, 246, 230, 0.2)),
    repeating-linear-gradient(90deg, rgba(78, 170, 123, 0.055) 0, rgba(78, 170, 123, 0.055) 1px, transparent 1px, transparent 86px);
}

.main {
  padding: 46px clamp(28px, 6vw, 92px) 58px;
}

.band {
  border-color: rgba(76, 151, 116, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.top-band {
  width: min(1260px, 100%);
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  align-content: start;
  gap: 28px;
  border-color: rgba(80, 152, 124, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 252, 246, 0.82)),
    radial-gradient(circle at 92% 6%, rgba(175, 234, 202, 0.38), transparent 28%);
}

.section-head,
.imports-title-row,
h2,
h3,
h4 {
  color: var(--ink);
}

.case-meta,
.muted,
.status-line {
  color: var(--muted);
}

.eyebrow {
  color: #17895e;
}

.primary-btn,
.download-plugin-btn {
  border-color: rgba(45, 151, 102, 0.22);
  background: linear-gradient(135deg, #39c783, #149466);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(20, 148, 102, 0.22);
}

.primary-btn:hover,
.download-plugin-btn:hover {
  background: linear-gradient(135deg, #44d791, #10875e);
  box-shadow: 0 18px 38px rgba(20, 148, 102, 0.28);
}

.secondary-btn,
.mini-btn {
  border-color: rgba(55, 139, 104, 0.22);
  background: rgba(255, 255, 255, 0.74);
  color: #184c3b;
}

.secondary-btn:hover,
.mini-btn:hover {
  background: rgba(230, 250, 239, 0.96);
}

.danger-btn {
  border-color: rgba(248, 113, 113, 0.32);
  background: #fff7f7;
  color: #b42318;
}

input,
select,
textarea,
.platform-select-button {
  border-color: rgba(80, 152, 124, 0.24);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
.platform-select-button:focus-visible {
  border-color: #39b77d;
  box-shadow: 0 0 0 3px rgba(57, 183, 125, 0.16);
}

.platform-select-arrow {
  color: #217d5b;
}

.platform-select-menu {
  border-color: rgba(80, 152, 124, 0.24);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 48px rgba(31, 96, 72, 0.18);
}

.platform-select-option {
  color: var(--ink);
}

.platform-select-option:hover,
.platform-select-option.active {
  background: rgba(217, 247, 229, 0.86);
}

.welcome-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
}

.welcome-page .project-editor,
.welcome-page .project-board {
  border: 1px solid rgba(80, 152, 124, 0.18);
  border-radius: 8px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.welcome-page .project-editor {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(80, 152, 124, 0.18);
}

.welcome-page .project-board {
  align-self: end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.project-editor h3 {
  font-size: 16px;
}

.project-grid {
  grid-template-columns: minmax(140px, 0.9fr) minmax(154px, 0.95fr) minmax(184px, 1.12fr) minmax(130px, 0.72fr);
  gap: 10px;
  align-items: start;
}

.project-grid label {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}

.project-grid input,
.project-grid select,
.project-grid .platform-select-button {
  min-height: 36px;
  margin-top: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.project-grid .local-field {
  grid-column: span 1;
}

.project-actions {
  margin-top: 10px;
}

.welcome-page .section-head.compact {
  margin-bottom: 8px;
}

.welcome-page .project-board-actions {
  min-height: 0;
}

.welcome-page .project-board-actions .danger-btn {
  min-height: 34px;
  padding: 7px 12px;
}

.welcome-page .project-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.project-list .project-card {
  border-color: rgba(80, 152, 124, 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.welcome-page .project-card {
  min-height: 82px;
  gap: 6px;
  padding: 10px 12px;
  align-content: start;
}

.welcome-page .project-card-main {
  gap: 3px;
}

.welcome-page .project-card-title {
  gap: 6px;
}

.welcome-page .project-card-title strong {
  font-size: 14px;
}

.welcome-page .platform-pill {
  padding: 2px 7px;
  font-size: 11px;
}

.welcome-page .project-card-main span,
.welcome-page .project-card-main small {
  font-size: 12px;
}

.project-list .project-card:hover,
.project-list .project-card.active {
  border-color: rgba(45, 151, 102, 0.42);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 96, 72, 0.12);
}

.welcome-page .project-card::after {
  background: rgba(219, 247, 230, 0.95);
  color: #15803d;
  padding: 3px 7px;
  font-size: 11px;
}

.empty-state {
  border-color: rgba(80, 152, 124, 0.16);
  background: rgba(246, 253, 248, 0.8);
  color: var(--muted);
}

.home-footnote {
  margin: 10px 0 0;
  color: rgba(32, 82, 62, 0.64);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main {
    padding: 22px 14px 40px;
  }

  .welcome-page .project-editor,
  .welcome-page .project-board {
    padding: 16px;
  }
}

@media (min-width: 521px) {
  .project-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.96fr) minmax(0, 1.12fr) minmax(0, 0.78fr);
  }
}

@media (max-width: 520px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Home compact tuning. */
.welcome-page {
  gap: 14px;
}

.welcome-page .project-editor {
  padding: 12px 14px;
}

.welcome-page .project-board {
  gap: 7px;
  margin-top: 4px;
  padding: 10px 14px;
}

.welcome-page .section-head.compact {
  flex-direction: row;
  align-items: center;
  margin-bottom: 6px;
}

.welcome-page .section-head.compact .case-meta {
  flex: 0 0 auto;
  font-size: 12px;
  white-space: nowrap;
}

.welcome-page .project-grid {
  gap: 8px;
}

.welcome-page .project-grid label {
  font-size: 12px;
}

.welcome-page .project-grid input,
.welcome-page .project-grid select,
.welcome-page .project-grid .platform-select-button {
  min-height: 34px;
  padding: 5px 8px;
}

.welcome-page .platform-select {
  margin-top: 4px;
}

.welcome-page .project-actions {
  margin-top: 8px;
}

.welcome-page .project-actions .primary-btn {
  min-height: 34px;
  padding: 7px 13px;
}

.welcome-page .project-board-actions .danger-btn {
  min-height: 32px;
  padding: 6px 11px;
}

.welcome-page .project-list {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 7px;
}

.welcome-page .project-card {
  min-height: 0;
  gap: 4px;
  padding: 8px 10px;
}

.welcome-page .project-card-main {
  gap: 2px;
}

.welcome-page .project-card-title strong {
  font-size: 13px;
}

.welcome-page .project-card-main span,
.welcome-page .project-card-main small {
  font-size: 11px;
  line-height: 1.35;
}

.welcome-page .platform-pill {
  padding: 1px 6px;
  font-size: 10px;
}

.welcome-page .project-card::after {
  content: none;
  display: none;
  margin-top: 1px;
  padding: 2px 6px;
  font-size: 10px;
}

/* Landscape-led home layout. */
.welcome-page {
  grid-template-rows: auto auto auto 1fr;
  gap: 8px;
}

.home-landscape {
  min-height: clamp(190px, 32vh, 280px);
  border: 1px solid rgba(80, 152, 124, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(20, 80, 56, 0.12)),
    url("./home-landscape.png") center / cover no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 18px 48px rgba(31, 96, 72, 0.11);
}

.welcome-page .project-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: end;
  padding: 10px 12px;
}

.welcome-page .project-editor .section-head.compact {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.welcome-page .project-grid {
  grid-column: 1;
  gap: 7px;
}

.welcome-page .project-actions {
  grid-column: 2;
  align-self: end;
  margin-top: 0;
}

.welcome-page .project-actions .primary-btn {
  min-height: 32px;
  padding: 6px 12px;
  white-space: nowrap;
}

.welcome-page .project-grid label {
  font-size: 11px;
}

.welcome-page .project-grid input,
.welcome-page .project-grid select,
.welcome-page .project-grid .platform-select-button {
  min-height: 32px;
  padding: 4px 7px;
}

.welcome-page .project-board {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-top: 0;
  padding: 8px 12px;
}

.welcome-page .project-board-actions {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}

.welcome-page .project-list {
  grid-column: 1;
  grid-row: 1;
}

.welcome-page .empty-state {
  grid-column: 1;
  grid-row: 1;
}

.welcome-page .project-board-actions .danger-btn {
  min-height: 30px;
  padding: 5px 10px;
}

.welcome-page .project-card {
  min-height: 0;
  padding: 7px 9px;
}

.welcome-page .project-card-title strong {
  font-size: 12px;
}

.welcome-page .project-card-main span,
.welcome-page .project-card-main small {
  font-size: 10px;
}

.home-footnote {
  margin-top: 6px;
}

@media (max-width: 520px) {
  .home-landscape {
    min-height: 150px;
  }

  .welcome-page .project-editor {
    grid-template-columns: 1fr;
  }

  .welcome-page .project-grid,
  .welcome-page .project-actions {
    grid-column: 1;
  }
}

/* Remove the oversized outer card: feature blocks now sit directly on the page. */
.band,
.top-band,
.workspace-section {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.band {
  padding: 0;
}

.top-band {
  width: min(1260px, 100%);
  min-height: calc(100vh - 92px);
  padding: 0;
}

.workspace-section {
  width: min(1260px, 100%);
  margin: 0 auto;
}

.home-landscape {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.welcome-page .project-editor,
.welcome-page .project-board {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.welcome-page .project-card {
  border: 0;
  border-bottom: 1px solid rgba(80, 152, 124, 0.2);
  border-radius: 0;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.welcome-page .project-card:hover,
.welcome-page .project-card.active {
  border-color: rgba(45, 151, 102, 0.38);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

/* Reference-inspired bottom glass layout. */
.welcome-page {
  min-height: calc(100vh - 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  grid-template-rows: minmax(230px, 1fr) auto auto;
  column-gap: clamp(18px, 3.8vw, 52px);
  row-gap: 10px;
  align-items: end;
}

.home-blank-hero {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: 820px;
  padding-bottom: clamp(12px, 7vh, 78px);
}

.home-blank-hero .eyebrow {
  margin: 0 0 14px;
  color: rgba(28, 97, 70, 0.64);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-blank-hero h2 {
  margin: 0;
  color: #143628;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

.home-support-board {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  min-height: 236px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(31, 96, 72, 0.22);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  color: rgba(20, 54, 40, 0.78);
  padding: 24px;
}

.home-support-board p {
  max-width: 360px;
  margin: 0;
  font-size: clamp(18px, 2.7vw, 28px);
  line-height: 1.75;
  font-weight: 850;
  text-align: center;
}

.support-number {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 50px;
  margin: 0 4px;
  border: 1px solid rgba(31, 96, 72, 0.24);
  background: rgba(255, 255, 255, 0.2);
  color: #0f6849;
  font-size: 1.55em;
  font-weight: 950;
  vertical-align: middle;
  transition: background 0.16s ease, transform 0.16s ease;
}

.support-number:hover {
  background: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.welcome-page .project-editor {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

.welcome-page .project-board {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
}

.home-footnote,
.home-landscape {
  display: none;
}

.welcome-page .project-editor,
.welcome-page .project-board,
.welcome-page .project-card {
  background: transparent;
}

.welcome-page .project-editor {
  padding-top: 0;
}

.platform-support-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 26, 19, 0.28);
  backdrop-filter: blur(10px);
}

.platform-support-modal[hidden] {
  display: none;
}

.platform-support-panel {
  width: min(760px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(247, 255, 250, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 26px 80px rgba(21, 65, 45, 0.22);
}

.platform-support-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid rgba(31, 96, 72, 0.14);
}

.platform-support-head .eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.platform-support-head h3 {
  margin: 0;
  font-size: 24px;
}

.platform-support-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(31, 96, 72, 0.18);
  background: rgba(255, 255, 255, 0.28);
  color: #143628;
  font-size: 28px;
  line-height: 1;
}

.platform-support-list {
  max-height: calc(min(78vh, 720px) - 88px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 18px 24px 24px;
}

.platform-support-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(31, 96, 72, 0.13);
  background: rgba(255, 255, 255, 0.28);
  padding: 10px 12px;
  color: #143628;
  font-weight: 850;
}

.platform-support-item span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .welcome-page {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 1fr) auto auto auto;
  }

  .home-blank-hero,
  .home-support-board,
  .welcome-page .project-editor,
  .welcome-page .project-board {
    grid-column: 1;
  }

  .home-support-board {
    grid-row: 2;
    min-height: 112px;
    padding: 14px 16px;
  }

  .welcome-page .project-editor {
    grid-row: 3;
  }

  .welcome-page .project-board {
    grid-row: 4;
  }

  .home-support-board p {
    max-width: none;
    font-size: 18px;
  }

  .support-number {
    min-width: 46px;
    min-height: 36px;
  }
}

@media (max-width: 560px) {
  .home-blank-hero h2 {
    font-size: 40px;
  }

  .platform-support-list {
    grid-template-columns: 1fr;
  }
}

/* Final banquet hero composition. */
body {
  background:
    linear-gradient(90deg, rgba(9, 13, 12, 0.64) 0%, rgba(36, 21, 9, 0.28) 46%, rgba(8, 10, 10, 0.58) 100%),
    linear-gradient(180deg, rgba(9, 12, 11, 0.18), rgba(10, 8, 7, 0.48)),
    url("./executive-banquet-hero.png") center center / cover fixed no-repeat;
  color: rgba(255, 255, 255, 0.92);
}

body::before {
  background: transparent;
}

.main {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 46px) clamp(20px, 4.5vw, 72px) clamp(18px, 3vw, 44px);
}

.welcome-page {
  width: min(1460px, 100%);
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.55fr);
  grid-template-rows: minmax(260px, 1fr) auto auto;
  column-gap: clamp(12px, 3.4vw, 58px);
  row-gap: 8px;
  align-items: start;
}

.home-blank-hero {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  max-width: 620px;
  padding: clamp(22px, 8vh, 96px) 0 0;
}

.home-blank-hero .eyebrow {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(10px, 1.2vw, 13px);
  letter-spacing: 0.14em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.24);
}

.home-blank-hero h2 {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.06;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.home-support-board {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  width: min(100%, 360px);
  min-height: 0;
  margin-top: clamp(24px, 8vh, 96px);
  padding: 18px 20px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.home-support-board p {
  max-width: none;
  color: inherit;
  font-size: clamp(13px, 1.28vw, 18px);
  line-height: 1.7;
}

.support-number {
  min-width: 40px;
  min-height: 32px;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.35em;
}

.support-number:hover {
  background: rgba(255, 255, 255, 0.2);
}

.welcome-page .project-editor {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  color: rgba(255, 255, 255, 0.9);
}

.welcome-page .project-board {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  color: rgba(255, 255, 255, 0.88);
}

.section-head,
.imports-title-row,
h2,
h3,
h4,
.project-editor h3 {
  color: rgba(255, 255, 255, 0.94);
}

.case-meta,
.muted,
.status-line,
.welcome-page .project-card-main span,
.welcome-page .project-card-main small {
  color: rgba(255, 255, 255, 0.68);
}

.pending-warning {
  color: #ff4d4f;
}

.welcome-page .project-grid label {
  color: rgba(255, 255, 255, 0.82);
}

.welcome-page .project-grid input,
.welcome-page .project-grid select,
.welcome-page .project-grid .platform-select-button,
input,
select,
textarea {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.welcome-page .project-grid input::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.platform-select-current,
.platform-select-arrow {
  color: #ffffff;
}

.platform-select-menu {
  background: rgba(10, 28, 19, 0.78);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

.platform-select-option {
  color: rgba(255, 255, 255, 0.9);
}

.platform-select-option:hover,
.platform-select-option.active {
  background: rgba(255, 255, 255, 0.14);
}

.primary-btn {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.92);
  color: #143628;
  box-shadow: none;
}

.primary-btn:hover {
  background: #ffffff;
  box-shadow: none;
}

.danger-btn {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.welcome-page .project-card {
  border-bottom-color: rgba(255, 255, 255, 0.24);
}

.welcome-page .project-card:hover,
.welcome-page .project-card.active {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.platform-pill {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.84);
}

.empty-state {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
}

.platform-support-panel {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(14, 36, 25, 0.72);
  color: rgba(255, 255, 255, 0.92);
}

.platform-support-head {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.platform-support-head h3,
.platform-support-close,
.platform-support-item {
  color: rgba(255, 255, 255, 0.94);
}

.platform-support-close,
.platform-support-item {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 560px) {
  .welcome-page {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(210px, 1fr) auto auto auto;
  }

  .home-blank-hero {
    padding-top: 24px;
  }

  .home-support-board {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
  }

  .welcome-page .project-editor {
    grid-row: 3;
  }

  .welcome-page .project-board {
    grid-row: 4;
  }
}

/* Home stats and project form refinement. */
.home-support-board {
  width: min(100%, 420px);
  padding: 20px;
  border-radius: 28px;
  display: block;
}

.home-support-board .support-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.support-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.support-number {
  width: 100%;
  min-height: 118px;
  margin: 0;
  padding: 16px 12px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.support-number strong {
  color: #ffffff;
  font-size: clamp(52px, 5vw, 82px);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
}

.support-number span {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.2;
  font-weight: 750;
  text-align: center;
}

.support-number:hover {
  background: rgba(255, 255, 255, 0.22);
}

.welcome-page .project-editor .section-head.compact {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.welcome-page .project-editor .section-head.compact h3 {
  grid-column: 1;
}

.welcome-page .project-editor .section-head.compact .case-meta {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.welcome-page .project-editor {
  display: block;
}

.welcome-page .project-grid {
  display: grid;
}

.welcome-page .project-grid .project-actions {
  grid-column: 4;
  grid-row: 2;
  align-self: start;
  margin-top: 0;
}

.welcome-page .project-grid .project-actions .primary-btn {
  width: 100%;
  min-height: 36px;
}

@media (max-width: 920px) {
  .home-support-board {
    width: 100%;
  }

  .support-number {
    min-height: 88px;
  }
}

@media (max-width: 560px) {
  .support-metrics {
    grid-template-columns: 1fr;
  }

  .welcome-page .project-editor .section-head.compact {
    grid-template-columns: 1fr;
  }

  .welcome-page .project-editor .section-head.compact h3,
  .welcome-page .project-editor .section-head.compact .case-meta,
  .welcome-page .project-grid .project-actions {
    grid-column: 1;
  }

  .welcome-page .project-grid .project-actions {
    grid-row: auto;
  }
}

/* Final homepage sizing polish. */
.home-support-board {
  width: min(100%, 380px);
  border-radius: 30px;
}

.support-metrics {
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 16px;
}

.support-number {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.support-number strong {
  width: clamp(82px, 7.8vw, 118px);
  height: clamp(82px, 7.8vw, 118px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 18px 38px rgba(0, 0, 0, 0.18);
  font-size: clamp(48px, 5.2vw, 76px);
}

.support-number span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 850;
}

.support-number:hover {
  background: transparent;
}

.support-number:hover strong {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.welcome-page .project-grid {
  width: min(100%, 548px);
  grid-template-columns: 112px 124px 148px 112px;
  gap: 12px;
  align-items: start;
}

.welcome-page .project-grid label {
  min-width: 0;
}

.welcome-page .project-grid input,
.welcome-page .project-grid select,
.welcome-page .project-grid .platform-select-button {
  width: 100%;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  margin-top: 5px;
  padding: 6px 10px;
}

.welcome-page .project-grid .platform-select {
  margin-top: 5px;
}

.welcome-page .project-grid .platform-select-button {
  margin-top: 0;
}

.welcome-page .project-grid .project-actions {
  grid-column: 4;
  grid-row: 2;
  width: 112px;
}

.welcome-page .project-grid .project-actions .primary-btn {
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 6px 10px;
}

.welcome-page .project-list {
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  justify-content: start;
  gap: 10px;
}

.welcome-page .project-card {
  width: 100%;
  min-height: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  background: rgba(18, 17, 14, 0.58);
  backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.92);
}

.welcome-page .project-card:hover,
.welcome-page .project-card.active {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(24, 22, 18, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.welcome-page .project-card-title strong,
.welcome-page .project-card-main span,
.welcome-page .project-card-main small {
  color: rgba(255, 255, 255, 0.9);
}

.welcome-page .project-card-main span,
.welcome-page .project-card-main small {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 860px) {
  .welcome-page .project-grid {
    width: 100%;
    grid-template-columns: 112px 124px 148px 112px;
  }

  .welcome-page .project-grid .project-actions {
    grid-column: 4;
    grid-row: 2;
    width: 112px;
  }
}

@media (max-width: 560px) {
  .support-number strong {
    width: 96px;
    height: 96px;
  }

  .welcome-page .project-grid {
    grid-template-columns: 1fr;
  }

  .welcome-page .project-grid .project-actions {
    grid-column: 1;
  }
}

/* Transparent stats and full-width project form. */
.home-support-board {
  width: min(100%, 420px);
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.home-support-board .support-kicker {
  color: rgba(255, 255, 255, 0.9);
}

.support-metrics {
  gap: 18px;
}

.support-number,
.support-number:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.support-number strong {
  width: clamp(82px, 7vw, 112px);
  height: clamp(82px, 7vw, 112px);
  border-color: transparent;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
}

.support-number:hover strong {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.support-number span {
  color: rgba(255, 255, 255, 0.88);
}

.welcome-page .project-editor {
  width: 100%;
}

.welcome-page .project-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.welcome-page .project-grid input,
.welcome-page .project-grid select,
.welcome-page .project-grid .platform-select-button {
  height: 38px;
  min-height: 38px;
}

.welcome-page .project-grid .project-actions {
  grid-column: 4;
  grid-row: 2;
  width: 100%;
}

.welcome-page .project-grid .project-actions .primary-btn {
  height: 38px;
  min-height: 38px;
}

.welcome-page .project-grid .keyword-field {
  white-space: nowrap;
}

.welcome-page .project-grid .keyword-field .field-label-row {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.welcome-page .project-grid .keyword-field .field-hint {
  flex: 0 0 auto;
  display: inline;
  margin-left: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  vertical-align: baseline;
}

.welcome-page .project-grid .keyword-field input {
  display: block;
  white-space: normal;
}

@media (max-width: 520px) {
  .welcome-page .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-page .project-grid .project-actions {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (max-width: 420px) {
  .welcome-page .project-grid {
    grid-template-columns: 1fr;
  }

  .welcome-page .project-grid .project-actions {
    grid-column: 1;
  }
}

/* Project launcher, validation, and platform logo marquee. */
.project-create-launcher {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

.project-create-launcher .primary-btn {
  min-width: 132px;
  min-height: 42px;
  border-radius: 16px;
}

.welcome-page .project-editor {
  grid-row: 2;
}

.welcome-page .project-board {
  grid-row: 3;
}

.platform-logo-marquee {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: end;
  width: 100%;
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 6px 0 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.marquee-row {
  width: 100%;
  overflow: hidden;
}

.marquee-track {
  width: max-content;
  display: flex;
  gap: 18px;
  align-items: center;
  animation: marquee-left 26s linear infinite;
}

.marquee-track.to-right {
  animation-name: marquee-right;
}

.platform-marquee-item {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.platform-marquee-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.24);
}

.platform-marquee-item .platform-logo {
  width: 32px;
  height: 32px;
}

.platform-marquee-item .platform-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.field-error {
  color: #fecaca !important;
}

.field-error input,
.field-error select,
.field-error .platform-select-button {
  border-color: #ef4444 !important;
  background: rgba(127, 29, 29, 0.36) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.24) !important;
}

.required-tip {
  display: block;
  margin-top: 4px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
}

@keyframes marquee-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes marquee-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 720px) {
  .platform-marquee-item {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .platform-marquee-item .platform-logo,
  .platform-marquee-item .platform-logo img {
    width: 28px;
    height: 28px;
  }
}

/* Corner platform wheels. */
@property --wheel-spin {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@property --wheel-spin-counter {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

.platform-logo-marquee {
  display: none;
}

.corner-platform-wheels {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.corner-platform-wheel {
  --wheel-size: 520px;
  --window-size: 386px;
  position: fixed;
  top: 0;
  width: var(--window-size);
  height: var(--window-size);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.domestic-wheel {
  left: 0;
  transform-origin: 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 46%, 70% 70%, 46% 100%, 0 100%);
}

.international-wheel {
  right: 0;
  transform-origin: 100% 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 54% 100%, 30% 70%, 0 46%);
}

.corner-platform-wheel:hover,
.corner-platform-wheel.dragging {
  opacity: 1;
  transform: scale(1);
}

.wheel-disk {
  position: absolute;
  top: calc(var(--wheel-size) / -2);
  width: var(--wheel-size);
  height: var(--wheel-size);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18) 0 21%, transparent 22%),
    conic-gradient(from 20deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34), inset 0 0 0 38px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.domestic-wheel .wheel-disk {
  left: calc(var(--wheel-size) / -2);
}

.international-wheel .wheel-disk {
  right: calc(var(--wheel-size) / -2);
}

.wheel-disk::before,
.wheel-disk::after {
  content: "";
  position: absolute;
  inset: 74px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.wheel-disk::after {
  inset: 154px;
  border-style: dashed;
  opacity: 0.72;
}

.wheel-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 230px;
  height: 230px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.18);
}

.bagua-core {
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.22) 0 8%, transparent 9%),
    conic-gradient(from 90deg, rgba(255, 255, 255, 0.2) 0 25%, rgba(7, 7, 7, 0.22) 25% 50%, rgba(255, 255, 255, 0.2) 50% 75%, rgba(7, 7, 7, 0.22) 75% 100%);
}

.astro-core {
  background:
    radial-gradient(circle at center, transparent 0 42%, rgba(255, 255, 255, 0.2) 43% 44%, transparent 45%),
    conic-gradient(from 0deg, rgba(255, 255, 255, 0.2), rgba(80, 120, 255, 0.18), rgba(255, 255, 255, 0.16), rgba(255, 202, 120, 0.18), rgba(255, 255, 255, 0.2));
}

.wheel-core-main {
  font-size: 58px;
  line-height: 1;
}

.wheel-core-detail {
  color: rgba(255, 255, 255, 0.62);
  font-size: 18px;
  letter-spacing: 0.18em;
}

.wheel-logo-ring {
  --logo-radius: 144px;
  position: absolute;
  inset: 0;
  border-radius: 999px;
  transform-origin: 50% 50%;
  --wheel-spin: 0deg;
  --wheel-spin-counter: 0deg;
  --drag-angle: 0deg;
  --drag-counter-angle: 0deg;
  animation: corner-wheel-spin 34s linear infinite;
  touch-action: none;
  cursor: grab;
}

.wheel-logo-ring.to-right {
  animation-name: corner-wheel-spin-reverse;
}

.corner-platform-wheel:hover .wheel-logo-ring,
.corner-platform-wheel.dragging .wheel-logo-ring {
  animation-play-state: paused;
}

.corner-platform-wheel.dragging .wheel-logo-ring {
  cursor: grabbing;
}

.wheel-logo-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  transform:
    rotate(calc(var(--angle) + var(--wheel-spin) + var(--drag-angle)))
    translate(var(--logo-radius))
    rotate(calc(var(--counter-angle) + var(--wheel-spin-counter) + var(--drag-counter-angle)));
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.wheel-logo-button:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.wheel-logo-button .platform-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.wheel-logo-button .platform-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

@keyframes corner-wheel-spin {
  from {
    --wheel-spin: 0deg;
    --wheel-spin-counter: 0deg;
  }
  to {
    --wheel-spin: 360deg;
    --wheel-spin-counter: -360deg;
  }
}

@keyframes corner-wheel-spin-reverse {
  from {
    --wheel-spin: 360deg;
    --wheel-spin-counter: -360deg;
  }
  to {
    --wheel-spin: 0deg;
    --wheel-spin-counter: 0deg;
  }
}

@media (max-width: 760px) {
  .corner-platform-wheel {
    --wheel-size: 380px;
    --window-size: 284px;
  }

  .wheel-logo-ring {
    --logo-radius: 104px;
  }

  .wheel-logo-button {
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 13px;
  }

  .wheel-logo-button .platform-logo,
  .wheel-logo-button .platform-logo img {
    width: 30px;
    height: 30px;
  }

  .wheel-core {
    width: 162px;
    height: 162px;
  }
}

/* Center-start homepage with video background. */
body {
  background: #050806;
}

.page-bg-video {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050806;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(90deg, rgba(2, 7, 6, 0.62), rgba(2, 7, 6, 0.18) 42%, rgba(2, 7, 6, 0.62)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.68));
}

.welcome-page {
  position: relative;
  width: min(1520px, 100%);
  min-height: calc(100vh - 78px);
  display: block;
  padding: 0;
}

.home-blank-hero {
  position: fixed;
  left: clamp(28px, 3.4vw, 66px);
  top: clamp(24px, 3.8vh, 40px);
  z-index: 8;
  height: 57px;
  max-width: min(560px, 54vw);
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto;
  column-gap: 13px;
  row-gap: 3px;
  align-items: stretch;
  padding: 0;
}

.home-blank-hero::before {
  content: "研";
  grid-row: 1 / 4;
  align-self: stretch;
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font-size: 31px;
  line-height: 1;
  font-weight: 950;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.home-blank-hero .eyebrow {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.12em;
}

.home-blank-hero h2 {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  margin: 0;
  font-size: clamp(20px, 1.65vw, 30px);
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
  transform: none;
}

.home-support-board {
  position: absolute;
  top: clamp(34px, 7vh, 76px);
  right: clamp(24px, 5vw, 78px);
  width: min(360px, 36vw);
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.project-create-launcher {
  position: absolute;
  left: calc(clamp(48px, 3vw, 64px) + 3cm);
  top: calc(clamp(650px, 70vh, 760px) - 3cm - 30px);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(42px, 4vw, 72px);
  padding: 0;
  transform: translate(-50%, -50%);
}

.project-create-launcher[hidden] {
  display: none;
}

.project-create-launcher .primary-btn {
  width: clamp(168px, 16vw, 236px);
  min-height: clamp(58px, 6vw, 78px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.88);
  color: #0f241b;
  font-size: clamp(19px, 1.8vw, 26px);
  font-weight: 950;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32), 0 0 0 12px rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.home-support-board .support-kicker {
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.home-support-board .support-number strong {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 34px rgba(0, 0, 0, 0.16);
}

.home-support-board .support-number span {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.project-create-launcher .primary-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.38), 0 0 0 14px rgba(255, 255, 255, 0.12);
}

/* Keep the network-rebuild action fixed while deliberately placing the local
   image-wash action far to its right on the desktop home composition. */
.project-create-launcher a.primary-btn {
  position: relative;
  left: clamp(260px, 22vw, 520px);
}

@media (max-width: 768px) {
  .project-create-launcher {
    left: 16px;
    right: 16px;
    width: auto;
    justify-content: space-between;
    gap: 12px;
    transform: translateY(-50%);
  }

  .project-create-launcher .primary-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  .project-create-launcher a.primary-btn {
    left: 0;
  }
}

.welcome-page .project-editor {
  position: absolute;
  left: 50%;
  top: calc(50% + 78px);
  z-index: 7;
  width: min(920px, calc(100vw - 48px));
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(8, 20, 15, 0.52);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.28);
}

.welcome-page .project-editor[hidden] {
  display: none;
}

.welcome-page .project-editor .section-head.compact {
  margin-bottom: 12px;
}

.welcome-page .project-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.welcome-page .project-grid .project-actions {
  grid-column: 4;
  grid-row: 2;
}

.welcome-page .project-board {
  position: fixed;
  left: clamp(18px, 4vw, 64px);
  right: clamp(18px, 4vw, 64px);
  bottom: clamp(18px, 4vh, 42px);
  z-index: 5;
  color: rgba(255, 255, 255, 0.9);
}

.welcome-page .project-board[hidden] {
  display: none;
}

.welcome-page .project-board-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.welcome-page .project-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}

.welcome-page .project-card {
  flex: 0 0 230px;
  border-radius: 20px;
  background: rgba(8, 20, 15, 0.66);
}

.corner-platform-wheels,
.platform-logo-marquee {
  display: none !important;
}

@media (max-width: 860px) {
  .home-blank-hero,
  .home-support-board {
    position: static;
    width: 100%;
    max-width: none;
    padding: 22px 0 0;
  }

  .home-support-board {
    margin-top: 16px;
  }

  .welcome-page .project-editor {
    top: calc(50% + 66px);
  }

  .welcome-page .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-page .project-grid .project-actions {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .project-create-launcher {
    top: calc(46% - 30px);
  }

  .welcome-page .project-editor {
    top: calc(46% + 64px);
    width: calc(100vw - 28px);
  }

  .welcome-page .project-grid {
    grid-template-columns: 1fr;
  }

  .welcome-page .project-grid .project-actions {
    grid-column: 1;
  }

}

.platform-filter-panel .platform-filter-grid input,
.platform-filter-panel .platform-filter-grid select {
  background: #ffffff !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827;
  border-color: rgba(231, 184, 104, 0.34);
  box-shadow: none;
}

.platform-filter-panel .platform-filter-grid select option {
  background: #ffffff !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827;
}

.platform-filter-panel .platform-filter-grid select option:checked {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

.platform-filter-panel .platform-filter-grid input::placeholder {
  color: rgba(17, 24, 39, 0.56) !important;
}

.dispatch-body,
.dispatch-shell,
.dispatch-content,
.dispatch-content pre,
.dispatch-content .tag-line,
.manual-copy-panel,
.manual-copy-panel textarea {
  background: transparent !important;
}

.dispatch-content,
.dispatch-content h1,
.dispatch-content pre,
.dispatch-content .tag-line,
#copyBody {
  color: #111827 !important;
}

.install-danger-text {
  color: #ff4d4f !important;
  font-weight: 900;
}

.install-success-text {
  color: #22c55e !important;
  font-weight: 900;
}

.install-download-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: 8px;
  padding: 5px 12px;
  background: #22c55e;
  color: #052e16 !important;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.22);
}

.install-download-btn:hover {
  background: #4ade80;
}

.install-steps,
.install-steps h4,
.install-steps ol,
.install-steps li {
  color: #111827 !important;
}

/* Open project details above the launch action, leaving the button visible. */
.welcome-page .project-editor {
  left: clamp(24px, 9vw, 220px);
  top: calc(clamp(650px, 70vh, 760px) - 3cm - 28px);
  transform: translate(0, -100%);
}

.dispatch-media .flux-result-guidance {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 12px;
  background: rgba(236, 253, 245, 0.88);
  color: #0f5132;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 750;
}

.flux-result-guidance p { margin: 0; }
.flux-result-guidance p + p { margin-top: 4px; }

@media (max-width: 860px) {
  .welcome-page .project-editor {
    left: 24px;
    top: calc(clamp(650px, 70vh, 760px) - 3cm - 22px);
  }
}

@media (max-width: 560px) {
  .welcome-page .project-editor {
    left: 14px;
    top: calc(46% - 16px);
    transform: translate(0, -100%);
  }
}
