:root {
  --navy: #0a1a3d;
  --blue: #1a66ff;
  --ink: #0e1f3a;
  --muted: #56647a;
  --green: #2fbf5b;
  --red: #e5484d;
  --amber: #f5a524;
  --font: Inter, 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  /* The photos are 1672 x 941. Like the mockups, the whole photo is shown (fitted inside the window) and never
     wider than its natural 1672 CSS px; a blurred copy fills the rest. */
  --photo-ratio: 1.7768;
  --scene-w: min(1672px, 100vw, 100vh * var(--photo-ratio));
  --scene-x: -50%;
  /* The photo's own edge colours, top to bottom, left and right side (scripts/build-images.mjs prints them):
     the page around the photo continues what its edges show, instead of one flat colour. */
  --edge-left: linear-gradient(
    to bottom,
    #818151,
    #656427,
    #9c846e,
    #a78c78,
    #ac8c75,
    #936a4e,
    #926343,
    #8b552d
  );
  --edge-right: linear-gradient(
    to bottom,
    #c9d3cf,
    #cac9b8,
    #6f6d71,
    #2c2c2e,
    #8c817e,
    #907c73,
    #765f54,
    #6c564b
  );
  --photo-edge: #8b7864;
  /* Where the photo starts (0 when it fills the width), and how far inside it the chat and the panel sit,
     clear of its feathered edges. */
  --photo-left: max(0px, (100vw - var(--scene-w)) / 2);
  --inset-left: calc(var(--photo-left) + var(--scene-w) * 0.12);
  --inset-right: calc(var(--photo-left) + var(--scene-w) * 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  /* the mean colour of the photo's left and right edges (scripts/build-images.mjs prints it) */
  background: var(--photo-edge);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

:focus-visible {
  outline: 3px solid #7fb2ff;
  outline-offset: 2px;
}

/* ---- the stage: photo at natural size, blurred copy around it ------------------------------------------------ */

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: #fff;
  /* its own stacking context, so the edge colours (z-index -1) paint above the page background */
  isolation: isolate;
}

/* Left and right edge colours of the photo, each fading out towards the middle, where they meet under it. */
.stage::before,
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.stage::before {
  background: var(--edge-left);
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent 70%);
  mask-image: linear-gradient(to right, #000 30%, transparent 70%);
}

.stage::after {
  background: var(--edge-right);
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent 70%);
  mask-image: linear-gradient(to left, #000 30%, transparent 70%);
}

.scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--scene-w);
  aspect-ratio: 1672 / 941;
  transform: translate(var(--scene-x), -50%);
  --pulse: 0.6;
  /* Feathered edges: the photo fades softly into the page colour, which is sampled from the photo itself,
     so it blends at any window shape without zooming, upscaling or a blurred copy. */
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(to bottom, transparent, #000 11%, #000 89%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(to bottom, transparent, #000 11%, #000 89%, transparent);
  mask-composite: intersect;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
}

/* The lit photo fades in and out over the dark one; every ring change is soft. */
.l-lit {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* A soft blue light exactly over the ring (measured on the photo: x 25-58 %, y 49-56 %). */
.glow {
  position: absolute;
  left: 22.5%;
  width: 38.2%;
  top: 45.5%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(90, 200, 255, 0.85),
    rgba(40, 130, 255, 0.4) 55%,
    transparent
  );
  filter: blur(12px);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.scene[data-ring='listening'] .l-lit {
  opacity: 1;
}
.scene[data-ring='listening'] .glow {
  opacity: 0.35;
}

/* thinking: the ring breathes slowly instead of spinning between two photos */
.scene[data-ring='thinking'] .l-lit {
  animation: breathe-ring 1.8s ease-in-out infinite;
}
.scene[data-ring='thinking'] .glow {
  animation: breathe-glow 1.8s ease-in-out infinite;
}

/* speaking: brightness follows the loudness of the voice (--pulse, 0..1, smoothed in app.js) */
.scene[data-ring='speaking'] .l-lit {
  opacity: calc(0.45 + 0.55 * var(--pulse));
  transition-duration: 0.12s;
}
.scene[data-ring='speaking'] .glow {
  opacity: calc(0.7 * var(--pulse));
  transition-duration: 0.12s;
}
.scene[data-ring='speaking'].fallback-pulse .l-lit {
  animation: breathe-ring 1.3s ease-in-out infinite;
}
.scene[data-ring='speaking'].fallback-pulse .glow {
  animation: breathe-glow 1.3s ease-in-out infinite;
}

@keyframes breathe-ring {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes breathe-glow {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.75;
  }
}

/* a light wash keeps text readable over the bright parts of the photo */
.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 14, 8, 0.32), rgba(20, 14, 8, 0) 26%);
}

