.dora-widget {
  --dora-ink: #0f1a2e;
  --dora-muted: #5b6a80;
  --dora-accent: var(--primary-2, #0c5f94);
  --dora-accent-2: var(--primary, #10756d);
  --dora-surface: rgba(239, 248, 255, 0.94);
  --dora-line: rgba(168, 194, 222, 0.72);
  --dora-shadow: 0 28px 62px rgba(3, 15, 31, 0.34);
  position: fixed;
  left: auto;
  top: auto;
  right: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  z-index: 1200;
  font-family: "Sora", sans-serif;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.dora-panel {
  display: flex;
  flex-direction: column;
}

.dora-panel__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.dora-panel__back,
.dora-panel__close {
  flex: 0 0 auto;
}

.dora-panel__brand {
  min-width: 0;
  overflow: hidden;
}

.dora-panel__brand-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.dora-panel__brand-avatar img,
.dora-panel__brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 0;
}

.dora-panel__brand > div {
  min-width: 0;
}

.dora-panel__brand strong {
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.dora-panel__brand span {
  margin-top: 2px;
  line-height: 1.12;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dora-panel__meta {
  white-space: nowrap;
}

.dora-pill {
  white-space: nowrap;
}

.dora-widget--nova {
  --dora-ink: #17112d;
  --dora-muted: #65577f;
  --dora-accent: #7f4ce6;
  --dora-accent-2: #d095ff;
  --dora-surface: rgba(247, 244, 255, 0.96);
  --dora-line: rgba(210, 192, 246, 0.8);
  --dora-shadow: 0 28px 62px rgba(32, 13, 68, 0.36);
}

.dora-widget--nova .dora-widget__hint {
  border-color: rgba(203, 176, 247, 0.9);
  box-shadow: 0 20px 40px rgba(31, 11, 62, 0.18);
}

.dora-widget,
.dora-widget * {
  box-sizing: border-box;
}

.dora-widget__hint {
  position: absolute;
  right: 8px;
  bottom: 138px;
  width: min(250px, calc(100vw - 72px));
  padding: 12px 14px;
  border-radius: 18px 18px 6px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(183, 207, 232, 0.82);
  color: var(--dora-ink);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 20px 40px rgba(10, 26, 49, 0.18);
  backdrop-filter: blur(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dora-widget[data-panel-anchor="top"] .dora-widget__hint {
  top: 138px;
  bottom: auto;
}

.dora-widget.is-open .dora-widget__hint {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.dora-widget.is-listening .dora-widget__hint {
  border-color: rgba(103, 169, 227, 0.88);
  box-shadow: 0 22px 44px rgba(8, 31, 57, 0.22);
}

.dora-widget__hint[data-tone="thinking"] {
  color: var(--dora-accent);
}

.dora-widget__launcher {
  position: relative;
  width: 124px;
  height: 160px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
  animation: dora-float 4.4s ease-in-out infinite;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    filter 0.3s ease;
}

.dora-widget--nova .dora-widget__launcher {
  background: transparent;
}

.dora-widget__launcher::before {
  content: none;
}

.dora-widget--nova .dora-widget__launcher::before {
  content: none;
}

.dora-widget__launcher:hover {
  transform: translateY(-2px) scale(1.01);
  filter: drop-shadow(0 20px 26px rgba(8, 18, 33, 0.22));
}

.dora-widget.is-open .dora-widget__launcher {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

.dora-widget__launcher img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  padding: 0;
  transition:
    opacity 0.72s ease,
    transform 0.72s ease;
  filter: drop-shadow(0 16px 28px rgba(8, 18, 33, 0.2));
}

.dora-widget__launcher img.is-fading,
.dora-panel__brand img.is-fading {
  opacity: 0;
  transform: scale(0.96);
}

.dora-widget__badge {
  display: none;
}

.dora-widget--nova .dora-widget__badge {
  display: none;
}

.companion-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1188;
}

.companion-avatar {
  position: fixed;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform:
    translate3d(var(--companion-x, 0px), var(--companion-y, 0px), 0)
    rotate(var(--companion-rotation, 0deg))
    scale(var(--companion-scale, 1));
  transform-origin: center center;
  transition:
    filter 0.18s ease,
    opacity 0.18s ease;
  will-change: transform;
}

.companion-avatar.is-dragging {
  cursor: grabbing;
}

.companion-avatar__bubble {
  position: absolute;
  left: 50%;
  top: -70px;
  min-width: 156px;
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(180, 200, 225, 0.9);
  box-shadow: 0 18px 40px rgba(9, 25, 45, 0.16);
  color: #183049;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.companion-avatar__bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.companion-avatar.is-hovered .companion-avatar__bubble,
.companion-avatar.is-thinking .companion-avatar__bubble,
.companion-avatar.is-speaking .companion-avatar__bubble,
.companion-avatar.is-dragging .companion-avatar__bubble,
.companion-avatar.is-falling .companion-avatar__bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.companion-avatar__shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  padding: 9px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.98) 0%, rgba(244, 250, 255, 0.95) 44%, rgba(228, 239, 250, 0.96) 100%);
  box-shadow: 0 20px 42px rgba(9, 25, 45, 0.22);
  border: 1px solid rgba(180, 200, 225, 0.78);
}

.companion-avatar__shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 999px;
  transform:
    translate3d(var(--companion-look-x, 0px), var(--companion-look-y, 0px), 0)
    scale(1.01);
  transition: transform 0.12s ease;
  image-rendering: auto;
}

.companion-avatar--dora {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 18px 30px rgba(10, 26, 49, 0.18));
}

.companion-avatar--dora .companion-avatar__shell {
  border-color: rgba(37, 211, 102, 0.42);
}

.companion-avatar--dora .companion-avatar__bubble {
  border-color: rgba(174, 220, 193, 0.92);
}

.companion-avatar--nova {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 18px 30px rgba(35, 11, 68, 0.24));
}

.companion-avatar--nova .companion-avatar__shell {
  border-color: rgba(164, 116, 242, 0.36);
}

.companion-avatar--nova .companion-avatar__bubble {
  border-color: rgba(204, 176, 245, 0.94);
}

.companion-avatar.is-hovered .companion-avatar__shell,
.companion-avatar.is-thinking .companion-avatar__shell {
  box-shadow: 0 24px 46px rgba(9, 25, 45, 0.28);
}

.companion-avatar.is-dragging .companion-avatar__shell {
  box-shadow: 0 30px 60px rgba(9, 25, 45, 0.34);
}

.companion-avatar.is-falling {
  filter: drop-shadow(0 20px 26px rgba(8, 18, 33, 0.28));
}

.dora-panel {
  position: absolute;
  right: 0;
  bottom: 176px;
  top: auto;
  display: flex;
  flex-direction: column;
  width: min(344px, calc(100vw - 20px));
  min-height: auto;
  max-height: min(540px, calc(100vh - 132px));
  border: 1px solid rgba(177, 205, 232, 0.72);
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250, 253, 255, 0.995) 0%, rgba(242, 248, 255, 0.995) 100%);
  box-shadow: var(--dora-shadow);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
}

