.lena-phone { display: grid; justify-items: center; margin-block: 12px 18px; scroll-margin-top: 14px; }
.lena-phone-button {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(100%, 205px);
  padding: 4px 0 8px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: .76rem var(--mono);
}
.lena-phone-art {
  position: relative;
  display: block;
  width: min(100%, 180px);
  aspect-ratio: 1.56;
  transition: transform .2s ease;
}
.lena-phone-button:hover .lena-phone-art { transform: translateY(-3px) rotate(-2deg); }
.lena-phone-base {
  position: absolute;
  inset: 23% 14% 3% 8%;
  display: grid;
  place-items: center;
  border: 1px solid #c77f56;
  border-radius: 23% 23% 18% 18%;
  background: linear-gradient(160deg, #b9482d 5%, #8b3124 50%, #56251d);
  box-shadow: inset 0 -7px 0 #411d17, inset 0 2px 4px #e9a87883, 0 7px 11px #1f100dc9;
}
.lena-phone-handset {
  position: absolute;
  inset: 9% 12% auto 7%;
  height: 25%;
  border-radius: 55% 55% 27% 27%;
  border-top: 1px solid #e39b6d;
  background: linear-gradient(#b55136, #722a20 65%, #492018);
  box-shadow: 0 4px 5px #351914b0;
}
.lena-phone-handset::before, .lena-phone-handset::after {
  content: "";
  position: absolute;
  top: 43%;
  width: 23%;
  height: 86%;
  border-radius: 34%;
  background: linear-gradient(#a13e2b, #53241c);
  box-shadow: inset 0 2px 2px #f5b58655, 0 4px 5px #351914b0;
}
.lena-phone-handset::before { left: 0; transform: rotate(-9deg); }
.lena-phone-handset::after { right: 0; transform: rotate(9deg); }
.lena-phone-cord {
  position: absolute;
  top: 26%;
  right: 1%;
  width: 21%;
  height: 68%;
  border: 6px dotted #40241b;
  border-left-color: transparent;
  border-radius: 0 54% 70% 0;
  transform: rotate(-8deg);
  filter: drop-shadow(1px 2px 1px #1c0d0a);
}
.lena-phone-dial {
  position: relative;
  width: 47%;
  aspect-ratio: 1;
  margin-top: 10%;
  border: 2px solid #d5a578;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #e5be91, #966348 85%);
  box-shadow: 0 2px 5px #341713, inset 0 0 0 2px #f9d3a383;
}
.lena-phone-dial i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #382720;
  box-shadow: inset 0 1px 2px #100a08, 0 1px #f3c796;
  transform: translate(-50%, -50%) rotate(calc(var(--n) * 30deg)) translateX(210%);
}
.lena-phone-dial i:nth-child(1) { --n: 0; }
.lena-phone-dial i:nth-child(2) { --n: 1; }
.lena-phone-dial i:nth-child(3) { --n: 2; }
.lena-phone-dial i:nth-child(4) { --n: 3; }
.lena-phone-dial i:nth-child(5) { --n: 4; }
.lena-phone-dial i:nth-child(6) { --n: 5; }
.lena-phone-dial i:nth-child(7) { --n: 6; }
.lena-phone-dial i:nth-child(8) { --n: 7; }
.lena-phone-dial i:nth-child(9) { --n: 8; }
.lena-phone-dial i:nth-child(10) { --n: 9; }
.lena-phone-dial b { position: absolute; inset: 31%; border-radius: 50%; background: #ead5af; border: 2px solid #a87953; }

#lena-dialog {
  width: min(520px, 100% - 24px);
  max-height: min(690px, 100% - 24px);
  padding: clamp(13px, 4vw, 25px);
  color: var(--ink);
  background: #f0dfbf;
  color-scheme: light;
}
#lena-dialog[open] { display: flex; flex-direction: column; }
.lena-call-head, .lena-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lena-call-head { flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #89613f6b; }
.lena-call-head h2 { margin: 4px 0 0; font-size: clamp(1.35rem, 5vw, 2rem); }
#lena-dialog .lena-date { margin: 0; color: #75412e; font: .71rem var(--mono); }
.lena-call-button {
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid #916544;
  border-radius: 3px;
  background: #f8ebd2;
  color: #512d23;
  font: .72rem var(--mono);
}
.lena-call-button:hover:not(:disabled) { background: #e8d1ab; }
.lena-call-button[aria-pressed="true"], .lena-call-button.lena-send { background: #753829; color: #fff2da; }
.lena-call-button.lena-send:hover:not(:disabled) { background: #58281e; }
.lena-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 55px;
  height: min(270px, 36dvh);
  margin: 0;
  padding: 13px 2px 8px;
  overflow: auto;
  list-style: none;
}
.lena-messages li { align-self: flex-start; max-width: 92%; padding: 8px 11px; background: #f9edda; border-radius: 4px; overflow-wrap: anywhere; }
.lena-messages li[data-speaker="user"] { align-self: flex-end; background: #e6ccaa; }
.lena-messages strong { display: block; margin-bottom: 3px; font: .68rem var(--mono); color: #763c2b; }
#lena-dialog .lena-messages p { margin: 0; white-space: pre-wrap; }
#lena-dialog .lena-status, #lena-dialog .lena-voice-note { color: #713b2c; font: .72rem/1.4 var(--mono); }
#lena-dialog .lena-status { min-height: 1em; margin: 4px 0 7px; }
#lena-dialog .lena-voice-note { margin: 6px 0 0; }
.lena-form textarea { display: block; width: 100%; min-height: 60px; margin-bottom: 7px; padding: 8px; border: 1px solid #916544; border-radius: 3px; background: #fff7e7; color: var(--ink); resize: vertical; font: 1rem var(--serif); }
.lena-send { margin-left: auto; }
#lena-dialog :focus-visible { outline-color: #7e391e; }
@media (max-width: 1130px) { .lena-phone { grid-column: 1 / -1; margin-block: 0; } }
@media (max-width: 620px) { .masthead-right { flex-wrap: wrap; justify-content: flex-end; gap: 5px 10px; } }
@media (prefers-reduced-motion: reduce) { .lena-phone-art { transition: none; } }
