@media (min-width: 901px) {
  html body .ai-tool-page.ai-image-creation-page,
  html body .ai-tool-page:has(> .ai-image-history-compact) {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 48px !important;
    gap: 0 !important;
    height: calc(100dvh - 86px) !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
    background-image: none !important;
    box-shadow: 0 18px 46px rgba(55, 112, 184, 0.09) !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page::before,
  html body .ai-tool-page.ai-image-creation-page::after,
  html body .ai-tool-page:has(> .ai-image-history-compact)::before,
  html body .ai-tool-page:has(> .ai-image-history-compact)::after {
    content: none !important;
    display: none !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-grid,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-grid {
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(440px, 32%) minmax(0, 1fr) !important;
    gap: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    background: rgba(255, 255, 255, 0.46) !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    gap: 10px !important;
    min-height: 0 !important;
    height: 100% !important;
    max-width: none !important;
    padding: 8px 12px 12px !important;
    border: 0 !important;
    border-right: 1px solid rgba(190, 219, 249, 0.98) !important;
    background: transparent !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left::after,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left::after {
    content: none !important;
    display: none !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-title,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-title {
    flex: 0 0 34px !important;
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-title-icon,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-title-icon {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 28px !important;
    border: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #1677ff !important;
    box-shadow: none !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-title h1,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-title h1 {
    margin: 0 !important;
    font-size: 20px !important;
    line-height: 1.1 !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-title p,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-title p {
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    color: #365476 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-card h2,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-card h2 {
    margin: 0 0 4px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-card p,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-card p {
    margin: 0 0 7px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-form-grid,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-triple,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-field,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-field {
    gap: 4px !important;
    margin-bottom: 7px !important;
    font-size: 12px !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-field select,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-field input,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-card input,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-field select,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-field input,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-card input {
    min-height: 28px !important;
    height: 28px !important;
    border: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  html body .ai-tool-page.ai-image-creation-page textarea,
  html body .ai-tool-page:has(> .ai-image-history-compact) textarea {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 88px !important;
    padding: 9px 11px !important;
    border: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 8px !important;
    background: #eef4fb !important;
    resize: vertical !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-image-actions,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-actions {
    display: grid !important;
    grid-template-columns: auto auto minmax(150px, 1fr) !important;
    gap: 8px !important;
    margin-top: 7px !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-image-actions button,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-actions button {
    min-height: 30px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
  }

  html body .ai-tool-page.ai-image-creation-page .image-generate-main,
  html body .ai-tool-page:has(> .ai-image-history-compact) .image-generate-main {
    width: 100% !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-result,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-result {
    grid-column: 2 !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-rows: 42px minmax(0, 1fr) !important;
    border: 0 !important;
    border-left: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-result-head,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-result-head {
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(190, 219, 249, 0.98) !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 850 !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-empty,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-empty {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    place-content: center !important;
    justify-items: center !important;
  }

  html body .ai-tool-page.ai-image-creation-page > .ai-tool-history,
  html body .ai-tool-page.ai-image-creation-page > .ai-image-history-compact,
  html body .ai-tool-page:has(> .ai-image-history-compact) > .ai-tool-history,
  html body .ai-tool-page:has(> .ai-image-history-compact) > .ai-image-history-compact {
    grid-row: 2 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border: 0 !important;
    border-top: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-history-head,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-history-head {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-history-head h2,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-history-head span,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-history-head h2,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-history-head span {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-image-history-grid,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-history-grid {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-image-history-grid button,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-history-grid button {
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 7px !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-image-history-grid img,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-history-grid img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-image-history-grid span,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-history-grid span {
    display: none !important;
  }
}

@media (min-width: 901px) {
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left {
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type textarea,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type textarea,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type textarea,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type textarea {
    flex: 1 1 auto !important;
    min-height: 180px !important;
    height: auto !important;
    max-height: none !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type .ai-tool-card-head,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type .ai-tool-triple,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type .ai-tool-model-note,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type .ai-tool-field,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type .ai-reference-list,
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type .ai-tool-actions {
    flex: 0 0 auto !important;
  }
}

@media (min-width: 901px) {
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 48px !important;
    gap: 0 !important;
    height: calc(100dvh - var(--woof-frame-top, 70px) - var(--woof-frame-bottom, 18px)) !important;
    max-height: calc(100dvh - var(--woof-frame-top, 70px) - var(--woof-frame-bottom, 18px)) !important;
    padding: 0 !important;
    background: #f8fbff !important;
    background-image: none !important;
    overflow: hidden !important;
  }

  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-grid,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-grid {
    display: grid !important;
    grid-template-columns: minmax(440px, 32%) minmax(0, 1fr) !important;
    gap: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    background: rgba(255, 255, 255, 0.46) !important;
    overflow: hidden !important;
  }

  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left {
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    max-width: none !important;
    padding: 8px 12px 12px !important;
    border-right: 1px solid rgba(190, 219, 249, 0.98) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-result,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-result {
    grid-column: 2 !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-rows: 42px minmax(0, 1fr) !important;
    border: 0 !important;
    border-left: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page > .ai-tool-history,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page > .ai-image-history-compact,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) > .ai-tool-history,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) > .ai-image-history-compact {
    grid-row: 2 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    display: flex !important;
    align-items: center !important;
    border-top: 1px solid rgba(190, 219, 249, 0.98) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    overflow: hidden !important;
  }
}

@media (min-width: 901px) {
  html body .ai-tool-page.ai-image-creation-page .ai-tool-left,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left {
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  html body .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type textarea,
  html body:has(.app-sider) .ai-tool-page.ai-image-creation-page .ai-tool-left > .ai-tool-card:last-of-type textarea,
  html body .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type textarea,
  html body:has(.app-sider) .ai-tool-page:has(> .ai-image-history-compact) .ai-tool-left > .ai-tool-card:last-of-type textarea {
    flex: 1 1 auto !important;
    min-height: 180px !important;
    height: auto !important;
    max-height: none !important;
  }
}

html body .ai-tool-page.ai-image-creation-page .ai-image-result-grid,
html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-result-grid {
  height: 100% !important;
  min-height: 0 !important;
  padding: 18px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  grid-auto-rows: minmax(220px, 1fr) !important;
  gap: 14px !important;
  align-content: start !important;
  overflow: auto !important;
}

html body .ai-tool-page.ai-image-creation-page .ai-image-result-grid button,
html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-result-grid button {
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 34px !important;
  border: 1px solid rgba(190, 219, 249, 0.98) !important;
  border-radius: 0 !important;
  background: #fff !important;
  overflow: hidden !important;
}

html body .ai-tool-page.ai-image-creation-page .ai-image-result-grid img,
html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-result-grid img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 0 !important;
  clip-path: none !important;
  background: #fff !important;
}

html body .ai-tool-page.ai-image-creation-page .ai-image-result-grid span,
html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-result-grid span {
  height: 34px !important;
  padding: 8px 10px !important;
  display: block !important;
  border-top: 1px solid rgba(190, 219, 249, 0.72) !important;
  background: #fff !important;
  font-size: 12px !important;
  line-height: 18px !important;
}

html body .ai-tool-page.ai-image-creation-page .ai-image-history-grid img,
html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-history-grid img {
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 0 !important;
  clip-path: none !important;
  background: #fff !important;
}

html body .ai-tool-page.ai-image-creation-page .ai-image-lightbox img,
html body .ai-tool-page:has(> .ai-image-history-compact) .ai-image-lightbox img {
  object-fit: contain !important;
  border-radius: 0 !important;
  clip-path: none !important;
  background: #fff !important;
}
