#home-view .hero {
  max-width: 880px;
  margin: clamp(38px, 5vw, 76px) auto clamp(38px, 5vw, 72px);
}

#home-view .hero h1 {
  font-size: clamp(28px, 4.25vw, 58px);
  line-height: 1.22;
  letter-spacing: -.035em;
  text-wrap: balance;
}

#home-view .hero-subtitle {
  color: #556f93;
  font-size: clamp(12px, 1.05vw, 15px);
  line-height: 1.7;
}

#home-view .composer {
  border-color: #d1dff4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px #254e8510;
}

#home-view .composer:focus-within {
  border-color: #93b4ee;
}

#home-view .composer textarea {
  min-height: 104px;
  padding: 17px 18px 8px;
  color: #1e3654;
  font-size: 15px;
}

#home-view .composer textarea::placeholder {
  color: #607795;
}

#home-view .composer-bottom {
  align-items: flex-start;
  gap: 8px;
  padding: 0 13px 13px;
}

#home-view .composer .send {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 6px;
  width: 96px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  color: #fff;
  background: #255fdf;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

#home-view .composer .send:hover:enabled {
  background: #1b50cb;
}

#home-view :is(.composer, .home-quick-actions) svg.studio-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#home-view .home-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

#home-view .generation-shortcut {
  --shortcut-ink: #2b5db0;
  --shortcut-wash: #eaf2ff;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid #dbe5f3;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: border-color .18s, background .18s, transform .18s;
}

#home-view .video-shortcut {
  --shortcut-ink: #554ca9;
  --shortcut-wash: #efedff;
}

#home-view .generation-shortcut:hover {
  border-color: #a9bfec;
  background: #f9fbff;
  transform: translateY(-2px);
}

.shortcut-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--shortcut-ink);
  background: var(--shortcut-wash);
}

#home-view .shortcut-glyph svg.studio-icon {
  width: 22px;
  height: 22px;
}

.shortcut-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shortcut-copy strong {
  color: #1f3b60;
  font-size: 14px;
  font-weight: 650;
}

.shortcut-copy small {
  color: #617899;
  font-size: 11px;
  line-height: 1.4;
}

.shortcut-arrow {
  color: #5d7da6;
}

#home-view .shortcut-arrow svg.studio-icon {
  width: 14px;
  height: 14px;
}

#home-view .canvas-shortcut {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 9px;
  color: #345d96;
  font-size: 13px;
  white-space: nowrap;
}

#home-view .home-quick-actions button:focus-visible,
#home-view .composer button:focus-visible {
  outline: 2px solid #2864e6;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  #home-view .home-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #home-view .canvas-shortcut {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 500px) {
  #home-view .home-quick-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  #home-view .composer-bottom {
    flex-wrap: wrap;
  }

  #home-view .home-generation-controls {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #home-view .generation-shortcut {
    transition: none;
    transform: none;
  }
}

.home-generation-controls {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  min-width: 0;
}

.home-generation-controls :is(.generation-mode-chip,.generation-reference) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f2f6fc;
  color: #315779;
  font-size: 13px;
}

.home-generation-controls .generation-reference:disabled {
  opacity: .45;
}

.home-generation-controls .generation-mode-chip {
  background: #eaf2ff;
  color: #245bb9;
  white-space: nowrap;
}

#home-view .composer .generation-option svg.studio-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.home-generation-controls .generation-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  max-width: 100%;
  padding: 0 4px;
  color: #365474;
  font-size: 13px;
}

.generation-option select {
  field-sizing: content;
  min-width: 0;
  max-width: min(32vw, 210px);
  padding: 4px 2px;
  border: 0;
  border-radius: 5px;
  color: #213c60;
  background: #fff;
  font: inherit;
}

.generation-option select:focus-visible {
  outline: 2px solid #8cb2f5;
}

.generation-attachment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 6px 4px 9px;
  border: 1px solid #d8e5f6;
  border-radius: 7px;
  color: #365474;
  background: #f6faff;
  font-size: 12px;
}

