.home-page {
  max-width: 1520px;
}

/* Sidebar & Header soft AI Modeling highlight */
.app-sidebar nav > a.nav-ai-featured {
  background: #edf7f0;
  color: #166534;
  font-weight: 600;
}
.app-sidebar nav > a.nav-ai-featured svg {
  stroke: #00a844;
}
.app-sidebar nav > a.nav-ai-featured:hover,
.app-sidebar nav > a.nav-ai-featured.active {
  background: #e1f3e7;
  color: #0f5329;
}
.nav-ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00b34c;
  margin-left: auto;
  flex-shrink: 0;
}
.app-header .header-ai {
  background: #edf7f0;
  border: 1px solid #cbe8d4;
  color: #146c37;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.app-header .header-ai:hover {
  background: #dff0e5;
  border-color: #a8dab8;
}

/* 1. Organic Studio Hero */
.home-studio-hero {
  background:
    radial-gradient(82% 115% at 79% 46%, rgba(0, 172, 70, 0.11), transparent 70%),
    radial-gradient(55% 75% at 8% 12%, rgba(0, 172, 70, 0.05), transparent 62%),
    #ffffff;
  border: 1px solid #e2eae3;
  border-radius: 24px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.home-hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-hero-eyebrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #f2f5f2;
  color: #5b695e;
  font-size: 12px;
  font-weight: 500;
}
.home-hero-eyebrow i {
  font-style: normal;
  color: #00a844;
}

.home-hero-copy h1 {
  font-size: clamp(23px, 2.3vw, 31px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.4px;
  color: #1f2621;
  margin: 0;
}
.home-hero-copy h1:focus {
  outline: none;
}

.home-hero-lead {
  font-size: 13px;
  line-height: 1.75;
  color: #6f7971;
  margin: -2px 0 2px;
}

/* Unified Conversational Composer */
.home-composer {
  background: #f8faf8;
  border: 1px solid #dde6de;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.home-composer:focus-within {
  background: #ffffff;
  border-color: #86ca9e;
  box-shadow: 0 8px 26px rgba(0, 168, 68, 0.08);
}

#home-ai-input {
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  font-size: 14px;
  line-height: 1.7;
  color: #222b24;
  padding: 0;
  min-height: 48px;
}
#home-ai-input:focus {
  outline: none;
}

/* Optional Subtle mm Pill Drawer */
.home-mm-drawer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e7ede8;
  font-size: 12px;
  color: #6b766d;
}
.home-mm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff3ef;
  border-radius: 999px;
  padding: 4px 11px;
  color: #5c685e;
}
.home-mm-pill input {
  width: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #202922;
  padding: 0;
  appearance: textfield;
}
.home-mm-pill input::-webkit-inner-spin-button,
.home-mm-pill input::-webkit-outer-spin-button {
  appearance: none;
}
.home-mm-pill input:focus {
  outline: none;
}
.home-mm-note {
  margin-left: auto;
  font-size: 11px;
  color: #7c8a7f;
}

.home-composer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.home-mode-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: #edf1ed;
  border-radius: 999px;
}
.home-mode-pills button {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  color: #68736a;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.home-mode-pills button[aria-pressed="true"] {
  background: #ffffff;
  color: #1e2820;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(25, 42, 30, 0.08);
}

.home-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  background: #dff3e6;
  border: 1px solid #9ad5b0;
  color: #0e6932;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.18s ease, transform 0.16s ease;
}
.home-cta-pill:hover {
  background: #cfebd9;
  transform: translateY(-1px);
}

/* Inspiration Chips */
.home-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #7a847c;
}
.home-preset-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8e3;
  color: #5a655c;
  font-size: 12px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.home-preset-row button:hover {
  border-color: #b7d8c1;
  color: #1f3325;
}
.home-preset-row button i {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ad49;
}
.home-preset-row button[aria-pressed="true"] {
  background: #eaf6ee;
  border-color: #9ed6b3;
  color: #145e30;
  font-weight: 550;
}
.home-preset-row button[aria-pressed="true"] i {
  display: inline-block;
}

