.roast-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  width: min(320px, calc(100vw - 2.5rem));
}

.roast-trigger {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--graffiti-gradient);
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  box-shadow: var(--shadow-drip);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.roast-trigger:hover,
.roast-trigger:focus-visible {
  transform: translateY(-2px);
}

.roast-trigger:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.roast-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-drip);
  padding: 1rem 2.5rem 1rem 1.1rem;
  animation: roast-pop 0.2s ease-out;
}

.roast-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.roast-close:hover,
.roast-close:focus-visible {
  color: var(--paper);
  background: var(--surface-2);
}

@keyframes roast-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.roast-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--paper);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.roast-card--loading .roast-text {
  color: var(--muted);
  font-style: italic;
}

.roast-again {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--paper);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.roast-again:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.roast-again:disabled {
  opacity: 0.6;
  cursor: default;
}

.roast-disclosure {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--muted-2);
  margin: 0.6rem 0 0;
}

@media (max-width: 480px) {
  .roast-widget {
    right: 1rem;
    bottom: 1rem;
    width: calc(100vw - 2rem);
    align-items: stretch;
  }

  .roast-trigger {
    align-self: flex-end;
  }
}
