.agent-rest {
  --rest-ink: #f6eedb;
  --rest-muted: #ddd6c4;
  --rest-gold: #f1ce8e;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(1.15rem, 4vw, 3.5rem);
  margin: clamp(1.5rem, 3.5vw, 3rem) 0;
  padding: clamp(1.15rem, 3.6vw, 3rem);
  border: 1px solid #43554b;
  border-radius: clamp(.75rem, 1.6vw, 1.25rem);
  background: radial-gradient(ellipse at 92% 35%, #363224, #192b27 56%, #14221f 100%);
  color: var(--rest-ink);
}

.agent-rest [hidden] {
  display: none !important;
}

.agent-rest__content,
.agent-rest__art {
  min-inline-size: 0;
}

.agent-rest__content h2 {
  max-inline-size: 20ch;
  margin: 0 0 .65rem;
  color: var(--rest-ink);
  font: 500 clamp(1.9rem, 4vw, 3.6rem)/1.03 Georgia, serif;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.agent-rest__content p {
  max-inline-size: 52ch;
  color: var(--rest-muted);
  line-height: 1.6;
}

.agent-rest__content > p {
  margin: 0 0 1rem;
}

.agent-rest__choices {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.15rem 0 .8rem;
}

.agent-rest__choices button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  max-inline-size: 100%;
  padding: .45rem .8rem;
  border: 1px solid #9d956e;
  border-radius: .55rem;
  background: #1d2e27;
  color: var(--rest-ink);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.agent-rest__choices button:hover {
  border-color: var(--rest-gold);
  background: #344335;
}

.agent-rest__choices button[aria-pressed="true"] {
  border-color: var(--rest-gold);
  background: var(--rest-gold);
  color: #20251d;
}

.agent-rest :is(a, button):focus-visible {
  outline: 3px solid var(--rest-gold);
  outline-offset: 3px;
}

.agent-rest__message {
  min-block-size: 3.4rem;
  padding: .72rem .9rem;
  border-inline-start: 2px solid var(--rest-gold);
  border-radius: 0 .45rem .45rem 0;
  background: #10211c;
  color: var(--rest-ink);
  line-height: 1.55;
}

.agent-rest__message > :first-child {
  margin-block-start: 0;
}

.agent-rest__message > :last-child {
  margin-block-end: 0;
}

.agent-rest__content .agent-rest__signature {
  margin: .8rem 0 0;
  color: var(--rest-gold);
  font-family: Georgia, serif;
  font-style: italic;
}

.agent-rest__art {
  position: relative;
  isolation: isolate;
  display: block;
  margin: 0;
  overflow: hidden;
  border: 1px solid #9e845c;
  border-radius: .65rem;
  background: #19241f;
}

.agent-rest__art picture,
.agent-rest__art img {
  display: block;
  inline-size: 100%;
}

.agent-rest__art img {
  block-size: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.agent-rest__art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 57% 58%, #ffd38e85, #eeb66a28 34%, transparent 72%);
  opacity: 0;
  pointer-events: none;
}

.agent-rest__art--lit::after {
  animation: agent-rest-warm-light 850ms ease-in-out 1;
}

@keyframes agent-rest-warm-light {
  0%, 100% { opacity: 0; }
  44% { opacity: .72; }
}

@media (max-width: 760px) {
  .agent-rest {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 390px) {
  .agent-rest__choices {
    display: grid;
  }

  .agent-rest__choices button {
    inline-size: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-rest__art--lit::after {
    animation: none;
  }
}