.dora-widget[data-panel-anchor="top"] .dora-panel {
  top: 176px;
  bottom: auto;
  transform: translateY(-12px) scale(0.98);
}

.dora-widget.is-open .dora-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dora-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(8, 32, 64, 0.98) 0%, rgba(11, 95, 147, 0.94) 52%, rgba(16, 117, 109, 0.92) 100%);
  color: #fff;
  touch-action: none;
}

.dora-panel__bubble {
  position: relative;
  margin: 16px 16px 10px;
  padding: 14px 16px;
  border-radius: 22px 22px 12px 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 248, 255, 0.98) 100%);
  border: 1px solid rgba(177, 205, 232, 0.72);
  color: var(--dora-ink);
  font-size: 0.93rem;
  line-height: 1.5;
  box-shadow: 0 14px 30px rgba(11, 29, 53, 0.08);
}

.dora-panel__bubble::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  transform: rotate(45deg);
}

.dora-panel__bubble[data-tone="thinking"] {
  color: var(--dora-accent);
}

.dora-widget--nova .dora-panel__header {
  background:
    linear-gradient(135deg, rgba(28, 11, 67, 0.98) 0%, rgba(95, 46, 171, 0.95) 52%, rgba(18, 125, 167, 0.92) 100%);
}

.dora-panel__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dora-panel__brand img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  object-fit: contain;
  object-position: center center;
  padding: 2px;
  transition:
    opacity 0.72s ease,
    transform 0.72s ease;
}

