#modeHome {display: none;}
body.home-mode {background: #f5f7f7; overflow: auto;}
body.home-mode > .sidebar, body.home-mode > main {display: none !important;}
body.home-mode #modeHome {display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 56px 32px;}
.home-inner {width: 100%; max-width: 980px; margin: auto;}
.home-heading {margin: 0 0 38px;}
.home-heading > span {font-size: 13px; font-weight: 600; color: #688178;}
.home-heading h1 {font-size: 32px; font-weight: 600; line-height: 1.4; margin: 8px 0 0;}
.mode-entries {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px;}
.mode-entry {text-align: left; display: flex; flex-direction: column; align-items: flex-start; height: 320px; padding: 32px; border: 1px solid #dce3e1; background: white; border-radius: 8px; transition: border-color .15s, background .15s;}
.mode-entry:hover {border-color: #799a8b; background: #fcfefd;}
.mode-entry .entry-icon {width: 34px; height: 34px; color: #285c47; margin-bottom: 26px; stroke-width: 1.5;}
.image-entry .entry-icon {color: #256b82;}
.mode-entry strong {font-size: 30px; font-weight: 600; line-height: 1.4;}
.entry-description {color: #737e79; font-size: 14px; margin-top: 12px;}
.entry-go {display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 22px; border-top: 1px solid #edf0ee; font-size: 14px; color: #285c47;}
.image-entry .entry-go {color: #256b82;}
.entry-go svg {width: 22px; height: 22px;}
.mode-entry:focus-within, .image-entry[data-dragging] {border-color: #799a8b; background: #fcfefd;}
.mode-entry button.entry-go {border: 0; border-top: 1px solid #edf0ee; border-radius: 0; background: transparent; padding-left: 0; padding-right: 0; padding-bottom: 0;}
.home-search-field {display: flex; width: 100%; height: 48px; margin-top: 20px; border: 1px solid #ccd8d1; border-radius: 5px; overflow: hidden; background: white;}
.home-search-field input {width: 100%; min-width: 0; flex: 1; border: 0; background: transparent; font-size: 15px; padding: 10px 12px; outline-offset: -3px;}
.home-search-field button {width: 48px; min-width: 48px; height: 46px; padding: 10px; border: 0; border-radius: 0; background: #285c47; color: white; display: grid; place-items: center;}
.home-image-actions {display: flex; gap: 10px; width: 100%; margin-top: 20px;}
.home-image-actions button {display: inline-flex; justify-content: center; align-items: center; gap: 8px; height: 48px; flex: 1; font-size: 14px; white-space: nowrap;}
.home-image-actions [data-action="upload"] {background: #256b82; border-color: #256b82; color: white;}
.mode-heading {display: flex; align-items: center; gap: 20px; height: 44px; margin-bottom: 8px;}
.mode-heading h2 {margin: 0; font-size: 18px; line-height: 24px; font-weight: 600;}
.mode-heading .text-button {display: inline-flex; gap: 7px; align-items: center; color: #69736f;}
#switchMode {margin-left: auto;}
.query-bar #composer > .image-search {display: none;}
.query-bar #composer {height: 48px;}
.query-bar #prompt {font-size: 16px; padding: 10px 12px;}
.query-bar #prompt {height: 44px;}
.query-bar #send {width: 90px; height: 44px; gap: 7px; font-size: 14px;}
.query-bar #send svg {width: 18px;}
body.image-search-mode .query-bar #composer {display: none;}
body.image-search-mode .image-mode-heading {display: none;}
body.image-search-mode .query-bar .conditions::after {content: none;}
body.image-search-mode #workspace:has(#imageUpload:not([hidden])) {display: block;}
body.image-search-mode #workspace:has(#imageUpload:not([hidden])) #imageInput {max-width: 900px; height: auto; margin: 32px auto; padding: 0; border: 0;}
body.image-search-mode .upload-target {min-height: 340px; background: #f7faf9;}
body.image-search-mode #imageInput:not(:has(#imageUpload:not([hidden]))) .image-stage-actions [data-action="imageOptions"] {display: inline-flex;}
.query-bar .mode-image-options {display: none; flex: none; white-space: nowrap; align-items: center; gap: 5px;}
body.image-search-mode .query-bar .mode-image-options {display: inline-flex;}
body.image-search-mode #cancelQuery {display: none;}
#modeCancel {display: none;}
body.image-search-mode #modeCancel:not([hidden]) {display: inline-flex;}
@media(max-width:760px) {
  body.home-mode #modeHome {padding: 28px 20px;}
  .home-inner {max-width: 440px;}
  .home-heading {margin-bottom: 24px;}
  .home-heading h1 {font-size: 26px;}
  .mode-entries {grid-template-columns: 1fr; gap: 16px;}
  .mode-entry {height: 218px; padding: 24px;}
  .mode-entry .entry-icon {width: 28px; height: 28px; margin-bottom: 12px;}
  .mode-entry strong {font-size: 26px;}
  .entry-description {margin-top: 6px; font-size: 13px;}
  .entry-go {padding-top: 12px; font-size: 13px;}
  .home-search-field, .home-image-actions {margin-top: 12px;}
  .home-search-field {height: 42px;}
  .home-search-field input {font-size: 16px; padding: 8px;}
  .home-search-field button {height: 40px; min-width: 40px; width: 40px;}
  .home-image-actions button {height: 42px; font-size: 13px; padding: 6px;}
  .mode-heading {gap: 8px; height: 40px; margin-bottom: 6px;}
  .mode-heading #sidebarToggle {width: 28px; height: 32px; padding: 5px;}
  .mode-heading:has(#modeCancel:not([hidden])) #switchMode {display: none;}
  .mode-heading h2 {font-size: 16px;}
  .mode-heading .text-button {font-size: 11px; padding: 4px 0; gap: 4px;}
  .mode-heading .text-button svg {width: 14px;}
  .query-bar #send {width: 68px; font-size: 13px;}
  .mode-image-options span {display: none;}
  body.image-search-mode .upload-target {min-height: 280px;}
  body.image-search-mode #workspace:has(#imageUpload:not([hidden])) #imageInput {margin: 12px auto;}
  body.sidebar-mobile-open .sidebar {top: 152px;}
  body.image-search-mode.sidebar-mobile-open .sidebar {top: 100px;}
}
@media(max-width:760px) and (max-height:650px) {
  body.home-mode #modeHome {padding: 20px;}
  .home-heading {margin-bottom: 18px;}
  .mode-entry {height: 198px; padding: 16px 22px;}
  .mode-entry .entry-icon {margin-bottom: 6px; width: 24px; height: 24px;}
}
