.tulle-root {
  --tulle-blush: #dba9a1;
  --tulle-soft-blush: #f8e6e1;
  --tulle-berry: #7d1748;
  --tulle-sage: #879778;
  --tulle-ivory: #fffaf6;
  --tulle-ink: #2c2421;
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 180;
  width: 82px;
  height: 96px;
  touch-action: none;
  user-select: none;
}

.tulle-root[hidden] { display: none !important; }

.tulle-launcher {
  position: relative;
  width: 82px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 42px 42px 34px 34px;
  background: rgba(255, 250, 246, .96);
  box-shadow: 0 10px 30px rgba(74, 45, 38, .18);
  cursor: grab;
  overflow: visible;
  outline: none;
}
.tulle-launcher:active { cursor: grabbing; }
.tulle-launcher:focus-visible { box-shadow: 0 0 0 4px rgba(125, 23, 72, .22), 0 10px 30px rgba(74, 45, 38, .2); }
.tulle-launcher img {
  width: 76px;
  height: 90px;
  display: block;
  margin: 2px auto 0;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.tulle-state-orb {
  position: absolute;
  right: -4px;
  top: -5px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--tulle-ivory);
  border: 2px solid var(--tulle-blush);
  color: var(--tulle-berry);
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(74, 45, 38, .14);
  pointer-events: none;
}
.tulle-root.is-asleep { opacity: .68; }
.tulle-root.is-asleep .tulle-launcher { filter: saturate(.55); box-shadow: 0 7px 20px rgba(74, 45, 38, .11); }

.tulle-panel {
  --tulle-scallop: 12px;
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(440px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 126px));
  min-height: 420px;
  display: flex;
  flex-direction: column;
  padding: 11px;
  overflow: visible;
  border: 0;
  background:
    radial-gradient(circle 17px at 17px 17px, var(--tulle-ivory) 98%, transparent 100%) top left / 34px 34px no-repeat,
    radial-gradient(circle 17px at calc(100% - 17px) 17px, var(--tulle-ivory) 98%, transparent 100%) top right / 34px 34px no-repeat,
    radial-gradient(circle 17px at 17px calc(100% - 17px), var(--tulle-ivory) 98%, transparent 100%) bottom left / 34px 34px no-repeat,
    radial-gradient(circle 17px at calc(100% - 17px) calc(100% - 17px), var(--tulle-ivory) 98%, transparent 100%) bottom right / 34px 34px no-repeat,
    radial-gradient(18px 12px at 50% 100%, var(--tulle-ivory) 98%, transparent 100%) top / 36px 12px repeat-x,
    radial-gradient(18px 12px at 50% 0, var(--tulle-ivory) 98%, transparent 100%) bottom / 36px 12px repeat-x,
    radial-gradient(12px 18px at 100% 50%, var(--tulle-ivory) 98%, transparent 100%) left / 12px 36px repeat-y,
    radial-gradient(12px 18px at 0 50%, var(--tulle-ivory) 98%, transparent 100%) right / 12px 36px repeat-y,
    linear-gradient(var(--tulle-ivory), var(--tulle-ivory)) center / calc(100% - 20px) calc(100% - 20px) no-repeat;
  color: var(--tulle-ink);
  filter:
    drop-shadow(0 0 18px rgba(219, 169, 161, .34))
    drop-shadow(0 10px 24px rgba(219, 169, 161, .2))
    drop-shadow(0 18px 28px rgba(74, 45, 38, .14));
  touch-action: auto;
  user-select: text;
  isolation: isolate;
}
.tulle-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 0;
  border-radius: 18px;
  background: var(--tulle-ivory);
  pointer-events: none;
}
.tulle-panel[hidden] { display: none; }