.dora-panel__brand strong,
.dora-panel__brand span {
  display: block;
}

.dora-panel__brand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.dora-panel__brand span {
  margin-top: 3px;
  color: rgba(233, 244, 255, 0.88);
  font-size: 0.77rem;
}

.dora-panel__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dora-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.dora-panel__back,
.dora-panel__close,
.dora-icon-btn,
.dora-message__audio,
.dora-action-btn,
.dora-suggestion-btn,
.dora-send-btn {
  font: inherit;
}

.dora-panel__back,
.dora-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.dora-panel__back {
  flex: 0 0 auto;
}

.dora-panel__close:hover,
.dora-panel__back:hover {
  background: rgba(255, 255, 255, 0.24);
}

.dora-panel__notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 12px;
  color: var(--dora-muted);
  font-size: 0.76rem;
  line-height: 1.45;
  border-bottom: 1px solid rgba(177, 205, 232, 0.55);
  background: rgba(245, 250, 255, 0.98);
}

.dora-panel__notice-text {
  min-width: 0;
  flex: 1 1 auto;
}

.dora-live-voice-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(168, 194, 222, 0.88);
  border-radius: 999px;
  background: rgba(244, 249, 255, 0.94);
  color: var(--dora-accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.dora-live-voice-btn--secondary {
  min-width: 108px;
}

.dora-live-voice-btn:hover {
  background: rgba(227, 241, 255, 0.98);
}

.dora-live-voice-btn.is-active {
  border-color: rgba(12, 95, 148, 0.28);
  background: linear-gradient(135deg, rgba(12, 95, 148, 0.96) 0%, rgba(16, 117, 109, 0.92) 100%);
  color: #fff;
}

.dora-live-voice-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.dora-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at top right, rgba(162, 225, 209, 0.1) 0%, transparent 40%),
    linear-gradient(180deg, rgba(247, 251, 255, 0.995) 0%, rgba(241, 248, 255, 0.995) 100%);
}

.dora-message {
  display: flex;
}

.dora-message--user {
  justify-content: flex-end;
}

.dora-message__shell {
  max-width: 86%;
  padding: 12px 13px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(11, 29, 53, 0.08);
}

.dora-message--bot .dora-message__shell {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(191, 212, 232, 0.74);
  border-bottom-left-radius: 8px;
}

.dora-message--user .dora-message__shell {
  background: linear-gradient(135deg, rgba(16, 117, 109, 0.96) 0%, rgba(12, 95, 148, 0.94) 100%);
  color: #fff;
  border-bottom-right-radius: 8px;
}

.dora-message__label {
  margin-bottom: 6px;
  color: var(--dora-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dora-message--user .dora-message__label {
  color: rgba(230, 243, 255, 0.84);
}

.dora-message__text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.5;
}

.dora-message__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dora-action-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(168, 194, 222, 0.88);
  border-radius: 999px;
  background: rgba(243, 249, 255, 0.9);
  color: var(--dora-ink);
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 700;
}

.dora-action-btn:hover {
  border-color: rgba(12, 95, 148, 0.32);
  background: rgba(227, 241, 255, 0.96);
}

