/* =============================================================================
   msg — liquid glass design system
   Reproduced from design_handoff_msg_chat/. Every value here is from the handoff;
   don't "tidy" the numbers, they are the spec.

   A glass surface is always four layers:
     1. translucent --pane / --pane2
     2. backdrop-filter: blur(N) saturate(...)   (-webkit- prefix required for Safari)
     3. hairline 1px solid --hair
     4. top specular inset 0 1.5px 0 --spec
   Behind everything, two blurred orbs drift forever — without motion back there the
   glass reads as flat grey.
   ============================================================================= */

/* ---------- themes ---------------------------------------------------------- */

:root,
[data-theme='graphite'] {
  --bg: #0c0d10;
  --acc: oklch(0.72 0.13 250);
  --acc2: oklch(0.62 0.15 268);
  --orbA: oklch(0.6 0.17 255);
  --orbB: oklch(0.62 0.16 300);
}
[data-theme='midnight'] {
  --bg: #0a0b16;
  --acc: oklch(0.7 0.15 285);
  --acc2: oklch(0.58 0.17 300);
  --orbA: oklch(0.55 0.19 290);
  --orbB: oklch(0.5 0.18 255);
}
[data-theme='ocean'] {
  --bg: #061012;
  --acc: oklch(0.76 0.12 190);
  --acc2: oklch(0.66 0.13 210);
  --orbA: oklch(0.62 0.15 195);
  --orbB: oklch(0.58 0.14 230);
}
[data-theme='sunset'] {
  --bg: #120b09;
  --acc: oklch(0.76 0.15 50);
  --acc2: oklch(0.65 0.17 25);
  --orbA: oklch(0.64 0.18 40);
  --orbB: oklch(0.58 0.17 15);
}
[data-theme='iris'] {
  --bg: #0f0a14;
  --acc: oklch(0.74 0.14 320);
  --acc2: oklch(0.62 0.16 300);
  --orbA: oklch(0.6 0.18 330);
  --orbB: oklch(0.56 0.17 285);
}
[data-theme='paper'] {
  --bg: #f4f3f0;
  --acc: oklch(0.55 0.13 250);
  --acc2: oklch(0.46 0.14 265);
  --orbA: oklch(0.86 0.07 250);
  --orbB: oklch(0.88 0.06 300);
}
[data-theme='frost'] {
  --bg: #eef3f4;
  --acc: oklch(0.55 0.11 200);
  --acc2: oklch(0.47 0.12 215);
  --orbA: oklch(0.87 0.06 200);
  --orbB: oklch(0.89 0.05 240);
}

/* Dark is the default set; the two light schemes override the translucencies. */
:root {
  --pane: rgba(255, 255, 255, 0.07);
  --pane2: rgba(255, 255, 255, 0.13);
  --hair: rgba(255, 255, 255, 0.14);
  --tx: #f2f3f5;
  --tx2: rgba(242, 243, 245, 0.6);
  --tx3: rgba(242, 243, 245, 0.36);
  --spec: rgba(255, 255, 255, 0.4);
  --onAcc: #fff;

  --danger: oklch(0.68 0.19 25);
  --formErr: oklch(0.72 0.17 25);
  --delMark: oklch(0.75 0.15 60);
  --online: oklch(0.79 0.17 145);
  --recDot: oklch(0.62 0.22 25);

  --mono: ui-monospace, Menlo, monospace;
}

[data-theme='paper'],
[data-theme='frost'] {
  --pane: rgba(255, 255, 255, 0.55);
  --pane2: rgba(255, 255, 255, 0.68);
  --hair: rgba(20, 25, 35, 0.1);
  --tx: #171a1f;
  --tx2: rgba(23, 26, 31, 0.6);
  --tx3: rgba(23, 26, 31, 0.4);
  --spec: rgba(255, 255, 255, 0.85);
}

/* ---------- reset ---------------------------------------------------------- */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#root {
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  overscroll-behavior: none;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

#root {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* react-native-web's root container is `flex: 1`, which only produces a height when its
     parent is a flex container. Without this every absolutely-positioned surface (orbs, tab
     bar, screens) collapses to zero height and the tab bar lands above the viewport. */
  display: flex;
  flex-direction: column;
}

input,
button,
textarea {
  font: inherit;
  color: inherit;
  outline: none;
  border: none;
  background: none;
  margin: 0;
}