.tulle-panel-head {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 20px 18px 15px;
  border-radius: 16px 16px 0 0;
  background: transparent;
}
.tulle-panel-portrait {
  width: 72px;
  height: 76px;
  border-radius: 20px;
  background: transparent;
  object-fit: contain;
  object-position: center;
}
.tulle-panel-title strong {
  display: block;
  color: var(--tulle-berry);
  font-family: "Bodoni 72 Smallcaps", "Bodoni 72", Didot, Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .14em;
}
.tulle-panel-title { min-width: 0; padding-right: 108px; }
.tulle-panel-title span {
  display: block;
  margin-top: 6px;
  color: #8b6a66;
  font: 8.5px/1.3 "Avenir Next", Avenir, sans-serif;
  letter-spacing: .025em;
  white-space: nowrap;
}
.tulle-head-actions {
  position: absolute;
  top: 7px;
  right: 14px;
  display: flex;
  gap: 1px;
  align-items: center;
}
.tulle-icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent !important;
  color: var(--tulle-berry);
  font: 600 14px/1 "Avenir Next", Avenir, sans-serif;
  cursor: pointer;
  isolation: isolate;
}
.tulle-icon-button::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: -1;
  border: 1px solid rgba(219, 169, 161, .76);
  border-radius: 50%;
  background: var(--tulle-ivory);
}
.tulle-icon-button:hover::before { background: var(--tulle-soft-blush); }
.tulle-icon-button:focus-visible,
.tulle-quick-action:focus-visible,
.tulle-send:focus-visible,
.tulle-choice-card:focus-visible,
.tulle-listening button:focus-visible {
  outline: 3px solid rgba(125, 23, 72, .25);
  outline-offset: 2px;
}