/* Seamless 3D WebGL Studio Turntable Stage */
.home-hero-stage {
  position: relative;
  min-width: 0;
  min-height: 282px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.home-turntable-stage {
  width: 100%;
  max-width: 430px;
  height: 266px;
  position: relative;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.home-turntable-stage:active {
  cursor: grabbing;
}
.home-turntable-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}
.home-turntable-fallback {
  max-width: 78%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 14px 24px rgba(25, 48, 33, 0.14));
}

.home-glass-pill {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid #dfe7e0;
  border-radius: 999px;
  font-size: 12px;
  color: #2d3830;
  box-shadow: 0 4px 16px rgba(32, 52, 38, 0.05);
}
.home-part-pill {
  position: absolute;
  top: 4px;
  right: 8px;
  padding: 6px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.home-part-pill:hover {
  transform: scale(1.03);
  border-color: #9ad5b0;
}
.home-part-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00b34c;
  flex-shrink: 0;
}
.home-spec-pill {
  margin-top: -8px;
  padding: 6px 15px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.home-spec-pill strong {
  font-weight: 600;
  color: #222b24;
}
.home-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #6b766d;
  font-size: 11px;
}
.home-spec-pill a {
  color: #0f8a41;
  font-weight: 600;
}
.home-spec-pill a:hover {
  text-decoration: underline;
}

/* 2. Three Natural Visual Spaces */
.home-spaces {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-space-card {
  background: #ffffff;
  border: 1px solid #e6eae6;
  border-radius: 18px;
  padding: 19px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.home-space-card:hover {
  transform: translateY(-2px);
  border-color: #bddac6;
  box-shadow: 0 6px 20px rgba(34, 58, 40, 0.04);
}

.home-space-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.home-space-head h2 {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  color: #222823;
  margin: 0;
}
.home-space-head p {
  font-size: 12px;
  line-height: 1.6;
  color: #7c857d;
  margin: 4px 0 0;
}
.home-space-head > a {
  flex-shrink: 0;
  font-size: 12px;
  color: #6c776e;
  white-space: nowrap;
}
.home-space-head > a:hover {
  color: #009e40;
}

/* Card 1: Live Parametric Tray Resizer */
.home-resizer-box {
  background: #f4f6f4;
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.home-resizer-stage {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-tray-shape {
  height: 34px;
  width: 136px;
  max-width: 100%;
  border-radius: 8px;
  border: 1.8px solid #1aa852;
  background: #e4f4ea;
  color: #145e30;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.08s ease, background 0.16s ease;
}
.home-tray-shape:hover {
  background: #d6eedf;
}
.home-resizer-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #778178;
}
.home-resizer-slider span {
  flex-shrink: 0;
  white-space: nowrap;
}
.home-resizer-slider input[type="range"] {
  width: 100%;
  accent-color: #00a844;
  cursor: pointer;
}

/* Card 2: Mini Category Tiles */
.home-mini-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.home-mini-tiles a {
  background: #f4f6f4;
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  font-size: 12px;
  font-weight: 550;
  color: #364038;
  transition: background 0.16s ease, color 0.16s ease;
}
.home-mini-tiles a:hover {
  background: #eaf5ed;
  color: #0f6932;
}
.home-mini-tiles svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
}
.home-mini-tiles span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card 3: Warm Community & Contest Bubbles */
.home-clinic-bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-bubble-row {
  background: #f4f6f4;
  border-radius: 11px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #3a433c;
  min-width: 0;
  transition: background 0.16s ease;
}
.home-bubble-row:hover {
  background: #eaf5ed;
}
.home-bubble-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-bubble-row b {
  flex-shrink: 0;
  font-weight: 550;
  font-size: 11px;
  color: #6d786f;
}
.home-bubble-row b.is-solved {
  color: #0f8a41;
}

/* 3. Featured Gallery & Lower Sections */
.home-section {
  margin-top: 30px;
}
.home-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.home-section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}
.home-section-heading h2 {
  font-size: 19px;
  font-weight: 650;
  margin: 0;
  letter-spacing: 0;
  white-space: nowrap;
}
.home-section-heading p {
  font-size: 12px;
  color: #999;
  margin: 0;
}
.home-section-heading > a {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
}
.home-section-heading > a:hover {
  color: #009e40;
}

.home-gallery-heading {
  align-items: center;
}
.home-gallery-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.home-gallery-bar::-webkit-scrollbar {
  display: none;
}

.home-categories {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0;
  padding: 2px 0;
}
.home-categories::-webkit-scrollbar {
  display: none;
}
.home-categories button {
  flex-shrink: 0;
  background: #ecefec;
  color: #586059;
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.home-categories button:hover {
  background: #e1e6e2;
}
.home-categories button[aria-pressed="true"] {
  background: #232824;
  color: #ffffff;
}

.home-model-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
}
.home-page .home-model-grid .model-image {
  aspect-ratio: 1.33;
  border-radius: 14px;
}
.home-model-grid .model-meta .unverified {
  display: none;
}
.home-model-grid .model-card-info > p {
  font-size: 11px;
}
.home-model-grid .model-title-row h3 {
  font-size: 13px;
}
.home-model-grid .model-meta {
  margin-top: 7px;
  font-size: 10px;
}
.home-model-grid .model-image .tag {
  font-size: 10px;
  border-radius: 999px;
  padding: 3px 9px;
}
.home-model-grid .model-image > img,
.home-model-grid .model-image > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.home-discussions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.home-discussion {
  padding: 19px;
  background: #fff;
  border: 1px solid #e8ece8;
  border-radius: 14px;
  min-width: 0;
  transition: border-color 0.16s ease;
}
.home-discussion:hover {
  border-color: #bddac6;
}
.home-discussion-type {
  font-size: 11px;
  color: #4f7b5b;
  display: flex;
  align-items: center;
  gap: 5px;
}
.home-discussion-type .example-mark {
  font-size: 9px;
  color: #999;
}
.home-discussion h3 {
  font-size: 13px;
  line-height: 1.75;
  font-weight: 550;
  margin: 10px 0 16px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 45px;
}
.home-discussion-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: #949994;
}
.home-discussion-meta > span:last-child {
  margin-left: auto;
  white-space: nowrap;
}
.home-avatar {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  background: #eaf3ec;
  color: #4d7857;
  border-radius: 50%;
  font-size: 10px;
}
.home-community-empty {
  grid-column: 1 / -1;
  padding: 24px;
  background: #fff;
  border: 1px solid #eaecea;
  border-radius: 14px;
  font-size: 12px;
  color: #888;
}

