:root {
  font:
    15px/1.45 -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    sans-serif;
  color: #172f39;
  background: #eaf0f1;
  --ink: #172f39;
  --edge: #dbe6e8;
  --muted: #58717c;
  --blue: #057c98;
  --rose: #c23478;
  --white: #fcffff;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
h3,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
a {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #d73391;
  outline-offset: 2px;
}
.device {
  width: min(100%, 440px);
  height: 100vh;
  height: 100dvh;
  min-height: 315px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--white);
  margin: auto;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--edge);
}
.device > header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
  flex: none;
  height: 53px;
  border-bottom: 1px solid var(--edge);
}
header img {
  width: 116px;
  height: auto;
}
svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.return {
  display: grid;
  place-items: center;
  min-width: 29px;
  min-height: 34px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #456473;
  font-weight: 620;
  font-size: 12px;
}
.tag svg {
  width: 14px;
  height: 14px;
}
#call-panel,
#chat-panel {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.cover {
  min-height: 160px;
  flex: 1;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #8e7462;
  color: white;
}
.cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  position: absolute;
  inset: 0;
  z-index: -2;
}
.cover:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #27343744,
    transparent 26%,
    transparent 45%,
    #182b36da
  );
}
.status-chip {
  position: absolute;
  left: 15px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: #1e343acb;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 620;
}
.status-chip i {
  width: 7px;
  height: 7px;
  background: #64d9dd;
  border-radius: 50%;
}
.status-chip time,
.clock {
  font-variant-numeric: tabular-nums;
}
.speaker {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 1px solid #fffa;
  border-radius: 50%;
  background: #22343da6;
  color: white;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
}
.speaker svg {
  width: 16px;
  height: 16px;
}
.person {
  position: absolute;
  left: 19px;
  bottom: 18px;
}
.person small {
  font:
    italic 16px/1.3 Georgia,
    serif;
}
.person h1 {
  font-size: 33px;
  line-height: 1.19;
  letter-spacing: -0.9px;
  margin: 3px 0;
}
.person span {
  font-size: 12px;
  color: #f2f6f5;
}
.slab {
  padding: 20px 18px 10px;
}
.source {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}
h2 {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.4px;
}
.muted,
.fine,
.chat-head small {
  color: var(--muted);
  font-size: 12px;
}
.muted {
  margin-top: 6px;
}

.call-buttons {
  padding: 12px 17px max(14px, env(safe-area-inset-bottom));
  text-align: center;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--blue);
  color: white;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 15px;
  font-weight: 650;
}
.wide {
  width: 100%;
}
.fine {
  margin-top: 10px;
  font-size: 11px;
}
.commands {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 15px;
}
.command {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 61px;
}
.command i {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  color: #05657e;
  background: #e5f2f5;
}
.command.danger i {
  color: white;
  background: var(--rose);
}
.command.green i {
  color: white;
  background: var(--blue);
}
.link {
  color: #12657c;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 12px;
  min-height: 30px;
  margin: 5px 0 0;
}
.wait-hint {
  color: var(--muted);
  font-size: 13px;
}
#chat-panel {
  overflow: hidden;
}
.chat-head {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 11px 15px;
  border-bottom: 1px solid var(--edge);
}
.chat-head img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
}
.chat-head h1 {
  font-size: 19px;
  line-height: 1.25;
}
.chat-head small {
  font-size: 11px;
}
.chat-list {
  flex: 1;
  min-height: 70px;
  padding: 11px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.message {
  display: flex;
  gap: 6px;
  margin: 0 0 9px;
  align-items: flex-end;
}
.message.me {
  justify-content: flex-end;
}
.message .body {
  padding: 7px 10px;
  border-radius: 10px;
  background: #edf3f4;
  max-width: 87%;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.message.me .body {
  background: #d9eef2;
}
.message .body small {
  display: block;
  color: #51717d;
  font-size: 10px;
}
.message img {
  width: clamp(100px, 34vw, 160px);
  max-height: 130px;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}
.message.record {
  justify-content: center;
}
.message.record .body {
  font-size: 12px;
  color: #426069;
  text-align: center;
  background: #f1f5f6;
}
.chat-list .wait-hint {
  text-align: center;
  margin: 16px 0;
}
#compose {
  padding: 7px 12px 10px;
  border-top: 1px solid var(--edge);
}
.attach-actions {
  display: flex;
  gap: 6px;
  margin: 0 0 5px;
}
.attach-actions button,
.attach-actions label {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  padding: 3px 7px;
  font-size: 12px;
  color: #386675;
  cursor: pointer;
}
.attach-actions svg {
  width: 15px;
  height: 15px;
}
.attach-actions input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.compose-row {
  display: flex;
  gap: 6px;
}
.compose-row input {
  font-size: 14px;
  min-width: 0;
  flex: 1;
  border: 1px solid #bed2d7;
  border-radius: 8px;
  padding: 8px 10px;
}
.compose-row button {
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  padding: 7px 13px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
#draft-photo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 5px;
  background: #eaf4f5;
  padding: 3px 6px;
  border-radius: 6px;
}
#draft-photo img {
  width: 31px;
  height: 31px;
  border-radius: 4px;
  object-fit: cover;
}
#drop-photo {
  margin-left: auto;
  font-size: 20px;
}
#complete-controls {
  padding: 0 12px 10px;
}
#complete-controls .primary {
  min-height: 38px;
  font-size: 13px;
}
#notice {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: #213b47;
  border-radius: 7px;
  z-index: 2;
  font-size: 12px;
  text-align: center;
  max-width: 90%;
}
#notice:not(:empty) {
  padding: 6px 10px;
}
@media (max-height: 635px) {
  header {
    height: 40px !important;
  }
  .slab {
    padding-top: 10px;
  }
  .call-buttons {
    padding-top: 5px;
  }
  .person {
    bottom: 10px;
  }
  .person h1 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
  }
}