.tulle-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 20px 17px;
  background: transparent;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.tulle-welcome {
  margin: 0 0 16px;
  padding: 18px 4px 16px;
  border-top: 1px solid rgba(219, 169, 161, .72);
  border-bottom: 1px solid rgba(219, 169, 161, .5);
  color: #755552;
  font-family: "Bodoni 72 Smallcaps", "Bodoni 72", Didot, Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .055em;
}
.tulle-response {
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(135, 151, 120, .48);
  border-radius: 16px;
  background: rgba(244, 246, 239, .84);
  font-size: 13px;
  line-height: 1.5;
}
.tulle-response strong { color: #241d1a; }
.tulle-response[hidden] { display: none; }
.tulle-choice-list { display: grid; gap: 8px; margin: -3px 0 14px; }
.tulle-choice-list[hidden] { display: none; }
.tulle-choice-list.is-birthday-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tulle-choice-card {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(219, 169, 161, .74);
  border-radius: 14px;
  background: transparent;
  color: var(--tulle-ink);
  text-align: left;
  cursor: pointer;
}
.tulle-choice-card strong, .tulle-choice-card small { display: block; }
.tulle-choice-card small { margin-top: 3px; color: #73645f; line-height: 1.35; }
.tulle-choice-card:hover { border-color: var(--tulle-berry); background: #fff; }
.tulle-birthday-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 9px; align-items: center; width: 100%; min-width: 0; padding: 9px; border: 1px solid rgba(219, 169, 161, .74); border-radius: 14px; background: #fffdfa; color: var(--tulle-ink); text-align: left; cursor: pointer; }
.tulle-birthday-card:hover { border-color: var(--tulle-berry); background: var(--tulle-soft-blush); }
.tulle-birthday-photo { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border: 2px solid var(--tulle-blush); border-radius: 50%; background: #acdabc; color: #4f6252; font: 800 15px/1 "Avenir Next Demi Bold", "Avenir Next", Avenir, sans-serif; }
.tulle-birthday-photo img { width: 100%; height: 100%; object-fit: cover; }
.tulle-birthday-card strong, .tulle-birthday-card small { display: block; min-width: 0; }
.tulle-birthday-card strong { font-size: 12px; line-height: 1.2; }
.tulle-birthday-card small { margin-top: 3px; color: #73645f; font-size: 10px; line-height: 1.25; }

.tulle-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}
.tulle-quick-action {
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(219, 169, 161, .78);
  border-radius: 16px;
  background: rgba(255, 250, 246, .96);
  color: #4f4541;
  font: 500 10px/1.35 "Avenir Next", Avenir, sans-serif;
  letter-spacing: .095em;
  cursor: pointer;
}
.tulle-quick-action:nth-child(n+5) { grid-column: 1 / -1; }
.tulle-quick-action:hover { border-color: var(--tulle-berry); background: var(--tulle-soft-blush); }

.tulle-review {
  margin: 0 0 14px;
  padding: 13px;
  border: 1px solid rgba(125, 23, 72, .25);
  border-radius: 16px;
  background: rgba(219, 169, 161, .13);
}
.tulle-review[hidden] { display: none; }
.tulle-review strong, .tulle-review small { display: block; }
.tulle-review small { margin: 4px 0 10px; color: #685752; line-height: 1.4; }
.tulle-review button {
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  background: var(--tulle-sage);
  color: white;
  font: 700 11px/1 inherit;
  cursor: pointer;
}

.tulle-listening {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  background: #eef2e9;
  color: #46503d;
  font-size: 12px;
}
.tulle-listening[hidden] { display: none; }
.tulle-listening-actions { display: flex; gap: 6px; }
.tulle-listening button {
  padding: 6px 9px;
  border: 1px solid rgba(70, 80, 61, .25);
  border-radius: 999px;
  background: white;
  color: #46503d;
  font: 700 10px/1 inherit;
  cursor: pointer;
}

.tulle-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 12px 18px;
  border-top: 1px solid rgba(219, 169, 161, .45);
  background: transparent;
}
.tulle-input-row textarea {
  min-height: 44px;
  max-height: 96px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid rgba(219, 169, 161, .76);
  border-radius: 15px;
  background: white;
  color: var(--tulle-ink);
  font: 13px/1.4 "Avenir Next", Avenir, sans-serif;
}
.tulle-input-row textarea:focus { outline: 3px solid rgba(219, 169, 161, .28); border-color: var(--tulle-blush); }
.tulle-send {
  min-width: 60px;
  height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #dba9a1, #cf858b);
  color: white;
  font: 600 11px/1 "Avenir Next", Avenir, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
}

.tulle-settings {
  padding: 8px 18px 12px;
  background: var(--tulle-ivory);
}
.tulle-settings label {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(219, 169, 161, .58);
  border-radius: 14px;
  color: #665752;
  font: 500 10px/1.3 "Avenir Next", Avenir, sans-serif;
  letter-spacing: .07em;
}
.tulle-settings input {
  width: 34px;
  height: 18px;
  accent-color: var(--tulle-blush);
}
.tulle-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 13px 12px 16px;
  background: transparent;
  color: #b86f72;
  font: 500 12px/1.4 "Bodoni 72 Smallcaps", "Bodoni 72", Didot, Georgia, serif;
  text-align: center;
  letter-spacing: .085em;
}
.tulle-tagline > span:nth-child(2) { min-width: 0; }
.tulle-tagline > span[aria-hidden="true"] { flex: 0 0 auto; color: var(--tulle-blush); font-size: 13px; }

.tulle-root.is-reduced-motion *, .tulle-root.is-reduced-motion *::before, .tulle-root.is-reduced-motion *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

@media (max-width: 640px) {
  .tulle-root { left: 12px; bottom: 12px; width: 70px; height: 82px; }
  .tulle-launcher { width: 70px; height: 82px; }
  .tulle-launcher img { width: 64px; height: 76px; }
  .tulle-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 98px;
    width: auto;
    min-height: 0;
    max-height: calc(100dvh - 108px);
  }
  .tulle-panel-head { grid-template-columns: 55px minmax(0, 1fr) auto; gap: 8px; padding: 16px 12px 11px; }
  .tulle-panel-portrait { width: 55px; height: 59px; }
  .tulle-panel-title strong { font-size: 26px; }
  .tulle-panel-title { padding-right: 91px; }
  .tulle-panel-title span { font-size: 7.5px; letter-spacing: 0; }
  .tulle-head-actions { top: 4px; right: 8px; gap: 0; }
  .tulle-icon-button { width: 33px; height: 33px; font-size: 12px; }
  .tulle-icon-button::before { inset: 5px; }
  .tulle-panel-body { padding: 0 14px 14px; }
  .tulle-welcome { font-size: 13px; }
  .tulle-quick-actions { gap: 7px; }
  .tulle-quick-action { min-height: 44px; padding: 8px; font-size: 9px; }
  .tulle-input-row { padding: 10px 13px; gap: 6px; }
  .tulle-send { min-width: 54px; padding: 0 10px; }
  .tulle-settings { padding: 7px 13px 10px; }
  .tulle-tagline { padding: 11px 8px 13px; font-size: 10px; gap: 7px; }
}

@media (max-width: 380px) {
  .tulle-panel-head { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .tulle-panel-portrait { width: 48px; height: 52px; }
  .tulle-panel-title strong { font-size: 22px; }
  .tulle-panel-title span { display: none; }
  .tulle-quick-actions { grid-template-columns: 1fr; }
  .tulle-quick-action:nth-child(n+5) { grid-column: auto; }
  .tulle-choice-list.is-birthday-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tulle-root *, .tulle-root *::before, .tulle-root *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