button {
  cursor: pointer;
  padding: 0;
  text-align: left;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Long-press selection is an annoyance on a phone; message text opts back in. */
* {
  -webkit-user-select: none;
  user-select: none;
}
input,
textarea,
[data-selectable='true'] {
  -webkit-user-select: text;
  user-select: text;
}

/* ---------- keyframes ------------------------------------------------------ */

@keyframes orbA {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(58px, -42px) scale(1.18);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}
@keyframes orbB {
  0% {
    transform: translate(0, 0) scale(1.1);
  }
  50% {
    transform: translate(-52px, 48px) scale(0.9);
  }
  100% {
    transform: translate(0, 0) scale(1.1);
  }
}
@keyframes sweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(240%);
  }
}
@keyframes recPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.3;
  }
}
@keyframes scrIn {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes scrBack {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes sheetIn {
  from {
    transform: translateY(106%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes bubIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(9px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ---------- safe areas ----------------------------------------------------- */
/* The prototype hard-codes a 54px status bar and a 26px home indicator because it draws a
   fake iPhone. In the browser those come from the real device, so every "54px" in the spec
   becomes `env(safe-area-inset-top) + padding`. */

:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --topbar: calc(var(--sat) + 14px);
}

/* ---------- background orbs ------------------------------------------------ */

.orbs {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  z-index: 0;
}
.orb-a {
  position: absolute;
  top: 4%;
  left: -6%;
  width: 70%;
  height: 34%;
  border-radius: 50%;
  background: var(--orbA);
  filter: blur(62px);
  opacity: 0.5;
  animation: orbA 18s ease-in-out infinite;
}
.orb-b {
  position: absolute;
  bottom: 8%;
  right: -10%;
  width: 76%;
  height: 38%;
  border-radius: 50%;
  background: var(--orbB);
  filter: blur(72px);
  opacity: 0.42;
  animation: orbB 23s ease-in-out infinite;
}

/* ---------- glass surfaces -------------------------------------------------- */

.glass {
  background: var(--pane);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1.5px 0 var(--spec);
}
.g-nav {
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
}
.g-chathead {
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
}
.g-tab {
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  backdrop-filter: blur(30px) saturate(200%);
}
.g-sheet {
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  backdrop-filter: blur(34px) saturate(200%);
}
.g-bubble {
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
}
.g-pill {
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
}
.g-card {
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
}

/* ---------- screens --------------------------------------------------------- */

.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.screen-in {
  animation: scrIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.screen-back {
  animation: scrBack 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.scroller {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.press {
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.press:active {
  transform: scale(0.94);
}
.press-sm:active {
  transform: scale(0.965);
}
.press-lg:active {
  transform: scale(0.9);
}
.row-press {
  transition: background 0.18s;
}
.row-press:active {
  background: var(--pane2);
}

.mono {
  font-family: var(--mono);
}

/* ---------- auth ------------------------------------------------------------ */

.auth {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 26px;
  overflow-y: auto;
  animation: fadeIn 0.4s ease;
}
.auth-logo {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: linear-gradient(150deg, var(--acc), var(--acc2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 14px 34px -12px var(--acc),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55);
}
.auth-logo span {
  font-size: 36px;
  font-weight: 600;
  color: var(--onAcc);
  letter-spacing: -2px;
  margin-top: -5px;
}
.sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 44%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}
.sweep-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  animation: sweep 5s ease-in-out infinite;
  pointer-events: none;
}
.auth-card {
  border-radius: 28px;
  padding: 8px;
  background: var(--pane);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1.5px 0 var(--spec),
    0 24px 50px -20px rgba(0, 0, 0, 0.7);
}
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  background: var(--pane2);
}
.field input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: var(--tx);
}
.field input::placeholder {
  color: var(--tx3);
}
.field-top {
  border-radius: 20px 20px 6px 6px;
}
.field-mid {
  border-radius: 6px;
}
.field-bottom {
  border-radius: 6px 6px 20px 20px;
}
.cta {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--acc), var(--acc2));
  color: var(--onAcc);
  font-size: 16.5px;
  font-weight: 600;
  text-align: center;
  box-shadow:
    0 12px 26px -14px var(--acc),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.cta:active {
  transform: scale(0.965);
}
.cta:disabled {
  opacity: 0.55;
}

/* ---------- list header ----------------------------------------------------- */

.head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--pane);
  border-bottom: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--spec);
}
.head-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--tx);
  letter-spacing: -0.9px;
}
.admin-badge {
  padding: 5px 10px;
  border-radius: 12px;
  background: var(--acc);
  color: var(--onAcc);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--pane2);
  border: 1px solid var(--hair);
  width: 100%;
}
.search-box input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: var(--tx);
}
.search-box input::placeholder {
  color: var(--tx3);
}
.section-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--tx3);
}

/* ---------- chat rows ------------------------------------------------------- */