/* ---- conversation: floating bubbles, scrollable ------------------------------------------------------------- */

.convo {
  position: absolute;
  left: var(--inset-left);
  top: clamp(10px, 3vh, 40px);
  bottom: clamp(230px, 48vh, 560px);
  width: min(540px, calc(100vw - 28px));
  display: flex;
}

.transcript {
  list-style: none;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 36px 14px 4px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.55) transparent;
  /* only the top edge fades; scrolling up brings older messages back */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 36px);
}

.transcript::-webkit-scrollbar {
  width: 6px;
}
.transcript::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.55);
}

/* new messages stack from the bottom, but the list still scrolls (justify-content: flex-end would not) */
.transcript > :first-child {
  margin-top: auto;
}

/* Messaging-app bubbles: rounded, with a small curved tail on the speaker's side, and a soft spring entrance
   (slight scale, slide and fade) from that corner. */
.bubble {
  position: relative;
  max-width: 76%;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.97rem;
  line-height: 1.38;
  color: #fff;
  animation: pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow-wrap: anywhere;
}

.bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: inherit;
}

.bubble.alexa,
.bubble.error {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  transform-origin: 0 100%;
}

.bubble.alexa::after,
.bubble.error::after {
  left: -6px;
  clip-path: path('M12 0 C12 7 7 12 0 12 L12 12 Z');
}

.bubble.alexa {
  background: rgb(10, 26, 61);
}

.bubble.user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--blue);
  transform-origin: 100% 100%;
}

.bubble.user::after {
  right: -6px;
  clip-path: path('M0 0 C0 7 5 12 12 12 L0 12 Z');
}

.bubble.error {
  background: rgb(120, 22, 38);
}

/* Alexa's words appear one by one, in step with her voice (app.js revealWords). */
.bubble .w {
  opacity: 0;
  transition: opacity 0.22s ease;
}

.bubble .w.on {
  opacity: 1;
}

/* The user's words while they are still talking. */
.bubble.user.live {
  background: rgba(26, 102, 255, 0.8);
}

.bubble.user.live .text::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: rgba(255, 255, 255, 0.85);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

/* "Alexa is thinking": three dots that bounce gently. */
.typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 13px 16px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: rgb(10, 26, 61);
  transform-origin: 0 100%;
  animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  animation: dot 1.2s ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.bubble.proactive {
  box-shadow: inset 0 0 0 2px var(--amber);
}

.bubble.proactive::before {
  content: 'Alexa noticed something';
  display: block;
  margin-bottom: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--amber);
}