.command[aria-pressed='true'] i {
  background: #42616f;
  color: white;
}
.image-open {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
}
#image-zoom {
  width: min(90vw, 640px);
  border: 0;
  border-radius: 13px;
  padding: 14px;
  background: #fcffff;
  color: #162e38;
}
#image-zoom::backdrop {
  background: #0d2634bd;
}
.zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.zoom-head h2 {
  font-size: 17px;
}
.zoom-head button {
  color: var(--blue);
  font-size: 13px;
  min-height: 30px;
  padding-inline: 8px;
}
#zoom-image {
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  border-radius: 7px;
  display: block;
  background: #eaf1f2;
}
#zoom-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

body[data-phase='incoming'] .status-chip {
  background: #8d235f;
}
body[data-phase='incoming'] .status-chip i {
  background: #ffdaea;
}
body[data-phase='ringing'] .status-chip {
  background: #095c73;
}
#call-panel .slab {
  padding: 15px 18px 4px;
}
#call-panel .call-buttons {
  padding: 12px 17px max(12px, env(safe-area-inset-bottom));
}
#call-panel .fine {
  margin-top: 3px;
}
#call-panel .command {
  font-size: 13px;
  font-weight: 620;
}
#call-panel .command i {
  width: 48px;
  height: 48px;
}
#chat-panel {
  background: #fbfefe;
}
.chat-head {
  flex: none;
  padding: 9px 13px;
  background: #fff;
  gap: 8px;
}
.chat-head img {
  height: 40px;
  width: 40px;
}
.chat-head h1 {
  font-size: 18px;
  white-space: nowrap;
}
#live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 11px;
  color: #116e7b;
}
#live-status i {
  width: 6px;
  height: 6px;
  background: #168e9b;
  border-radius: 50%;
}
.compact-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}
.compact-controls button {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  min-width: 38px;
  font-size: 10px;
  line-height: 1.2;
  color: #43616d;
}
.compact-controls i {
  height: 29px;
  width: 32px;
  display: grid;
  place-items: center;
  background: #e6f3f5;
  color: #086b7e;
  border-radius: 10px;
}
.compact-controls i svg {
  width: 16px;
  height: 16px;
}
.compact-controls .danger i {
  background: #b52d6b;
  color: white;
}
.compact-controls [aria-pressed='true'] i {
  background: #386071;
  color: #fff;
}
.voice-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 14px;
  font-size: 11px;
  color: #56717b;
  border-bottom: 1px solid var(--edge);
  background: #f2f8f8;
}
.voice-state > span + span {
  color: #126d7a;
}
.voice-state button {
  color: #096b80;
  margin-left: auto;
  font-weight: 620;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-list {
  padding: 9px 13px 2px;
}
.message {
  margin-bottom: 7px;
}
.message .body {
  padding: 6px 9px;
  line-height: 1.4;
  font-size: 14px;
}
.message .body small {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.speech .body > small svg {
  width: 14px;
  height: 12px;
  color: #137986;
  stroke-width: 2;
}
.speech.mine .body {
  background: #fbeaf2;
}
.speech.mine .body > small svg {
  color: #aa376f;
}
.speech.latest .body {
  box-shadow: inset 2px 0 #098296;
}
.speech.latest.mine .body {
  box-shadow: inset -2px 0 #ba4680;
}
.message:has(.image-open) .body {
  padding: 5px 7px;
  max-width: 53%;
}
.message .image-open img {
  width: clamp(112px, 32vw, 139px);
  height: clamp(73px, 10.5dvh, 94px);
  object-fit: cover;
  object-position: center 35%;
}
.message .image-open + span {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
#compose {
  background: #fff;
  flex: none;
}
@media (max-width: 345px) {
  .chat-head {
    padding: 7px 9px;
  }
  .compact-controls {
    gap: 2px;
  }
  .chat-head img {
    width: 34px;
    height: 34px;
  }
  .chat-list {
    padding-inline: 9px;
  }
}