.chat-row {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 22px;
}
.avatar {
  position: relative;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    0 6px 16px -9px rgba(0, 0, 0, 0.7);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.online-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--online);
  border: 2.5px solid var(--bg);
}
.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unread {
  flex: none;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--acc);
  color: var(--onAcc);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 12px -5px var(--acc);
}
.del-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9px;
  background: var(--pane2);
  border: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--delMark);
}
.dots {
  flex: none;
  width: 30px;
  height: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 12px;
}
.dots span {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--tx3);
}
.empty {
  padding: 60px 24px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tx3);
}

/* ---------- tab bar --------------------------------------------------------- */

.tabbar {
  position: absolute;
  bottom: calc(var(--sab) + 22px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 26px;
  background: var(--pane);
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1.5px 0 var(--spec),
    0 16px 36px -14px rgba(0, 0, 0, 0.7);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 97px;
  padding: 8px 0 7px;
  border-radius: 21px;
  transition:
    background 0.24s,
    transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.tab:active {
  transform: scale(0.94);
}
.tab-on {
  background: var(--pane2);
}
.tab-label {
  font-size: 10.5px;
  font-weight: 600;
}

/* ---------- chat / bubbles -------------------------------------------------- */

.chat-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--sat) + 12px) 14px 10px;
  background: var(--pane);
  border-bottom: 1px solid var(--hair);
  box-shadow:
    inset 0 1px 0 var(--spec),
    0 8px 26px -18px #000;
}
.back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  color: var(--acc);
  flex: none;
}
.chev-l {
  width: 9px;
  height: 9px;
  border-left: 2.2px solid currentColor;
  border-bottom: 2.2px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
}
.chev-d {
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border-right: 2.2px solid var(--acc);
  border-bottom: 2.2px solid var(--acc);
  border-radius: 1px;
  transform: rotate(45deg);
}
.msgs {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day {
  align-self: center;
  margin: 0 0 4px;
  padding: 5px 13px;
  border-radius: 13px;
  background: var(--pane);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hair);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tx2);
}
.bub-row {
  display: flex;
  padding: 0 14px;
}
.bub {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 82%;
  animation: bubIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bub-body {
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.35;
  border: 1px solid var(--hair);
  background: var(--pane2);
  color: var(--tx);
  box-shadow:
    inset 0 1.2px 0 rgba(255, 255, 255, 0.3),
    0 10px 24px -18px #000;
  border-radius: 20px 20px 20px 7px;
  overflow-wrap: anywhere;
}
.bub-mine .bub-body {
  border-radius: 20px 20px 7px 20px;
  background: linear-gradient(160deg, var(--acc), var(--acc2));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
.bub-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
}
.bub-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--tx3);
}
.ticks {
  font-size: 10.5px;
  letter-spacing: -2px;
}
.read-at {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--acc);
}
.del-at {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--delMark);
}

/* voice */
.voice {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px 10px 11px;
}
.play {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.play i {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6.5px solid transparent;
  border-bottom: 6.5px solid transparent;
}
.wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 26px;
}
.wave i {
  width: 2.5px;
  border-radius: 2px;
  display: block;
}
.dur {
  font-family: var(--mono);
  font-size: 11.5px;
  opacity: 0.75;
}

/* media placeholder hatching, used until the real frame loads */
.hatch {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.14) 0 9px,
    rgba(255, 255, 255, 0.04) 9px 18px
  );
}

.circle-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 16px 32px -20px #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.circle-user {
  width: 180px;
  height: 180px;
  border-radius: 50%;
}
.circle-admin {
  width: 182px;
  height: 242px;
  border-radius: 20px;
}
.play-lg {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.play-lg i {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 13px solid #fff;
  border-top: 8.5px solid transparent;
  border-bottom: 8.5px solid transparent;
}
.media-cap {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  z-index: 2;
}
.admin-note {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--acc);
}
.video-wrap {
  position: relative;
  width: 236px;
  height: 142px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1.2px 0 rgba(255, 255, 255, 0.3),
    0 12px 26px -18px #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-wrap video,
.circle-wrap video,
.circle-wrap img,
.photo-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-xl {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.play-xl i {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.video-cap {
  position: absolute;
  left: 10px;
  bottom: 9px;
  padding: 3px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 10px;
  color: #fff;
  z-index: 2;
}
.photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--hair);
  max-width: 240px;
}
.doc {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 15px 11px 11px;
}
.doc-ext {
  flex: none;
  width: 38px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.doc-name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  max-width: 170px;
}
.doc-size {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.65;
}

/* jump-to-end */
.jump {
  position: absolute;
  right: 14px;
  bottom: calc(var(--sab) + 100px);
  z-index: 44;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pane);
  -webkit-backdrop-filter: blur(26px) saturate(200%);
  backdrop-filter: blur(26px) saturate(200%);
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1.5px 0 var(--spec),
    0 12px 26px -12px rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bubIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.jump:active {
  transform: scale(0.9);
}
.jump-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--acc);
  color: var(--onAcc);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px -4px var(--acc);
}

