:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --ink: #1b1a1d;
  --soft: rgba(27, 26, 29, 0.58);
  --line: rgba(27, 26, 29, 0.09);
  --bubble: #f0eee9;
  --accent: #e5417a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.pm { position: relative; width: min(324px, 100%); padding: 14px 0 0; border-radius: 26px; background: var(--card); overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(27, 26, 29, 0.05), 0 28px 46px -28px rgba(27, 26, 29, 0.35); }

.pm__head { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.pm__faces { flex: none; display: flex; }
.pm__faces i { display: block; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 12px; line-height: 30px; font-weight: 740; text-align: center; box-shadow: 0 0 0 2px var(--card); }
.pm__faces i:first-child { background: #ffd9c7; color: #7a2c0c; }
.pm__faces i:last-child { margin-left: -9px; background: #cfe6ff; color: #0c3b72; }
.pm__name { min-width: 0; display: grid; }
.pm__name b { font-size: 15.500px; line-height: 20px; font-weight: 740; font-stretch: 106%; letter-spacing: -0.01em; }
.pm__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); }

/* the strip and the list share a fixed height: when the strip opens, the list gives it the room */
.pm__body { display: flex; flex-direction: column; height: min(238px, calc(100vh - 110px)); }
.pm__strip { flex: none; display: flex; align-items: center; height: 0; overflow: hidden; background: color-mix(in srgb, var(--accent) 7%, #ffffff); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--accent) 18%, transparent); }
.pm__jump { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 4px 0 16px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pm__jump svg { flex: none; width: 16px; height: 16px; fill: var(--accent); stroke: var(--accent); stroke-width: 1.200; stroke-linecap: round; stroke-linejoin: round; }
.pm__striptext { min-width: 0; display: grid; }
.pm__striptext b { font-size: 10.500px; line-height: 13px; font-weight: 720; color: var(--accent); }
.pm__striptext span { font-size: 12.500px; line-height: 16px; font-weight: 580; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm__unpin { flex: none; width: 42px; height: 42px; border: 0; background: transparent; color: var(--soft); cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pm__unpin svg { display: block; width: 16px; height: 16px; margin: 0 auto; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; }
.pm__jump:focus-visible, .pm__unpin:focus-visible, .pm__pin:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
@media (hover: hover) { .pm__jump:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); } .pm__unpin:hover { color: var(--ink); } }

.pm__list { flex: 1 1 auto; min-height: 0; list-style: none; display: block; padding: 10px 12px 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; outline: none; -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent); mask-image: linear-gradient(#000 calc(100% - 26px), transparent); }
.pm__list::-webkit-scrollbar { display: none; }
.pm__row { display: flex; align-items: flex-end; gap: 6px; margin-top: 6px; }
.pm__row:first-child { margin-top: 0; }
.pm__row--me { flex-direction: row-reverse; }
.pm__av { flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; line-height: 22px; font-weight: 740; text-align: center; }
.pm__row--a .pm__av { background: #ffd9c7; color: #7a2c0c; }
.pm__row--l .pm__av { background: #cfe6ff; color: #0c3b72; }
.pm__row--me .pm__av { display: none; }
.pm__bub { --f: 0; position: relative; max-width: 204px; padding: 7px 11px 8px; border-radius: 16px 16px 16px 5px; background: var(--bubble); font-size: 13px; line-height: 17px; font-weight: 540; box-shadow: 0 0 0 calc(3px * var(--f)) color-mix(in srgb, var(--accent) calc(55% * var(--f)), transparent); }
.pm__row--me .pm__bub { border-radius: 16px 16px 5px 16px; background: var(--ink); color: #ffffff; }
.pm__who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pm__pin { flex: none; width: 26px; height: 26px; margin-bottom: 3px; border: 0; border-radius: 50%; background: transparent; color: rgba(27, 26, 29, 0.26); cursor: pointer; outline: none; transition: color 0.25s ease, background-color 0.25s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pm__pin svg { display: block; width: 15px; height: 15px; margin: 0 auto; fill: none; stroke: currentColor; stroke-width: 1.300; stroke-linecap: round; stroke-linejoin: round; }
.pm__pin[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pm__pin[aria-pressed="true"] svg { fill: currentColor; }
@media (hover: hover) { .pm__pin[aria-pressed="false"]:hover { color: var(--ink); background: rgba(27, 26, 29, 0.06); } }

/* the copy of the message that travels from the conversation to the strip */
.pm__fly { position: absolute; left: 0; top: 0; z-index: 4; padding: 7px 11px 8px; border-radius: 16px; background: var(--bubble); color: var(--ink); font-size: 13px; line-height: 17px; font-weight: 540; white-space: nowrap; transform-origin: 0 0; pointer-events: none; opacity: 0; box-shadow: 0 10px 18px -8px rgba(27, 26, 29, 0.4); }
.pm__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #1b1a1d; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
