main {
  position: relative;
  margin-left: 252px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 39px;
  border-bottom: 1px solid var(--line);
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12.32px;
}
.header-left {
  flex: 1;
  min-width: 0;
  margin-right: 16px;
}
.header-left > :not(#page-name),
.header-right {
  flex-shrink: 0;
}
#page-name {
  flex: 1;
  min-width: 0;
  max-width: 70ch;
  white-space: nowrap;
  overflow: hidden;
}
.workspace-label {
  color: #6e7665;
}
.workspace-label:hover {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.header-divider {
  color: #b8bfac;
}
.header-right {
  gap: 18px;
}
.site-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  /* The shared hover tint fills the button box, so give it room and round corners. */
  margin: -6px -4px -6px 0;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  font-size: 12.32px;
  color: #445434;
}
.site-home-btn:hover {
  color: var(--ink);
}
.site-home-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.help-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #d1d7c6;
  border-radius: 50%;
  font-size: 12.32px;
  color: #6d7a5a;
}
.chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 115px);
}
.chat-toolbar {
  padding: 22px 39px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.model-wrap {
  position: relative;
}
.model-button {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.44px;
  font-weight: 500;
  padding: 7px 10px;
  margin-left: -10px;
  border-radius: 10px;
}
.model-symbol {
  font-size: 24.64px;
  color: var(--green);
}
.chevron {
  font-size: 17.92px;
  color: #7c876f;
  margin-left: 3px;
  transition: transform 0.2s ease;
}
.model-button[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}
.toolbar-note {
  font-size: 11.2px;
  color: #6d775e;
  display: flex;
  align-items: center;
  gap: 7px;
}
.online-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #617840;
}
.chat-scroll {
  flex: 1;
  max-height: calc(100dvh - 365px);
  min-height: 355px;
  overflow: auto;
  padding: 0 32px;
  scroll-behavior: smooth;
}
.welcome {
  max-width: 740px;
  margin: 8px auto 12px;
  text-align: center;
}
.chat-scroll:has(.welcome:not([hidden])) {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.chat-view:has(.welcome:not([hidden])) .composer-area {
  margin-top: auto;
  padding-top: 16px;
}
.eyebrow {
  font-size: 10.08px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #697659;
  /* The dot flows with the text, so a wrapped line never leaves it alone at the edge. */
  text-align: center;
}
.eyebrow > span {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  /* Capital letters are about 0.7em tall: put the dot at half of that, not at the x-height middle. */
  vertical-align: calc(0.35em - 2px);
  background: #5e7346;
  border-radius: 50%;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 61.6px;
  line-height: 1.13;
  font-weight: 400;
  letter-spacing: -2.1px;
  margin: 22px 0 18px;
}
h1 > span {
  color: #465a2d;
}
.intro {
  font-size: 13.44px;
  line-height: 1.9;
  color: #747c6d;
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.suggestion {
  text-align: left;
  position: relative;
  border: 1px solid #e0e4d3;
  border-radius: 12px;
  background: #ffffff;
  padding: 18px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.suggestion:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px #00030008;
}
.suggestion-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 21.28px;
  margin-bottom: 15px;
}
.peach {
  background: #fdede2;
  color: #a56a46;
}
.sage {
  background: #ebf4e2;
  color: #546e39;
}
.lilac {
  background: #f1eff9;
  color: #767198;
}
.suggestion b {
  display: block;
  font-size: 12.32px;
  font-weight: 550;
  margin-bottom: 8px;
}
.suggestion > span:not(.suggestion-icon) {
  font-size: 11.2px;
  line-height: 1.75;
  color: #7f8577;
}
.suggestion em {
  position: absolute;
  right: 15px;
  top: 20px;
  font-style: normal;
  color: #a8b299;
}
.welcome-foot {
  color: #8d9582;
  font-size: 10.08px;
  margin: 14px auto;
}
.welcome-foot > span {
  color: #697c50;
  margin-right: 6px;
}
.composer-area {
  width: calc(100% - 64px);
  max-width: 740px;
  margin: 27px auto 15px;
}
.composer {
  background: #ffffff;
  border: 1px solid #d9dfc9;
  border-radius: 14px;
  padding: 18px 17px 12px;
  box-shadow: 0 4px 24px #091b0006;
}
.composer:focus-within {
  border-color: #8c9f74;
  box-shadow: 0 0 0 3px #253b0c08;
}
textarea {
  resize: none;
  width: 100%;
  border: 0;
  background: transparent;
  font:
    13.44px/1.7 "Golos Text",
    Arial;
  color: var(--ink);
  outline: none;
  height: auto;
  min-height: 56px;
  max-height: min(320px, 40dvh);
  field-sizing: content;
  overflow-y: auto;
}
textarea::placeholder {
  color: #808b72;
}
.composer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 9px;
}
.composer-controls > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.attach-btn {
  font-size: 26.88px;
  color: #6f7e5d;
  padding: 0 5px;
}
.composer-hint {
  font-size: 10.08px;
  color: #9da690;
}
.price-estimate {
  font-size: 11.2px;
  color: #808c6f;
}
.send {
  background: var(--fill);
  border-radius: 9px;
  color: white;
  font-size: 26.88px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.send:disabled {
  opacity: 0.45;
  cursor: wait;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10.08px;
  color: #8b947c;
  padding: 12px 2px;
  gap: 10px;
}
.composer-footer button {
  font-size: 10.08px;
  color: #6f7f5c;
  padding: 0;
}
.composer-footer button span {
  margin-left: 5px;
}
.main-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 11px 39px 14px;
  font-size: 10.08px;
  color: #9fa692;
}
.model-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -10px;
  width: min(440px, calc(100vw - 40px));
  background: white;
  box-shadow: 0 12px 40px #0000001a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  z-index: 5;
}
.menu-caption {
  font-size: 11.2px;
  color: #7e8573;
  padding: 10px;
}
.model-menu button {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  width: 100%;
  border-radius: 7px;
}
.model-menu button:hover {
  background: #f4f8ea;
}
/* Icons differ in width; a fixed box keeps all mode names on one line. */
.model-menu button > span {
  flex-shrink: 0;
  width: 26px;
  text-align: center;
  font-size: 23.52px;
  line-height: 1;
  color: var(--green);
}
.model-menu b {
  font-size: 13.44px;
  font-weight: 550;
}
.model-menu small {
  display: block;
  font-size: 11.2px;
  color: #748265;
  margin-top: 5px;
}
.model-menu em {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 11.2px;
  color: #6b7759;
  font-style: normal;
  margin-left: auto;
}
.messages {
  max-width: 740px;
  margin: auto;
}
.message {
  margin: 20px 0;
  line-height: 1.85;
  font-size: 14.56px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.user {
  background: #f1f4e8;
  padding: 13px 18px;
  border-radius: 14px 14px 3px 14px;
  width: max-content;
  max-width: 82%;
  margin-left: auto;
}
.message.assistant {
  display: flex;
  gap: 15px;
  padding: 16px 0;
}
.assistant-mark {
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1.3;
  color: var(--green);
}
.answer-content {
  flex: 1;
  min-width: 0;
}
/* Rendered Markdown in answers. */
.answer-text { white-space: normal; }
.answer-text > :first-child { margin-top: 0; }
.answer-text > :last-child { margin-bottom: 0; }
.answer-text p { margin: 0 0 12px; }
.answer-text h3, .answer-text h4 { font-weight: 700; line-height: 1.4; margin: 18px 0 8px; }
.answer-text h3 { font-size: 1.15em; }
.answer-text h4 { font-size: 1em; }
.answer-text ul, .answer-text ol { margin: 0 0 12px; padding-left: 1.4em; }
.answer-text li + li { margin-top: 4px; }
.answer-text code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: #eff1e7; border-radius: 5px; padding: 1px 5px; }
.answer-text pre { margin: 0 0 12px; padding: 12px 14px; background: #f3f5ec; border: 1px solid #dbe2d0; border-radius: 10px; overflow-x: auto; line-height: 1.5; }
.answer-text pre code { background: none; padding: 0; white-space: pre; overflow-wrap: normal; }
.answer-text blockquote { margin: 0 0 12px; padding: 2px 0 2px 14px; border-left: 3px solid #c9d2b9; color: #303e23; }
.answer-text hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.answer-table { overflow-x: auto; margin: 0 0 12px; border: 1px solid #dbe2d0; border-radius: 10px; }
.answer-table table { border-collapse: collapse; width: 100%; font-size: .92em; line-height: 1.5; }
.answer-table th, .answer-table td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e8ecdf; overflow-wrap: normal; min-width: 90px; }
.answer-table th { background: #f3f5ec; font-weight: 600; }
.answer-table tr:last-child td { border-bottom: 0; }
.answer-link { color: #3b5127; text-decoration: underline; overflow-wrap: anywhere; }
.answer-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  color: #899676;
  font-size: 10.08px;
  white-space: normal;
  margin-top: 14px;
}
.copy-answer {
  font-size: 11.2px;
  color: #556b3f;
  padding: 0;
}

.previous-image-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--green, #3b5127);
  font-size: 14px;
  cursor: pointer;
}
.previous-image-control input { accent-color: #3b5127; }
.previous-image-control[hidden] { display: none; }
.web-search-toggle {
  border: 1px solid #d7deca;
  border-radius: 20px;
  padding: 6px 10px;
  color: #485e36;
  white-space: nowrap;
  font-size: 12px;
}
.web-search-toggle[aria-pressed="true"] {
  background: #e6efda;
  border-color: #5e7842;
  color: #052000;
}
.web-search-toggle:disabled { opacity: .6; cursor: wait; }
.answer-source { color: #3b5127; text-decoration: underline; overflow-wrap: anywhere; }
.composer-controls { gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .composer-controls .composer-hint { display: none; }
  .composer-controls .send-group { margin-left: auto; }
}

.toolbar-selectors { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.request-type-select {
  font: inherit;
  color: #061f00;
  background: #f5f8ec;
  border: 1px solid #d2dcc6;
  border-radius: 12px;
  padding: 9px 30px 9px 12px;
  cursor: pointer;
  max-width: 100%;
}
.request-type-select:focus-visible { outline: 2px solid #5e7842; outline-offset: 2px; }
.generated-photo { display: block; width: min(100%,512px); height: auto; border-radius: 16px; margin-bottom: 12px; }
.download-photo { display: inline-block; color: #3b5127; margin-bottom: 12px; text-decoration: underline; }
@media (max-width: 600px) {
  .toolbar-selectors { gap: 8px; }
}

/* Keep the composer visible while large generated images scroll in the chat. */
main:has(.chat-view:not([hidden]) #welcome[hidden]) {
  height: 100dvh;
  min-height: 0;
}
.chat-view:has(#welcome[hidden]) { min-height: 0; }
.chat-view:has(#welcome[hidden]) .chat-scroll { min-height: 0; max-height: none; }
main:has(.chat-view:not([hidden]) #welcome[hidden]) header,
.chat-view:has(#welcome[hidden]) .chat-toolbar,
.chat-view:has(#welcome[hidden]) .composer-area,
main:has(.chat-view:not([hidden]) #welcome[hidden]) .main-footer { flex-shrink: 0; }
.generated-photo {
  width: auto;
  max-width: 100%;
  max-height: min(36dvh, 400px);
  object-fit: contain;
}

.choice-wrap { position: relative; width: fit-content; max-width: 100%; }
.type-choice-button {
  margin-left: 0;
  padding: 10px 14px;
  border: 1px solid #d2dcc6;
  background: #f5f8ec;
  color: #061f00;
  border-radius: 12px;
}
.type-choice-button .chevron { margin-left: 12px; }
.choice-menu { left: 0; z-index: 20; }
.choice-menu button[aria-checked="true"] { background: #eff5e6; }
.choice-menu button > div { min-width: 0; }
.choice-menu .choice-check { margin-left: auto; font-size: 16px; visibility: hidden; }
.choice-menu [aria-checked="true"] .choice-check { visibility: visible; }
#image-size-menu { max-height: min(65dvh, 520px); overflow-y: auto; }
#image-model-menu .choice-check { margin-left: 12px; }
#image-model-menu .image-model-price { margin-left: auto; }

/* The start screen: whatever text the app puts into the intro and the cards (the saved request type decides it, the
   examples are random), they keep the same size, so the placeholders and the page do not jump. A longer title or
   description ends with "…". Phones have their own fixed cards in responsive.css. */
@media (min-width: 761px) and (min-height: 501px), (min-width: 1001px) {
  .welcome .intro { min-height: 3.8em; }
  .welcome .suggestion b {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .welcome .suggestion > span:not(.suggestion-icon) {
    display: -webkit-box;
    overflow: hidden;
    min-height: 7em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

/* Three narrow columns (a window about 760-950 px wide) need more lines for the same texts. */
@media (min-width: 761px) and (max-width: 850px) and (min-height: 501px) {
  .welcome .suggestion b {
    min-height: 4.2em;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .welcome .suggestion > span:not(.suggestion-icon) {
    min-height: 10.5em;
    -webkit-line-clamp: 6;
    line-clamp: 6;
  }
}
@media (min-width: 851px) and (max-width: 950px) and (min-height: 501px) {
  .welcome .suggestion > span:not(.suggestion-icon) {
    min-height: 8.75em;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

/* "Текстовый запрос" and "Создать фото" are different widths; the selector keeps one width, so the row does not shift when the
   app puts the saved request type in. */
@media (min-width: 761px) {
  #request-type { min-width: 11.5rem; }
}
