/* Green adaptation of the dark face and reflective rim in Liquid Metal Button. */
@property --metal-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 12deg;
}

#voice-launch, #voice-panel, #voice-panel button {
  --metal-face: linear-gradient(178deg, #293d2c, #14271a 44%, #09140c);
  --metal-rim: conic-gradient(from var(--metal-angle), #91ac89, #e9ffd8 6%, #54744c 11%, #233c2a 26%, #93ba78 40%, #f5ffe9 44%, #638856 49%, #243b28 63%, #b8ee64 75%, #f5ffef 78%, #5a7959 84%, #91ac89);
  border: 2px solid transparent;
  background: var(--metal-face) padding-box, var(--metal-rim) border-box;
  color: #effbe9;
}
#voice-launch, #voice-panel button, #voice-panel input { font:inherit; }
#voice-launch {
  position:fixed;
  right:max(18px,env(safe-area-inset-right));
  bottom:max(18px,env(safe-area-inset-bottom));
  z-index:22;
  min-height:50px;
  padding:10px 28px;
  border-radius:999px;
  font-weight:650;
  cursor:pointer;
  box-shadow:inset 0 1px 1px #f2ffe12b,0 9px 20px #07170957;
}
#voice-panel {
  background:radial-gradient(ellipse at 50% 36%,#233f28,transparent 58%) padding-box,linear-gradient(155deg,#25372a,#122519 47%,#09160e) padding-box,var(--metal-rim) border-box;
  box-sizing:border-box;
  width:min(420px,calc(100vw - 28px));
  max-height:90dvh;
  margin:auto;
  border-radius:28px;
  padding:24px clamp(18px,5vw,32px);
  text-align:center;
  box-shadow:inset 0 1px 2px #d7ffbd33,0 24px 90px #06140b75;
  overflow:auto;
}
#voice-launch:focus-visible, #voice-panel button:focus-visible {
  outline:3px solid #b8ee64;
  outline-offset:3px;
}
@keyframes voice-metal-flow { to { --metal-angle:372deg; } }
@media (prefers-reduced-motion:no-preference) {
  #voice-launch, #voice-panel[open] { animation:voice-metal-flow 10s linear infinite; }
  #voice-panel button:is(:hover,:focus-visible) { animation:voice-metal-flow 2s linear infinite; }
  #voice-launch { transition:transform .18s ease; }
  #voice-launch:hover { transform:translateY(-2px); }
  #voice-launch:active { transform:translateY(0); }
}
#voice-panel::backdrop{background:#08180fc4;backdrop-filter:blur(5px)}
.voice-head,.voice-actions,#voice-compose{display:flex;align-items:center;gap:10px}
.voice-head{justify-content:space-between;font-weight:600;color:#c3dfa9;font-size:14px}
#voice-panel h2{font-size:clamp(25px,5vw,34px);letter-spacing:-.04em;color:inherit;margin:12px 0 0}
#voice-orb{display:block;width:min(240px,55vw,32dvh);height:auto;aspect-ratio:1;margin:8px auto;background:radial-gradient(circle,transparent 42%,#a7f875 51%,#399759 56%,transparent 66%)}
#voice-orb.rendered{background:none}
#voice-status{font-weight:650;margin:4px auto 12px}
#voice-panel button { cursor:pointer; border-radius:24px; padding:10px 16px; }
#voice-panel #voice-start, #voice-compose button { --metal-face:linear-gradient(180deg,#40632d,#213d21 53%,#112714); color:#ecffc9; font-weight:650; }
#voice-panel #voice-close{font-size:22px;width:40px;height:40px;padding:0}
.voice-actions{justify-content:center;flex-wrap:wrap}
#voice-panel [hidden]{display:none}
#voice-log{max-height:22dvh;overflow:auto;text-align:left;font-size:14px;line-height:1.45}
#voice-log p{margin:6px 0}
#voice-compose{margin:12px 0}
#voice-text{flex:1;min-width:0;padding:9px 12px;border-radius:14px;border:1px solid #869e7c}

@keyframes voice-content-arrives {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  body:has(#voice-panel[open]) #voice-launch { visibility: hidden; }
  #voice-panel[open]::backdrop { animation: voice-content-arrives 240ms ease-out; }
  #voice-panel[data-closing]::backdrop { animation: voice-content-arrives 160ms ease-in reverse forwards; }
}