.generation-attachment span {
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-attachment button {
  border: 0;
  padding: 1px;
  background: transparent;
  color: #52769b;
}

.generation-feedback {
  flex-basis: 100%;
  margin: 0;
  color: #547197;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.generation-feedback:empty,
.generation-message:empty {
  display: none;
}

#home-view .generation-shortcut[aria-pressed="true"] {
  border-color: #9cb9f1;
  background: #f4f8ff;
}

.home-generation-result {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  background: #fff;
  color: #244365;
  text-align: left;
}

.home-generation-result header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.home-generation-result header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.generation-state {
  border-radius: 999px;
  padding: 4px 8px;
  color: #2b5db0;
  background: #edf4ff;
  font-size: 12px;
}

.generation-message {
  margin: 10px 0 0;
  color: #567091;
  overflow-wrap: anywhere;
}

.generation-outputs figure {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin: 12px 0 0;
}

.generation-outputs :is(img,video) {
  max-width: 100%;
  max-height: 490px;
  border-radius: 9px;
  background: #edf4ff;
}

.creative-workspace {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.mobile-nav-toggle,
.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 800px) {
  .creative-workspace .shell {
    margin-left: 0;
    min-width: 0;
  }

  .creative-workspace main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .creative-workspace .topbar {
    height: 60px;
    padding: 0 16px;
    gap: 12px;
  }

  .creative-workspace .top-actions {
    width: auto;
    margin-left: auto;
    gap: 8px;
  }

  .creative-workspace .top-actions .quiet {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .creative-workspace .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    font-size: 13px;
    white-space: nowrap;
  }

  .mobile-nav-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
  }

  .creative-workspace .sidebar {
    z-index: 52;
    width: min(280px, calc(100vw - 48px));
    height: 100%;
    height: 100dvh;
    padding: max(22px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: #fff;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s;
  }

  .creative-workspace.mobile-nav-open {
    overflow: hidden;
  }

  .creative-workspace.mobile-nav-open .sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  .creative-workspace .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 51;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #16315a66;
  }

  .creative-workspace .sidebar .brand {
    justify-content: flex-start;
    padding: 0 8px;
  }

  .creative-workspace .sidebar .brand > span:last-child,
  .creative-workspace .sidebar .new-project,
  .creative-workspace .sidebar .nav-label,
  .creative-workspace .sidebar .nav-divider,
  .creative-workspace .sidebar .nav-item i,
  .creative-workspace .sidebar .profile > span:not(.avatar) {
    display: block;
  }

  .creative-workspace .sidebar .new-project {
    display: flex;
    margin: 24px 0 14px;
  }

  .creative-workspace .sidebar nav {
    margin-top: 0;
    overscroll-behavior: contain;
  }

  .creative-workspace .sidebar .nav-item {
    justify-content: flex-start;
    min-height: 44px;
    margin: 3px 0;
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .creative-workspace .sidebar .profile {
    justify-content: flex-start;
    padding: 16px 6px 0;
  }

  .creative-workspace .toast {
    left: 50%;
    max-width: calc(100% - 32px);
  }

  .creative-workspace .projects-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .creative-workspace .projects-metrics > div {
    flex-wrap: nowrap;
  }

  .creative-workspace .projects-metrics span {
    width: auto;
  }

  .creative-workspace .projects-section .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  }

  .creative-workspace .app-workspace-panel {
    min-width: 0;
    padding: 16px;
  }

  #home-view .hero {
    margin: 32px auto 36px;
  }

  #home-view .hero h1 {
    font-size: clamp(27px, 7.7vw, 40px);
    line-height: 1.35;
    letter-spacing: -.03em;
  }

  #home-view .hero h1 > span {
    display: block;
  }

  #home-view .hero-subtitle {
    margin: 12px 0 22px;
    font-size: 13px;
  }

  #home-view .composer textarea {
    min-height: 132px;
    max-height: 38vh;
    padding: 16px;
    font-size: 16px;
  }

  #home-view .composer-bottom {
    flex-wrap: wrap;
    padding: 0 12px 12px;
  }

  #home-view .home-generation-controls {
    flex-basis: 100%;
    gap: 6px;
  }

  #home-view .generation-option {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    min-height: 44px;
    padding: 0 6px;
    border-radius: 7px;
    background: #f7f9fd;
  }

  #home-view .generation-option:has([name="generation-model"]) {
    flex-basis: 100%;
  }

  #home-view .generation-option select {
    flex: 1;
    width: 0;
    max-width: 100%;
    min-height: 40px;
    font-size: 16px;
    background: transparent;
  }

  #home-view .composer .send {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    font-size: 15px;
  }

  #home-view .home-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #home-view .generation-shortcut {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    min-height: 66px;
    padding: 9px;
  }

  #home-view .shortcut-glyph {
    width: 30px;
    height: 30px;
  }

  #home-view .shortcut-copy strong {
    font-size: 13px;
  }

  #home-view .shortcut-copy small {
    font-size: 10px;
  }

  #home-view .shortcut-arrow {
    display: none;
  }

  #home-view .canvas-shortcut {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  #home-view .generation-outputs :is(img, video) {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .creative-workspace #auth-dialog {
    width: calc(100vw - 28px);
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 20px;
  }

  .creative-workspace dialog input {
    font-size: 16px;
  }
}

@media (max-width: 800px) and (prefers-reduced-motion: reduce) {
  .creative-workspace .sidebar {
    transition: none;
  }
}
