:root {
  --accent: #096caf;
  --ink: #163552;
  --hover: #e7eef5;
}
.brand {
  gap: 7px;
  padding: 0 3px 25px;
}
.brand .blue-symbol {
  width: 33px;
  height: 38px;
  object-fit: cover;
  mix-blend-mode: multiply;
  border-radius: 0;
  flex-shrink: 0;
}
.blue-wordmark {
  display: block;
  width: 157px;
  height: 36px;
  overflow: hidden;
  position: relative;
  mix-blend-mode: multiply;
}
.brand .blue-wordmark img {
  position: absolute;
  width: 186px;
  height: 93px;
  max-width: none;
  left: -16px;
  top: -28px;
  border-radius: 0;
}
.dark .blue-symbol,
.dark .blue-wordmark {
  mix-blend-mode: screen;
  filter: invert(1) hue-rotate(180deg);
}
.model span {
  background: #eaf3fb;
  color: #276b9c;
}
.dark .model span {
  background: #223e54;
  color: #9fd7ff;
}
.build-prompt {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  margin: 12px 0;
  min-height: 130px;
}
.build-submit {
  padding: 12px 16px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-weight: 600;
}
.build-submit:disabled {
  opacity: 0.5;
}
.build-status {
  font-size: 12px;
  color: var(--muted);
  min-height: 24px;
}
#artifact {
  width: 48%;
  flex-shrink: 0;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--card);
  padding: 0;
}
#artifact[hidden],
#artifactFrame[hidden],
#artifactSource[hidden] {
  display: none;
}
.artifact-header {
  padding: 18px 14px;
  display: flex;
  justify-content: space-between;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.artifact-header > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.artifact-header button,
.artifact-header a {
  font-size: 10px;
  color: var(--accent);
  padding: 5px;
  text-decoration: none;
}
.artifact-address {
  padding: 10px 14px;
  background: var(--side);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.artifact-address button {
  margin-left: auto;
}
#artifactFrame {
  border: 0;
  width: 100%;
  flex: 1;
  background: white;
}
#artifactSource {
  margin: 0;
  padding: 20px;
  font: 11px/1.6 monospace;
  overflow: auto;
  white-space: pre-wrap;
  flex: 1;
}
.with-artifact aside {
  margin-left: -260px;
}
.with-artifact #menu {
  display: inline-grid;
}
.with-artifact h1 {
  font-size: 33px;
}
.with-artifact .suggestions {
  grid-template-columns: 1fr;
}
.with-artifact .suggestions button {
  padding: 12px;
}
.with-artifact .suggestions button > span {
  display: none;
}
.with-artifact header {
  padding: 20px 16px;
}
.with-artifact .composer-wrap {
  width: calc(100% - 28px);
}
@media (max-width: 850px) {
  #artifact {
    position: fixed;
    inset: 70px 12px 16px;
    width: auto;
    z-index: 25;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 20px 80px #0005;
    overflow: hidden;
  }
  .artifact-header {
    flex-wrap: wrap;
  }
  .with-artifact aside {
    margin-left: 0;
  }
}
@media (min-width: 651px) and (max-width: 900px) {
  .brand .blue-wordmark {
    width: 132px;
  }
  .brand .blue-wordmark img {
    width: 158px;
    height: 79px;
    left: -14px;
    top: -23px;
  }
}
.brand .blue-wordmark {
  flex: 0 0 145px;
  width: 145px;
  height: 32px;
}
.brand .blue-wordmark img {
  width: 172px;
  height: 86px;
  left: -14px;
  top: -27px;
}
.brand {
  gap: 5px;
  padding-left: 0;
  padding-right: 0;
}
.brand .blue-symbol {
  width: 29px;
  height: 34px;
}
.brand > .icon {
  width: 28px;
  flex: 0 0 28px;
  margin-left: 0;
}
.model .top-wordmark {
  background: none;
  padding: 0;
  border-radius: 0;
  flex: 0 0 155px;
  width: 155px;
  height: 32px;
}
.model .top-wordmark img {
  position: absolute;
  width: 182px;
  height: 91px;
  left: -15px;
  top: -28px;
}
.dark .top-wordmark {
  mix-blend-mode: screen;
  filter: invert(1) hue-rotate(180deg);
}
@media (min-width: 651px) and (max-width: 900px) {
  .brand .blue-wordmark {
    flex-basis: 122px;
    width: 122px;
  }
  .brand .blue-wordmark img {
    width: 144px;
    height: 72px;
    left: -12px;
    top: -19px;
  }
}
@media (max-width: 650px) {
  .model .top-wordmark {
    flex-basis: 125px;
    width: 125px;
    height: 30px;
  }
  .model .top-wordmark img {
    width: 149px;
    height: 74.5px;
    left: -13px;
    top: -20px;
  }
  .header-right .outline {
    display: none;
  }
}
.generated-image {
  display: block;
  max-width: min(100%, 540px);
  max-height: 650px;
  object-fit: contain;
  border-radius: 14px;
  margin: 14px 0;
  background: var(--side);
}
.image-download {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 8px;
}
#dialogContent select {
  margin: 12px 8px 12px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
}
#imageReferences {
  display: block;
  margin: 12px 0 20px;
  max-width: 100%;
}

.generated-image {
  cursor: zoom-in;
}
.image-feedback {
  display: inline-flex;
  gap: 6px;
  margin: 0 8px 10px;
  vertical-align: middle;
}
.image-feedback button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--muted);
}
.image-feedback button:hover {
  background: var(--hover);
}
.image-feedback button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--hover);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
#imageLightbox {
  width: 95vw;
  max-width: 1400px;
  height: 92vh;
  max-height: 92vh;
  padding: 12px;
  background: var(--card);
}
.zoom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  border-bottom: 1px solid var(--line);
}
.zoom-bar button {
  padding: 8px 13px;
  border-radius: 7px;
}
.zoom-bar button:hover {
  background: var(--hover);
}
.zoom-value {
  font-size: 11px;
  color: var(--muted);
}
.zoom-canvas {
  height: calc(100% - 44px);
  overflow: auto;
  text-align: center;
  padding: 15px;
  display: grid;
  justify-items: center;
  align-items: start;
}
.zoom-canvas img {
  object-fit: contain;
  border-radius: 8px;
}

/* Extras do chat (14/10/2026): texto formatado, links, mapa, imagens coladas, modo */
.msg-body {
  white-space: normal;
}
.msg-body p {
  margin: 0 0 10px;
}
.msg-body p:last-child,
.msg-body ul:last-child,
.msg-body ol:last-child {
  margin-bottom: 0;
}
.msg-body .msg-titulo {
  margin-top: 14px;
}
.msg-body ul,
.msg-body ol {
  margin: 4px 0 12px;
  padding-left: 22px;
}
.msg-body li {
  margin: 3px 0;
}
.msg-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.msg-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--side);
  font-size: 0.92em;
}
.msg-user-text {
  white-space: pre-wrap;
}
.map-embed {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  max-width: 520px;
  background: var(--side);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.msg-anexos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.msg-anexo {
  max-width: 220px;
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
  cursor: zoom-in;
}
.foto-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 6px 0;
}
.foto-chip img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
}
.foto-chip span {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-wrap.arrastando #composer {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}
#modeButton.modo-avancado #modeLabel {
  background: var(--accent);
  color: #fff;
}
.build-url {
  width: 100%;
  margin-bottom: 10px;
}
