.hana-chat-widget.hana-v1-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000001;
  color: #2b2119;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hana-v1-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 17px 7px 7px;
  border: 1px solid rgba(202, 164, 106, 0.42);
  border-radius: 999px;
  color: #fffaf0;
  background: linear-gradient(135deg, #2e241c, #8f6737);
  box-shadow: 0 16px 38px rgba(35, 22, 10, 0.24);
  cursor: pointer;
}

.hana-v1-trigger img,
.hana-v1-avatar {
  display: block;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 50%;
}

.hana-v1-trigger img {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 248, 236, 0.72);
}

.hana-v1-trigger span {
  display: grid;
  gap: 2px;
  text-align: left;
}

.hana-v1-trigger strong {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hana-v1-trigger small {
  color: rgba(255, 250, 240, 0.76);
  font-size: 10px;
}

.hana-v1-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(430px, calc(100vw - 28px));
  height: min(720px, calc(100vh - 112px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(180, 139, 82, 0.25);
  border-radius: 28px;
  background: #fffaf1;
  box-shadow: 0 28px 80px rgba(43, 31, 19, 0.24);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

.hana-v1-widget.is-open .hana-v1-panel {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.hana-v1-widget.is-open .hana-v1-trigger {
  visibility: hidden;
  pointer-events: none;
}

.hana-v1-header {
  display: grid;
  grid-template-columns: 46px 1fr 42px;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(143, 103, 55, 0.14);
  background: rgba(249, 239, 224, 0.82);
}

.hana-v1-avatar {
  width: 46px;
  height: 46px;
  border: 2px solid #d7ad67;
}

.hana-v1-header strong,
.hana-v1-header span {
  display: block;
}

.hana-v1-header strong {
  color: #2c2119;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.hana-v1-header span {
  margin-top: 2px;
  color: #756757;
  font-size: 11px;
}

.hana-v1-icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(143, 103, 55, 0.17);
  border-radius: 50%;
  color: #594331;
  background: rgba(255, 255, 255, 0.72);
  font-size: 24px;
  cursor: pointer;
}

.hana-v1-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
}

.hana-v1-screen {
  display: grid;
  gap: 14px;
}

.hana-v1-screen h2 {
  margin: 0;
  color: #2b2119;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 500;
  line-height: 1.12;
  outline: none;
}

.hana-v1-screen p {
  margin: 0;
  color: #625446;
  font-size: 14px;
  line-height: 1.55;
}

.hana-v1-opening {
  display: grid;
  gap: 8px;
  padding: 4px 2px 6px;
}

.hana-v1-opening p:first-child {
  color: #8f6737;
  font-weight: 800;
}

.hana-v1-menu,
.hana-v1-action-stack,
.hana-v1-copy,
.hana-v1-choice-list {
  display: grid;
  gap: 9px;
}

.hana-v1-menu {
  grid-template-columns: 1fr 1fr;
}

.hana-v1-menu-card {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 11px;
  border: 1px solid rgba(143, 103, 55, 0.15);
  border-radius: 17px;
  color: #382a20;
  background: #fffefd;
  box-shadow: 0 8px 20px rgba(77, 55, 31, 0.06);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.28;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.hana-v1-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #76542f;
  background: #f3e5cf;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.hana-v1-info-menu {
  grid-template-columns: 1fr;
}

.hana-v1-info-menu .hana-v1-menu-card {
  grid-template-columns: 1fr auto;
  min-height: 52px;
}

.hana-v1-nav {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  gap: 6px;
  margin: -18px -18px 16px;
  padding: 10px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(143, 103, 55, 0.1);
  background: rgba(255, 250, 241, 0.96);
}

.hana-v1-nav button,
.hana-v1-general-link,
.hana-v1-urgent-link {
  min-height: 40px;
  border: 0;
  color: #76542f;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.hana-v1-nav button {
  padding: 0 9px;
  border: 1px solid rgba(143, 103, 55, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.hana-v1-eyebrow {
  color: #9a6f39 !important;
  font-size: 11px !important;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hana-v1-progress {
  justify-self: end;
  color: #8a7967 !important;
  font-size: 11px !important;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.hana-v1-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 10px 13px;
  border: 1px solid rgba(143, 103, 55, 0.17);
  border-radius: 15px;
  color: #463426;
  background: #fffefd;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.hana-v1-choice.is-selected {
  border-color: #9b713f;
  background: #f4e6cf;
  box-shadow: inset 0 0 0 1px rgba(143, 103, 55, 0.16);
}

.hana-v1-choice-state {
  flex: 0 0 auto;
  color: #806342;
  font-size: 10px;
  font-weight: 850;
}

.hana-v1-selection-note {
  color: #8a7967 !important;
  font-size: 11px !important;
}

.hana-v1-summary {
  display: grid;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(143, 103, 55, 0.14);
  border-radius: 17px;
  background: rgba(143, 103, 55, 0.12);
}

.hana-v1-summary div {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) 1.6fr;
  gap: 12px;
  padding: 11px 13px;
  background: #fffefd;
}

.hana-v1-summary dt,
.hana-v1-summary dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.hana-v1-summary dt {
  color: #806f5e;
  font-weight: 750;
}

.hana-v1-summary dd {
  color: #3f2f23;
  font-weight: 800;
}

.hana-v1-safety-reminder,
.hana-v1-emergency-care-info {
  padding: 12px;
  border-radius: 13px;
  background: #f8efe1;
  font-size: 11px !important;
}

.hana-v1-button,
.hana-v1-handoff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(143, 103, 55, 0.2);
  border-radius: 15px;
  color: #4d3826;
  background: #fffefd;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.hana-v1-button-primary {
  border-color: #a77a43;
  color: #fffaf0;
  background: linear-gradient(135deg, #c69b60, #8f6737);
}

.hana-v1-button-urgent {
  border-color: #9b433c;
  color: #7b312c;
  background: #fff4f1;
}

.hana-v1-button[disabled] {
  color: #8a8178;
  background: #eeeae4;
  cursor: not-allowed;
}

.hana-v1-handoff {
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
  border-style: dashed;
  background: #f8efe1;
}

.hana-v1-urgent-link {
  justify-self: start;
  color: #8c3c36;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hana-v1-general-link {
  justify-self: center;
}

.hana-v1-availability-note {
  margin-top: -4px !important;
  font-size: 11px !important;
  text-align: center;
}

.hana-v1-emergency {
  padding: 15px;
  border: 1px solid rgba(155, 67, 60, 0.23);
  border-radius: 18px;
  background: #fff7f3;
}

.hana-v1-emergency-care-info {
  border: 1px solid rgba(155, 67, 60, 0.18);
  color: #623c35 !important;
  background: #fffaf7;
  outline: none;
}

.hana-v1-footer {
  padding: 10px 16px max(11px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(143, 103, 55, 0.13);
  color: #796b5e;
  background: #f8efe1;
  font-size: 10px;
  line-height: 1.4;
}

.hana-v1-widget :is(button, a):focus-visible {
  outline: 3px solid rgba(113, 160, 181, 0.7);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body.hana-v1-open {
    overflow: hidden !important;
  }

  .hana-v1-widget {
    inset: auto 0 0;
  }

  .hana-v1-trigger {
    position: fixed;
    right: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .hana-v1-panel {
    position: fixed;
    inset: max(10px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 24px;
  }

  .hana-v1-body {
    padding: 16px;
  }

  .hana-v1-nav {
    top: -16px;
    margin: -16px -16px 14px;
    padding: 9px 16px;
  }

  .hana-v1-menu {
    grid-template-columns: 1fr;
  }

  .hana-v1-menu-card {
    min-height: 58px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hana-v1-panel {
    transition: none;
  }

  .hana-v1-widget * {
    scroll-behavior: auto !important;
  }
}