.dora-message__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.dora-message__audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 95, 148, 0.1);
  color: var(--dora-accent);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.dora-message__audio:hover {
  background: rgba(12, 95, 148, 0.16);
}

.dora-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 10px;
  border-top: 1px solid rgba(177, 205, 232, 0.52);
  background: rgba(251, 253, 255, 0.99);
}

.dora-suggestion-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(177, 205, 232, 0.86);
  border-radius: 999px;
  background: rgba(244, 249, 255, 0.9);
  color: #21354b;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.dora-suggestion-btn:hover {
  background: rgba(227, 241, 255, 0.96);
}

.dora-status {
  min-height: 18px;
  padding: 0 18px 10px;
  color: var(--dora-accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.dora-status.is-error {
  color: #af2d2d;
}

.dora-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 16px 16px;
  background: rgba(251, 253, 255, 0.99);
}

.dora-quick-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 16px 14px;
  background: rgba(251, 253, 255, 0.99);
}

.dora-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(177, 205, 232, 0.86);
  border-radius: 999px;
  background: rgba(244, 249, 255, 0.92);
  color: var(--dora-accent);
  cursor: pointer;
}

.dora-icon-btn:hover {
  background: rgba(229, 241, 255, 0.98);
}

.dora-icon-btn.is-recording {
  border-color: rgba(175, 45, 45, 0.42);
  background: rgba(255, 236, 236, 0.94);
  color: #af2d2d;
  animation: dora-pulse 1.2s ease-in-out infinite;
}

.dora-icon-btn:disabled,
.dora-send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dora-composer__input {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(177, 205, 232, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--dora-ink);
  font: inherit;
  outline: none;
}

.dora-composer__input:focus {
  border-color: rgba(12, 95, 148, 0.42);
  box-shadow: 0 0 0 4px rgba(12, 95, 148, 0.1);
}

.dora-send-btn {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(12, 95, 148, 0.98) 0%, rgba(16, 117, 109, 0.94) 100%);
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.dora-target-flash {
  animation: dora-target 1.5s ease;
}

@keyframes dora-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes dora-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(175, 45, 45, 0.22);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(175, 45, 45, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(175, 45, 45, 0);
  }
}

@keyframes dora-target {
  0% {
    box-shadow: 0 0 0 0 rgba(12, 95, 148, 0);
  }
  25% {
    box-shadow: 0 0 0 6px rgba(12, 95, 148, 0.18);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(12, 95, 148, 0);
  }
}

@media (max-width: 820px) {
  .dora-widget {
    right: 14px;
    bottom: 14px;
  }

  .dora-widget__launcher {
    width: 96px;
    height: 124px;
  }

  .dora-widget__hint {
    bottom: 118px;
    width: min(240px, calc(100vw - 72px));
    font-size: 0.8rem;
  }

  .dora-panel {
    bottom: 118px;
    width: min(100vw - 18px, 340px);
    min-height: auto;
    max-height: calc(100vh - 116px);
  }

  .companion-avatar {
    width: 96px;
    height: 96px;
  }

  .companion-avatar--nova {
    width: 100px;
    height: 100px;
  }

  .companion-avatar__bubble {
    min-width: 140px;
    max-width: 190px;
    font-size: 0.73rem;
  }
}

