/* Home hub: centered entry with module picker (图一) */
body.input-page-view:has(#homeView.active) .workspace-header h1,
body.input-page-view:has(#homeView.active) .api-pill {
  display: none;
}

body.input-page-view:has(#homeView.active) .workspace-header {
  min-height: 40px;
  margin-bottom: 0;
}

body.input-page-view:has(#homeView.active) .workspace {
  padding-left: 20px;
  padding-right: 20px;
}

body.input-page-view:has(#homeView.active) .main-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 88px);
}

body.input-page-view:has(#homeView.active) .work-grid {
  width: 100%;
}

#homeView {
  width: 100%;
}

.workspace {
  position: relative;
}

.home-dot-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 240ms ease;
}

body.input-page-view:has(#homeView.active) .home-dot-field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

body.input-page-view:has(#homeView.active) .home-dot-field.is-active {
  opacity: 1;
}

body.input-page-view:has(#homeView.active) .workspace {
  background: #fff;
}

body.input-page-view:has(#homeView.active) .work-grid,
body.input-page-view:has(#homeView.active) .workspace-header {
  position: relative;
  z-index: 1;
}

.home-entry-hub {
  width: min(100%, var(--module-entry-width, 1058px));
  margin: 0 auto;
  padding: 12px 0 48px;
}

.home-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 32px;
}

.home-hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 36px;
  line-height: 44px;
  font-weight: 700;
  letter-spacing: 0;
}

.home-hero-title > span:first-child {
  position: relative;
  z-index: 5;
}

.home-module-picker-wrap {
  --home-wheel-item-height: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.home-module-picker-wrap.is-open {
  z-index: 4;
}

.home-module-picker-trigger {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--home-wheel-item-height);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--launch-primary, #8470FF);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.home-module-picker-trigger:hover {
  opacity: 0.88;
}

.home-module-picker-trigger:focus-visible {
  border-radius: 8px;
  outline: none;
  box-shadow: 0 0 0 3px rgb(126 117 180 / 22%);
}

.home-module-picker-wrap.is-open .home-module-picker-trigger {
  visibility: hidden;
  pointer-events: none;
}

.home-module-picker-caret {
  font-size: 18px;
  line-height: 1;
  opacity: 0.72;
  transition: transform 180ms ease;
}

.home-module-picker-wrap.is-open .home-module-picker-caret {
  transform: rotate(180deg);
}

.home-module-wheel-popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  transform: translateY(var(--home-list-offset, 0px));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  pointer-events: none;
}

.home-module-picker-wrap.is-open .home-module-wheel-popover {
  pointer-events: auto;
  cursor: ns-resize;
}

.home-module-wheel-popover[hidden] {
  display: none !important;
}

.home-module-wheel-list {
  position: relative;
  isolation: isolate;
  display: grid;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
}

.home-module-wheel-list::before {
  content: "";
  position: absolute;
  top: -18px;
  right: 0;
  bottom: -18px;
  left: 0;
  z-index: 0;
  background: #ffffff;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 24%, #000 76%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 24%, #000 76%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
}

.home-module-wheel-list button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--home-wheel-item-height);
  padding: 0 8px;
  border: 0;
  color: var(--text-3);
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  transition: color 160ms ease, font-weight 160ms ease;
}

.home-module-wheel-list button:hover {
  color: var(--text-2);
}

.home-module-wheel-list button.active {
  color: var(--launch-primary, #8470FF);
  background: rgb(248 247 255 / 65%);
  font-size: 1em;
  font-weight: 600;
}

.home-hero-subtitle {
  margin: 0 auto;
  max-width: 540px;
  color: var(--text-3);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.home-hero-subtitle.is-progress {
  color: var(--text-2);
}

.home-hero-subtitle.is-error {
  color: var(--red);
}

.home-module-panels {
  width: 100%;
}

.home-module-panels [data-home-panel][hidden] {
  display: none !important;
}

.home-module-panels .launch-card {
  width: 100%;
}

.home-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 14px;
  line-height: 20px;
}

.home-platforms > span:first-child {
  color: var(--text-2);
}

.home-platform-logos {
  display: inline-flex;
  align-items: center;
  gap: 24px;
}

.home-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 400;
}

.home-platform-badge svg,
.home-platform-badge .home-platform-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.home-footer-meta {
  margin-top: 36px;
  text-align: center;
  color: var(--text-3);
  font-size: 11px;
  line-height: 18px;
}

@media (max-width: 760px) {
  .home-hero-title {
    font-size: 28px;
    line-height: 36px;
  }

  .home-hero-subtitle {
    font-size: 14px;
    line-height: 22px;
  }

  .home-entry-hub {
    padding-bottom: 32px;
  }
}

.auth-readonly-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-size: 14px;
  line-height: 1.5;
}

body.read-only-mode .sidebar-footer .icon-button[data-open-settings] {
  pointer-events: auto;
  opacity: 1;
}
