.intent-header {
  position: static;
  height: auto;
  min-height: 52px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px 0;
}

.intent-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}

.brand-logo-slot img {
  display: block;
  object-fit: contain;
}

.brand-logo-slot .brand-mark {
  width: 38px;
  height: 28px;
}

.brand-logo-slot .brand-wordmark {
  width: 116px;
  height: 28px;
}

.brand-logo-slot .brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 22px);
  width: 100%;
  max-width: none;
  padding: clamp(7px, 1.5vw, 14px);
  border-radius: 10px;
  background: linear-gradient(145deg, #f9fafb, #eef2f5);
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(23, 33, 43, .08);
}

.brand-logo-slot .brand-lockup-mark {
  width: min(23%, 190px);
  height: auto;
}

.brand-logo-slot .brand-lockup-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.brand-logo-slot .brand-lockup-wordmark {
  width: min(100%, 430px);
  height: auto;
}

.brand-logo-slot .brand-lockup-copy small {
  color: #17212b;
  font-size: clamp(11px, 2vw, 21px);
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.intent-header-note {
  display: inline;
  flex: 0 1 auto;
}

.intent-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
  padding: 1px 0 5px;
}

.intent-header-more-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#header-more-button {
  display: none;
}

.intent-header-actions .chip {
  flex: 0 1 auto;
  max-width: 100%;
}

.intent-header-actions [hidden] {
  display: none !important;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.button-icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  object-fit: contain;
}

.problem-form {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.problem-form .area {
  min-height: 120px;
  resize: vertical;
}

.problem-form .button {
  justify-self: start;
}

.cookie-pending {
  overflow: hidden;
}

.cookie-pending .intent-page {
  pointer-events: none;
}

.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background: rgba(13, 24, 39, .72);
  backdrop-filter: blur(8px);
}

.cookie-consent-card {
  width: min(620px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #dce4ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(13, 24, 39, .32);
}

.cookie-consent-card h1 {
  margin: 5px 0 10px;
  font-size: 28px;
}

.cookie-consent-card .step {
  margin: 0;
}

.consent-lead {
  margin: 0 0 14px;
  color: #344054;
  font-size: 16px;
  line-height: 1.5;
}

.consent-how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.consent-how span,
.test-mode-note {
  padding: 11px;
  border-radius: 12px;
}

.consent-how span { background: #f3f6fb; }
.consent-how b,
.consent-how small,
.test-mode-note b,
.test-mode-note span { display: block; }
.consent-how small,
.test-mode-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.test-mode-note {
  border: 1px solid #a8d5bd;
  background: #eaf8f0;
  color: #17603c;
}
.test-mode-note span { color: #246849; }
.cookie-explainer {
  margin: 14px 0 10px;
  font-size: 13px;
  line-height: 1.45;
}

.consent-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #dce4ee;
  border-radius: 13px;
  background: #f8fbff;
  cursor: pointer;
}

.consent-choice input {
  width: 21px;
  height: 21px;
  margin: 1px 0 0;
}

.consent-choice b,
.consent-choice small {
  display: block;
}

.consent-choice small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
  font-size: 13px;
}

.cookie-consent-card .button {
  width: 100%;
  max-width: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 0 #194fc5, 0 8px 16px rgba(37, 99, 235, .24);
  transition: transform .08s ease, box-shadow .08s ease, opacity .15s ease;
}

.cookie-consent-card .button:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 3px rgba(13, 46, 116, .22), 0 1px 0 #194fc5, 0 3px 5px rgba(37, 99, 235, .15);
}

.cookie-consent-card .button:disabled {
  cursor: default;
  opacity: .5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 0 #8ca4d2;
}

.privacy-note a,
.privacy-note button {
  color: #315da8;
}

.privacy-note button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.document-button {
  cursor: pointer;
}

.document-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.document-attachment .button-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.document-attachment b,
.document-attachment small {
  display: block;
}

.document-attachment b {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.document-attachment small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.document-preview-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 9px;
  background: #eef5ff;
}

.photo-preview .document-preview-icon .button-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.chat-composer {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.composer-message-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.composer-message-row .field {
  min-width: 0;
}

.composer-message-row .button,
.composer-message-row .chip {
  width: auto;
  max-width: none;
  margin: 0;
  white-space: nowrap;
}

.send-button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #b7cbef;
  background: #fff;
  color: #2450a2;
  box-shadow: 0 2px 7px rgba(37, 99, 235, .08);
}

.send-button:hover {
  background: #f4f8ff;
  border-color: #82a6e8;
}

.composer-tools-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gps-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.gps-controls .geo-button {
  flex: 0 0 auto;
}

.gps-controls .radius-field {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  padding: 8px 7px;
  flex: 0 0 76px;
}

.portfolio-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.portfolio-submit {
  min-height: 42px;
}

.portfolio-hint {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-attachment .button-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.intent-header-actions .button-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.intent-header #account-button,
.intent-header #refresh,
.intent-header #seller-button {
  margin-left: 0;
}

.intent-page .chip,
.intent-page .button,
.intent-page .catalog-tab,
.intent-page .intent-tab {
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .08s ease, box-shadow .08s ease, border-color .15s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.intent-page .chip,
.intent-page .catalog-tab,
.intent-page .intent-tab {
  border-color: #d4dce7;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #c9d2de, 0 5px 10px rgba(27, 45, 70, .12);
}

.intent-page .button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 0 #194fc5, 0 7px 14px rgba(37, 99, 235, .22);
}

.intent-page .send-button {
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #a8bce0, 0 6px 12px rgba(37, 99, 235, .14);
}

.intent-page .chip:not(:disabled):active,
.intent-page .button:not(:disabled):active,
.intent-page .catalog-tab:not(:disabled):active,
.intent-page .intent-tab:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 2px rgba(20, 35, 55, .12), 0 1px 0 #bcc7d5, 0 2px 4px rgba(27, 45, 70, .1);
}