@media (max-width: 820px) {
  .dora-panel__header {
    gap: 8px;
    padding: 12px 12px 13px;
  }

  .dora-panel__brand-avatar,
  .dora-panel__brand-avatar img {
    width: 40px;
    height: 40px;
  }

  .dora-panel__brand strong {
    font-size: 0.95rem;
  }

  .dora-panel__brand span {
    font-size: 0.72rem;
  }

  .dora-panel__meta {
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .dora-panel__header {
    gap: 6px;
    padding: 12px 10px 12px;
  }

  .dora-panel__brand-avatar,
  .dora-panel__brand-avatar img {
    width: 38px;
    height: 38px;
  }

  .dora-panel__brand span {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 560px) {
  .dora-widget {
    left: auto;
    right: 12px;
    bottom: 12px;
  }

  .dora-widget__launcher {
    width: 88px;
    height: 112px;
  }

  .dora-widget__hint {
    right: 0;
    left: auto;
    bottom: 98px;
    width: min(220px, calc(100vw - 72px));
  }

  .dora-panel {
    right: 0;
    left: auto;
    width: min(100vw - 14px, 328px);
    min-height: auto;
    max-height: calc(100vh - 124px);
    border-radius: 22px;
  }

  .dora-panel__notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .dora-panel__notice-text,
  .dora-live-voice-btn {
    width: 100%;
  }

  .companion-avatar {
    width: 84px;
    height: 84px;
  }

  .companion-avatar--nova {
    width: 88px;
    height: 88px;
  }

  .companion-avatar__bubble {
    top: -62px;
    min-width: 126px;
    max-width: 170px;
  }

  .dora-panel__bubble {
    margin: 14px 12px 10px;
    padding: 12px 14px;
    font-size: 0.88rem;
  }

  .dora-quick-actions {
    padding: 0 12px 12px;
  }

  .dora-suggestions {
    padding: 10px 12px 10px;
  }

  .dora-suggestion-btn {
    min-height: 34px;
  }
}

/* Mobile hardening: visibility, safe-area and touch usability */
.dora-widget {
  z-index: 2200;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
}

.companion-stage {
  z-index: 2190;
}

.dora-panel {
  overscroll-behavior: contain;
}

.dora-messages {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 820px) {
  .dora-widget {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px));
  }

  .dora-widget__hint {
    right: 0;
    width: min(248px, calc(100vw - 70px));
    bottom: 112px;
  }

  .dora-panel {
    width: min(100vw - 12px, 360px);
    bottom: 110px;
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    border-radius: 22px;
  }

  .dora-panel__header {
    padding: 14px;
  }

  .dora-panel__brand img {
    width: 44px;
    height: 44px;
  }

  .dora-panel__brand strong {
    font-size: 0.98rem;
  }

  .dora-panel__brand span {
    font-size: 0.73rem;
  }

  .dora-pill {
    min-height: 26px;
    font-size: 0.68rem;
  }

  .dora-panel__back,
  .dora-panel__close {
    width: 34px;
    height: 34px;
  }

  .dora-panel__notice {
    padding: 10px 14px;
  }

  .dora-messages {
    padding: 12px 12px 8px;
  }

  .dora-message__shell {
    max-width: 90%;
  }

  .dora-suggestions {
    gap: 7px;
    padding: 10px 12px 8px;
  }

  .dora-composer {
    gap: 8px;
    padding: 0 12px 12px;
  }

  .dora-composer__input,
  .dora-send-btn {
    min-height: 44px;
  }

  .dora-quick-actions {
    padding: 0 12px 12px;
  }
}

@media (max-width: 560px) {
  .dora-widget__launcher {
    width: 96px;
    height: 126px;
  }

  .dora-widget__hint {
    bottom: 108px;
    width: min(232px, calc(100vw - 62px));
  }

  .dora-panel {
    width: min(100vw - 8px, 352px);
    right: 0;
    bottom: 104px;
    border-radius: 20px;
  }

  .dora-panel__notice {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .dora-live-voice-btn {
    width: 100%;
    min-height: 36px;
  }

  .dora-suggestion-btn,
  .dora-action-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .dora-composer {
    grid-template-columns: 1fr;
  }

  .dora-send-btn {
    width: 100%;
  }

  .dora-icon-btn {
    width: 42px;
    height: 42px;
  }

  .companion-avatar {
    width: 88px;
    height: 88px;
  }

  .companion-avatar--nova {
    width: 92px;
    height: 92px;
  }
}