.tools {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font:
    11px/1.4 ui-monospace,
    Consolas,
    monospace;
  color: #a9d4ff;
  background: rgba(127, 178, 255, 0.14);
  border: 1px solid rgba(127, 178, 255, 0.3);
  border-radius: 999px;
  padding: 0 8px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-1px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* ---- Recall Guardian panel: brand header on the photo, items in one glass card ------------------------------------ */

.panel {
  position: absolute;
  top: clamp(12px, 4vh, 44px);
  right: var(--inset-right);
  width: min(380px, calc(100vw - 28px));
  max-height: calc(100% - 150px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px 0 10px;
}

.logo {
  width: 46px;
  height: auto;
  flex: none;
}

.panel-head h1 {
  flex: 1;
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}

/* Credits at the bottom of the screen, starting where the "Recall Guardian" letters start (panel padding 10px +
   logo 46px + gap 14px), on the same line as the composer. */
.credits {
  position: absolute;
  right: var(--inset-right);
  bottom: clamp(18px, 7vh, 64px);
  width: min(380px, calc(100vw - 28px));
  height: 52px;
  padding-left: 70px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  opacity: 0.92;
}

.credit-mark {
  font-size: 0.95rem;
  font-weight: 700;
}

.credit-mark img {
  display: block;
  height: 22px;
  width: auto;
  /* Any colour logo shows in white, like the text around it. */
  filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
}

.gear {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  transition:
    transform 0.25s ease,
    background 0.2s;
}

.gear:hover {
  background: rgba(255, 255, 255, 0.4);
}

.gear[aria-expanded='true'] {
  transform: rotate(60deg);
}

.household {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 10px 30px rgba(30, 20, 10, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.household:empty {
  padding: 14px 18px;
}

.household:empty::after {
  content: 'Nothing registered yet. Tell Alexa what you own.';
  color: var(--muted);
  font-size: 0.92rem;
}

.item {
  border-radius: 13px;
  animation: slide-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: background 0.4s;
}

.item + .item {
  margin-top: 2px;
}

.item[data-status='recalled'] {
  background: rgba(255, 255, 255, 0.42);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
}

.item-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 13px;
}

.item-row[data-expandable='false'] {
  cursor: default;
}

.dot {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(47, 191, 91, 0.18);
  transition:
    background 0.5s,
    box-shadow 0.5s;
}

.item[data-status='recalled'] .dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(229, 72, 77, 0.2);
  animation: alarm 1.8s ease-in-out infinite;
}

.item[data-status='question'] .dot {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(245, 165, 36, 0.22);
}

.item.flip .dot {
  animation: flip 0.7s ease both;
}

@keyframes alarm {
  50% {
    box-shadow: 0 0 0 9px rgba(229, 72, 77, 0.06);
  }
}

@keyframes flip {
  40% {
    transform: scale(1.8);
  }
}

.item-title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* the detail unfolds smoothly (grid rows 0fr -> 1fr) */
.detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.45s ease;
}

.item[data-open='true'] .detail {
  grid-template-rows: 1fr;
  opacity: 1;
}

.detail > div {
  min-height: 0;
  overflow: hidden;
}

.detail-body {
  display: flex;
  gap: 12px;
  padding: 0 14px 14px 42px;
  font-size: 0.88rem;
  line-height: 1.36;
  color: #24324a;
}

.detail .model {
  display: block;
  margin: -6px 0 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.detail img {
  width: 88px;
  height: 88px;
  flex: none;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.detail p {
  margin: 0;
}

/* ---- settings dialog --------------------------------------------------------------------------------------- */

.settings {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 24px 60px rgba(20, 14, 8, 0.3);
}

.settings[open] {
  animation: pop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.settings::backdrop {
  background: rgba(20, 14, 8, 0.28);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--navy);
}

.close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 26, 61, 0.06);
  color: var(--navy);
}

.settings fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings legend {
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.actions button.quiet {
  background: rgba(10, 26, 61, 0.08);
  color: var(--navy);
}

.actions button:disabled {
  opacity: 0.5;
  cursor: progress;
}

.select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.select select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(10, 26, 61, 0.2);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* visually replaced by .track, but still the real, focusable, clickable checkbox */
.switch input {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 24px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
  border-radius: 12px;
  background: rgba(10, 26, 61, 0.2);
  transition: background 0.2s;
  pointer-events: none;
}

.track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.switch input:checked + .track {
  background: var(--blue);
}

.switch input:checked + .track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .track {
  outline: 3px solid #7fb2ff;
  outline-offset: 2px;
}

.fineprint {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---- first-run hint: sits where the first message will appear ------------------------------------------- */

.hint {
  position: absolute;
  left: var(--inset-left);
  bottom: clamp(230px, 48vh, 560px);
  max-width: min(540px, calc(100vw - 28px));
  margin: 0;
  padding: 10px 16px;
  border-radius: 14px;
  color: #fff;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: rise 0.6s 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  pointer-events: none;
}

/* ---- notices, status, composer ---------------------------------------------------------------------------- */

.notice,
.status {
  position: absolute;
  left: var(--inset-left);
  margin: 0;
  max-width: min(540px, calc(100vw - 28px));
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 26, 61, 0.8);
  font-size: 0.85rem;
  line-height: 1.3;
}

.notice {
  bottom: calc(clamp(18px, 7vh, 64px) + 70px);
  color: #ffe2a8;
}

.status {
  bottom: calc(clamp(18px, 7vh, 64px) + 70px);
  transition: opacity 0.3s;
}

.status:empty {
  opacity: 0;
}

.notice:not([hidden]) ~ .status:not(:empty) {
  bottom: calc(clamp(18px, 7vh, 64px) + 108px);
}

.composer {
  position: absolute;
  left: var(--inset-left);
  bottom: clamp(18px, 7vh, 64px);
  width: min(540px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.composer input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.composer input:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 0;
}

.composer input:disabled {
  opacity: 0.7;
}

.mic,
.send {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition:
    transform 0.15s,
    background 0.2s,
    opacity 0.2s;
}

.send {
  background: var(--blue);
  color: #fff;
}

.mic {
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue);
}

.mic[aria-pressed='true'] {
  background: #31d6a0;
  color: #04261b;
  animation: breathe-btn 1.2s ease-in-out infinite;
}

.mic[data-armed='true'] {
  box-shadow: 0 0 0 3px rgba(49, 214, 160, 0.7);
}

.mic:disabled {
  background: rgba(255, 255, 255, 0.4);
  color: rgba(10, 26, 61, 0.5);
  cursor: not-allowed;
}

.send:disabled {
  opacity: 0.5;
  cursor: progress;
}

.send:hover:not(:disabled),
.mic:hover:not(:disabled) {
  transform: scale(1.06);
}

@keyframes breathe-btn {
  50% {
    box-shadow: 0 0 0 10px rgba(49, 214, 160, 0.25);
  }
}

/* ---- phones ------------------------------------------------------------------------------------------------- */

@media (max-width: 760px) {
  :root {
    /* a phone is too narrow to show the whole photo: fill the height and keep the Echo (ring centre at
       41.6 % of the photo) in the middle */
    --scene-w: min(1672px, max(100vw, 100vh * var(--photo-ratio)));
    --scene-x: -41.6%;
  }

  .scene {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .panel {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 40%;
    gap: 8px;
  }

  .panel-head {
    padding: 6px 4px 6px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .logo {
    width: 34px;
  }

  .panel-head h1 {
    font-size: 1.2rem;
  }

  /* No room next to the composer on a phone. */
  .credits {
    display: none;
  }

  .convo {
    left: 10px;
    top: 38%;
    bottom: calc(env(safe-area-inset-bottom) + 84px);
    width: calc(100vw - 20px);
  }

  .bubble {
    max-width: 86%;
    font-size: 0.95rem;
    padding: 9px 14px;
  }

  .composer {
    left: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 14px);
    width: calc(100vw - 20px);
  }

  .notice,
  .status {
    left: 10px;
    max-width: calc(100vw - 20px);
    bottom: calc(env(safe-area-inset-bottom) + 74px);
  }

  .notice:not([hidden]) ~ .status:not(:empty) {
    bottom: calc(env(safe-area-inset-bottom) + 112px);
  }

  .hint {
    left: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 160px);
    max-width: calc(100vw - 20px);
  }

  .detail-body {
    padding-left: 14px;
  }

  .detail img {
    width: 72px;
    height: 72px;
  }
}

@media (max-height: 560px) and (min-width: 761px) {
  .convo {
    bottom: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Except what tells you Alexa's state (Windows "animation effects off" turns on reduced motion): thinking,
     listening and the typing dots keep a slow, gentle pulse instead of freezing. */
  .typing span,
  .scene[data-ring='thinking'] .l-lit,
  .scene[data-ring='thinking'] .glow,
  .mic[aria-pressed='true'] {
    animation-duration: 2.4s !important;
    animation-iteration-count: infinite !important;
  }
}