.intent-page .button:not(:disabled):active {
  box-shadow: inset 0 2px 3px rgba(13, 46, 116, .22), 0 1px 0 #194fc5, 0 3px 5px rgba(37, 99, 235, .15);
}

.intent-page .chip:focus-visible,
.intent-page .button:focus-visible,
.intent-page .catalog-tab:focus-visible,
.intent-page .intent-tab:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 3px;
}

.intent-page button:disabled {
  cursor: wait;
  opacity: .62;
  transform: none;
}

.help-heading {
  align-items: flex-start;
}

.help-heading h2,
.help-heading p,
.help-steps p,
.help-catalog-note p {
  margin-top: 0;
}

.help-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.help-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff 0%, #f7fbff 100%);
}

.help-steps li > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0879f9, #08a9cf 55%, #45d51f);
  box-shadow: 0 3px 7px rgba(8, 121, 249, .25);
  color: #fff;
  font-weight: 800;
}

.help-steps b {
  display: block;
  margin-bottom: 4px;
}

.help-steps p,
.help-catalog-note p,
.catalog-explainer {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.help-catalog-note {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #bee6ce;
  border-radius: 14px;
  background: #f3fbf6;
}

.help-catalog-note img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
}

.catalog-explainer {
  margin: 8px 0 14px;
}

.catalog-loading {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 24px;
}

.catalog-loading i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2684ee;
  animation: catalog-pulse .9s ease-in-out infinite alternate;
}

.catalog-loading i:nth-child(2) { animation-delay: .15s; background: #08a9cf; }
.catalog-loading i:nth-child(3) { animation-delay: .3s; background: #45c92b; }

@keyframes catalog-pulse {
  from { transform: translateY(0); opacity: .5; }
  to { transform: translateY(-5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .intent-page .chip,
  .intent-page .button,
  .intent-page .catalog-tab,
  .intent-page .intent-tab,
  .catalog-loading i { transition: none; animation: none; }
}

@media (min-width: 641px) {
  .intent-header-actions {
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px 13px;
    border: 1px solid #e0e7ef;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(247, 250, 253, .92));
  }

  .intent-header-more-actions {
    display: contents;
  }

  .intent-header-actions .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 14px;
    margin: 0;
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .cookie-consent-overlay {
    align-items: end;
    padding: 0;
  }

  .cookie-consent-card {
    width: 100%;
    max-height: 94dvh;
    padding: 18px 15px calc(18px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }

  .cookie-consent-card h1 {
    font-size: 23px;
  }
  .consent-how { grid-template-columns: 1fr; }
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .intent-page {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    padding: 5px 10px 40px;
  }

  .intent-header {
    align-items: stretch;
    gap: 5px;
    padding: 2px 0 4px;
    border-bottom: 0;
  }

  .intent-header-note {
    display: inline;
    padding-top: 4px;
  }

  .brand-logo-slot .brand-mark {
    width: 34px;
    height: 25px;
  }

  .brand-logo-slot .brand-wordmark {
    width: 104px;
    height: 25px;
  }

  .intent-header .brand {
    align-self: center;
    width: min(78vw, 330px);
  }

  .brand-logo-slot .brand-lockup {
    width: 100%;
    gap: 7px;
    padding: 6px 8px;
    border-radius: 7px;
  }

  .brand-logo-slot .brand-lockup-copy small {
    font-size: clamp(9px, 3vw, 13px);
  }

  .intent-header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    overflow: visible;
    padding-bottom: 4px;
  }

  #header-more-button {
    display: inline-flex;
  }

  .intent-header-actions > .chip,
  .intent-header-more-actions > .chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 5px 4px;
    border-radius: 14px;
    flex-direction: column;
    gap: 4px;
    white-space: normal;
    text-align: center;
    font-size: 10px;
    line-height: 1.12;
  }

  .intent-header-actions > .chip .button-icon,
  .intent-header-more-actions > .chip .button-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }

  .intent-header-more-actions {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 7px;
    padding-top: 2px;
  }

  .intent-header-more-actions #help-button { order: 1; }
  .intent-header-more-actions #problem-button { order: 2; }
  .intent-header-more-actions #install-button { order: 3; }
  .intent-header-more-actions #seller-button { order: 4; }
  .intent-header-more-actions #refresh { order: 5; }
  .intent-header-more-actions #admin-button { order: 6; }

  .intent-header-actions.mobile-menu-open .intent-header-more-actions {
    display: grid;
  }

  .intent-header #refresh {
    display: inline-flex;
  }

  .composer-message-row {
    grid-template-columns: minmax(86px, 1fr) auto auto;
    gap: 6px;
  }

  .send-button span {
    display: none;
  }

  .send-button {
    padding-inline: 10px;
  }

  .voice-button {
    padding-inline: 9px;
  }

  .portfolio-row {
    grid-template-columns: 1fr;
  }

  .portfolio-submit {
    justify-self: start;
  }

  .hero {
    padding: 2px 0 0;
  }

  .hero .step {
    display: none;
  }

  .hero h1,
  .intent-page .hero h1 {
    margin: 1px 0 2px;
    font-size: 21px;
    line-height: 1.08;
  }

  .hero .sub {
    margin: 0 0 5px;
    font-size: 12px;
    line-height: 1.25;
  }

  .intent-page .panel,
  .chat-workspace {
    margin-top: 6px;
  }

  .chat-workspace {
    padding: 10px;
  }

  .intent-page > *,
  .chat-fold,
  .chat-fold-body,
  .chat-composer,
  .composer-message-row {
    max-width: 100%;
    min-width: 0;
  }

}