/* ---------- composer -------------------------------------------------------- */
/* The container itself has NO background — only the pill and the two circles are glass,
   and the messages slide underneath them. */

.composer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(var(--sab) + 26px);
}
.round {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pane2);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--spec);
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.round-plus {
  color: var(--tx2);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  justify-content: center;
  text-align: center;
}
.round-plus:active {
  transform: scale(0.9) rotate(45deg);
}
.round-send {
  background: linear-gradient(160deg, var(--acc), var(--acc2));
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    0 8px 20px -10px var(--acc);
}
.round:active {
  transform: scale(0.9);
}
.send-tri {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 13px solid var(--onAcc);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.mic {
  display: block;
  width: 11px;
  height: 16px;
  border-radius: 6px;
  background: var(--tx2);
  box-shadow: 0 8px 0 -6px var(--tx2);
}
.input-pill {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 20px;
  background: var(--pane2);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--spec);
  min-width: 0;
}
.input-pill textarea {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: var(--tx);
  resize: none;
  max-height: 96px;
  line-height: 1.3;
  font-family: inherit;
}
.input-pill textarea::placeholder {
  color: var(--tx3);
}

/* ---------- recording overlay ---------------------------------------------- */

.rec {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 46;
  padding: 14px 16px calc(var(--sab) + 26px);
  background: var(--pane);
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  backdrop-filter: blur(34px) saturate(200%);
  border-top: 1px solid var(--hair);
  box-shadow: inset 0 1.5px 0 var(--spec);
  animation: sheetIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.rec-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--recDot);
  animation: recPulse 1.1s ease-in-out infinite;
}
.rec-time {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--tx);
}
.rec-wave {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2.5px;
  height: 30px;
}
.rec-wave i {
  width: 2.5px;
  border-radius: 2px;
  background: var(--acc);
  display: block;
}
.rec-btn {
  flex: 1;
  padding: 13px;
  border-radius: 18px;
  font-size: 15.5px;
  font-weight: 600;
  text-align: center;
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.rec-btn:active {
  transform: scale(0.97);
}
.rec-cancel {
  background: var(--pane2);
  border: 1px solid var(--hair);
  color: var(--tx2);
}
.rec-send {
  background: linear-gradient(160deg, var(--acc), var(--acc2));
  color: var(--onAcc);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    0 10px 24px -14px var(--acc);
}
.circle-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--hair);
  background: #000;
}
.circle-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* ---------- bottom sheets --------------------------------------------------- */

.sheet-veil {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 10px calc(var(--sab) + 12px);
}
.sheet {
  border-radius: 30px;
  padding: 8px;
  background: var(--pane);
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  backdrop-filter: blur(34px) saturate(200%);
  border: 1px solid var(--hair);
  box-shadow:
    inset 0 1.5px 0 var(--spec),
    0 -20px 50px -20px rgba(0, 0, 0, 0.8);
  animation: sheetIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.05);
}
.sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pane2);
  width: 100%;
}
.sheet-item:active {
  background: var(--hair);
}
.sheet-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--pane2);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--spec);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.sheet-cancel {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  border-radius: 22px;
  background: var(--pane2);
  border: 1px solid var(--hair);
  font-size: 16px;
  font-weight: 600;
  color: var(--tx);
  text-align: center;
  box-shadow: inset 0 1px 0 var(--spec);
  transition: transform 0.16s;
}
.sheet-cancel:active {
  transform: scale(0.98);
}

/* ---------- cards / profile ------------------------------------------------- */

.card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--pane);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1.5px 0 var(--spec);
}
.card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 14.5px;
}
.hairline {
  height: 1px;
  background: var(--hair);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 10px;
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.swatch:active {
  transform: scale(0.9);
}
.swatch-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 5px;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
    0 6px 14px -9px rgba(0, 0, 0, 0.8);
}
.swatch-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.swatch-name {
  font-size: 10.5px;
  font-weight: 600;
}
.avatar-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 0 6px;
  background: rgba(0, 0, 0, 0.44);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-align: center;
}
.destructive {
  color: var(--danger);
}
.banner {
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--formErr) 16%, transparent);
  border: 1px solid color-mix(in oklab, var(--formErr) 40%, transparent);
  font-size: 13px;
  line-height: 1.35;
  color: var(--formErr);
}