.home-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: #9ca39d;
  margin-top: 32px;
}
.home-footer i {
  font-style: normal;
  color: #ccc;
}
.home-footer a:hover {
  color: #009e40;
}

/* Responsive Breakpoints */
@media (max-width: 1150px) {
  .home-studio-hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    padding: 24px;
    gap: 20px;
  }
  .home-spaces {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .home-model-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 15px;
  }
}

@media (max-width: 960px) {
  .home-studio-hero {
    grid-template-columns: 1fr;
    padding: 22px 20px;
  }
  .home-hero-stage {
    min-height: 230px;
  }
  .home-discussions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-discussion:last-child {
    display: none;
  }
  .home-section-heading p {
    display: none;
  }
}

@media (max-width: 650px) {
  .home-studio-hero {
    padding: 18px 16px;
    border-radius: 18px;
    gap: 18px;
  }
  .home-hero-copy h1 {
    font-size: 22px;
  }
  .home-composer {
    padding: 12px 13px;
    border-radius: 14px;
  }
  .home-mm-note {
    width: 100%;
    margin-left: 0;
  }
  .home-cta-pill {
    width: 100%;
    justify-content: center;
  }
  .home-mode-pills {
    width: 100%;
  }
  .home-mode-pills button {
    flex: 1;
    text-align: center;
  }
  .home-turntable-stage {
    height: 224px;
  }
  .home-part-pill {
    right: 0;
    font-size: 11px;
    padding: 5px 11px;
  }
  .home-space-card {
    padding: 16px;
    border-radius: 15px;
  }
  .home-gallery-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .home-gallery-bar {
    flex-wrap: wrap;
  }
  .home-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 13px;
  }
  .home-model-grid .model-card:nth-child(n + 5) {
    display: none;
  }
  .home-discussions {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-space-card,
  .home-cta-pill,
  .home-part-pill,
  .home-tray-shape {
    transition: none;
  }
}
