:root {
  color-scheme: dark;
  --bg: #050509;
  --text: #f7f7fb;
  --muted: rgba(232, 232, 242, .56);
  --blue: #4c5dff;
  --cyan: #8290ff;
  --violet: #725cff;
  --danger: #ff453a;
  --hairline: rgba(255, 255, 255, .17);
  --glass: rgba(16, 17, 28, .3);
  --glass-strong: rgba(28, 30, 43, .46);
  --radius: 24px;
  --gx: 50%;
  --gy: 0%;
  --stable-vh: 1vh;
}

@property --glow-strength {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  overscroll-behavior: none;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-height: calc(var(--stable-vh) * 100);
  overflow-x: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, sans-serif;
  background:
    radial-gradient(85% 46% at 50% -8%, rgba(55, 68, 255, .1), transparent 72%),
    linear-gradient(180deg, #08080d 0%, #050509 58%, #090910 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  z-index: 0;
  top: calc(var(--stable-vh) * -8);
  left: 50%;
  width: min(118vw, 900px);
  height: calc(var(--stable-vh) * 92);
  opacity: .24;
  transform: translateX(-50%);
  filter: blur(42px) saturate(130%);
  background:
    radial-gradient(ellipse at 50% 28%, rgba(36, 69, 255, .96) 0%, rgba(36, 57, 238, .62) 27%, rgba(15, 18, 79, .18) 56%, transparent 74%);
  animation:
    ambient-enter .55s ease-out .48s both,
    ambient-drift 14s ease-in-out 1.03s infinite alternate;
}

body::after {
  z-index: 0;
  inset: 0;
  opacity: .28;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(117,137,255,.5) 0 1px, transparent 1.2px);
  background-position: 14px 22px, 43px 65px;
  background-size: 83px 91px, 127px 139px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
  animation: stars-enter .7s ease-out .15s both;
}

.human-scene {
  position: fixed;
  z-index: 0;
  top: calc(var(--stable-vh) * -3);
  left: 50%;
  width: min(100vw, 760px);
  height: calc(var(--stable-vh) * 106);
  pointer-events: none;
  transform: translate3d(-50%, 0, 0) scale(1.025);
  transform-origin: 50% 42%;
  opacity: .84;
  filter: saturate(115%) contrast(104%);
  mask-image: linear-gradient(90deg, transparent 0%, black 13%, black 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 13%, black 100%);
}

.scene-stage,
.scene-lights,
.scene-actors {
  position: absolute;
  inset: 0;
}

.scene-stage {
  z-index: 0;
  inset: -8%;
  background: url("/static/assets/stage-unlit-v5.jpg") 50% 50% / auto 106% no-repeat;
  transform: translate3d(0, 5%, 0) scale(1.08);
  opacity: .8;
  filter: brightness(.86) saturate(.72);
  animation:
    stage-enter .38s cubic-bezier(.22,.8,.34,1) both,
    stage-breathe 18s ease-in-out .38s infinite alternate;
  will-change: transform;
}

.scene-lights {
  z-index: 1;
  isolation: isolate;
  mix-blend-mode: screen;
  animation: lights-enter .65s cubic-bezier(.2,.78,.26,1) .48s both;
}

.scene-lights::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 55%;
  bottom: 1.5%;
  width: 84%;
  height: 13%;
  transform: translateX(-50%) rotate(-5deg);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 62% 50%, rgba(176,188,229,.13), rgba(90,111,200,.075) 30%, rgba(41,59,140,.03) 56%, transparent 75%);
  filter: blur(18px);
}

.scene-lights::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 38%;
  left: 50%;
  width: 54%;
  height: 55%;
  transform: translateX(-50%);
  border-radius: 48%;
  background:
    radial-gradient(ellipse, rgba(150,165,220,.085), rgba(90,111,192,.038) 48%, transparent 76%);
  filter: blur(34px);
}

.moon-volume {
  position: absolute;
  z-index: 0;
  top: 8.2%;
  right: -2%;
  width: 106%;
  height: 86%;
  transform-origin: 93% 0;
  background:
    linear-gradient(180deg, rgba(210,219,246,.13) 0%, rgba(140,157,220,.085) 31%, rgba(82,104,193,.046) 62%, transparent 96%);
  clip-path: polygon(88.5% 0, 100% 0, 93% 100%, -8% 100%);
  filter: blur(19px);
  opacity: .68;
  animation: volume-breathe 9s ease-in-out infinite alternate;
}

.moon-volume::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(232,237,252,.19), rgba(148,164,225,.09) 37%, rgba(72,93,176,.025) 78%, transparent 98%);
  clip-path: polygon(91% 0, 99% 0, 82% 100%, 5% 100%);
  filter: blur(9px);
  opacity: .52;
}

.moon-volume::after {
  content: "";
  position: absolute;
  inset: -6% -5% 0 -10%;
  background:
    radial-gradient(ellipse at 84% 14%, rgba(213,222,249,.12), transparent 24%),
    radial-gradient(ellipse at 69% 42%, rgba(133,151,216,.07), transparent 38%),
    radial-gradient(ellipse at 54% 72%, rgba(76,99,187,.035), transparent 47%);
  filter: blur(25px);
  opacity: .78;
}

.moon-light {
  position: absolute;
  z-index: 2;
  top: 2.5%;
  right: -26px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: none;
  box-shadow:
    0 0 19px 5px rgba(195,205,236,.22),
    0 0 74px 30px rgba(69,91,186,.16);
  opacity: .8;
}

.moon-light img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  filter:
    brightness(.76)
    contrast(1.12)
    saturate(.7)
    drop-shadow(-5px 7px 12px rgba(11,17,43,.55));
}

.moon-light::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -18px -25px -25px -34px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 34% 62%, rgba(226,232,250,.23), rgba(122,140,207,.08) 31%, transparent 69%);
  filter: blur(11px);
}

.moon-light::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(222,228,248,.21), rgba(92,111,194,.09) 32%, transparent 72%);
  filter: blur(9px);
}

.scene-actors {
  z-index: 2;
  animation: actors-drift 13s ease-in-out infinite alternate;
  will-change: transform;
}

.scene-people {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 5%;
  width: auto;
  height: 49%;
  transform: translateX(-50%);
  object-fit: contain;
  filter:
    brightness(1.16)
    contrast(1.08)
    saturate(1.12)
    drop-shadow(4px -1px 7px rgba(144, 161, 226, .18))
    drop-shadow(0 0 16px rgba(60, 83, 255, .14))
    drop-shadow(0 2px 3px rgba(0, 0, 0, .78));
  animation: people-enter .62s cubic-bezier(.18,.78,.25,1) .08s both;
}

.shadow-system {
  position: absolute;
  z-index: 1;
  inset: 0;
  animation: shadow-enter .55s ease-out .6s both;
}

.ground-shadow {
  position: absolute;
  z-index: 0;
  inset: 0;
  mix-blend-mode: multiply;
}

.ground-shadow::before,
.ground-shadow::after {
  content: "";
  position: absolute;
  top: 94.25%;
  height: 1.7%;
  transform-origin: 100% 50%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.12) 34%, rgba(0,0,0,.5) 79%, rgba(0,0,0,.88) 100%);
  filter: blur(3px);
}

.ground-shadow::before {
  right: 62.5%;
  width: 34%;
  transform: translateY(-50%) rotate(-10deg);
}

.ground-shadow::after {
  right: 36.5%;
  width: 44%;
  transform: translateY(-50%) rotate(-9deg);
}

.contact-shadow {
  position: absolute;
  z-index: 1;
  top: 93.82%;
  left: 50%;
  width: 31%;
  height: 3.1%;
  transform: translateX(-50%);
}

.contact-shadow::before,
.contact-shadow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 54%;
  height: 70%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(0,0,0,.98) 0 19%, rgba(0,0,0,.78) 39%, rgba(0,0,0,.32) 62%, transparent 78%);
  box-shadow: 0 -2px 4px rgba(0,0,0,.72);
  filter: blur(1.7px);
}

.contact-shadow::before {
  left: -2%;
  transform: rotate(4deg);
}

.contact-shadow::after {
  right: -2%;
  transform: rotate(-4deg);
}

@keyframes ambient-drift {
  from { transform: translate3d(-50%, -1.5%, 0) scale(1); }
  to { transform: translate3d(-50%, 2%, 0) scale(1.06); }
}

@keyframes ambient-enter {
  from { opacity: 0; }
  to { opacity: .24; }
}

@keyframes stars-enter {
  from { opacity: 0; }
  to { opacity: .28; }
}

@keyframes stage-enter {
  from {
    opacity: 0;
    filter: brightness(.25) saturate(.55) blur(8px);
  }
  to {
    opacity: .8;
    filter: brightness(.86) saturate(.72) blur(0);
  }
}

@keyframes lights-enter {
  from {
    opacity: 0;
    filter: brightness(.35) blur(10px);
  }
  to {
    opacity: 1;
    filter: brightness(1) blur(0);
  }
}

@keyframes volume-breathe {
  from { opacity: .57; }
  to { opacity: .7; }
}

@keyframes stage-breathe {
  from { transform: translate3d(0, 4.7%, 0) scale(1.08); }
  to { transform: translate3d(0, 5.3%, 0) scale(1.105); }
}

@keyframes people-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(.975);
    filter: brightness(.28) saturate(.5) blur(5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    filter:
      brightness(1.16)
      contrast(1.08)
      saturate(1.12)
      drop-shadow(4px -1px 7px rgba(144, 161, 226, .18))
      drop-shadow(0 0 16px rgba(60, 83, 255, .14))
      drop-shadow(0 8px 10px rgba(0, 0, 0, .58));
  }
}

@keyframes shadow-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes actors-drift {
  from { transform: translate3d(-.45%, -.25%, 0); }
  to { transform: translate3d(.55%, .35%, 0); }
}

@keyframes interface-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.99);
    filter: brightness(.35) blur(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) blur(0);
  }
}

button, input, textarea, select { font: inherit; }
button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition:
    transform .18s ease,
    filter .24s ease,
    border-color .24s ease,
    box-shadow .24s ease,
    --glow-strength .34s ease-out;
}
button:disabled { opacity: .48; cursor: wait; }

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 15px calc(36px + env(safe-area-inset-bottom));
}

.topbar,
.section-heading,
.hero-heading,
.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  position: relative;
  z-index: 30;
  min-height: 45px;
  padding: 0 3px;
  overflow: visible;
  isolation: isolate;
  animation: interface-enter .45s cubic-bezier(.2,.8,.25,1) .98s both;
}

.eyebrow {
  margin: 0 0 2px;
  color: rgba(235, 235, 245, .48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .2em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  position: relative;
  margin-bottom: 0;
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -.055em;
  text-shadow:
    0 0 18px rgba(93, 110, 255, .22),
    0 1px 5px rgba(0, 0, 0, .32);
}
h1 span { color: #6572ff; }

.topbar > div {
  position: relative;
  isolation: isolate;
}

.topbar > div::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -22px;
  left: -34px;
  width: 145px;
  height: 105px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,108,255,.22), rgba(43,58,221,.07) 46%, transparent 72%);
  filter: blur(13px);
}

.icon-button,
.language-button,
.language-menu,
.hero,
.search-wrap,
.mailbox-card,
.sheet,
.message,
.empty,
.field input,
.field textarea,
.quick-create input,
button.secondary,
button.ghost {
  border: 1px solid var(--hairline);
  background:
    radial-gradient(180px circle at var(--gx) var(--gy), rgba(143,152,255,calc(.24 * var(--glow-strength))), transparent 44%),
    linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.018) 46%, rgba(255,255,255,.04)),
    var(--glass);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.23),
    inset 0 -1px 0 rgba(255,255,255,.045),
    0 18px 46px rgba(0,0,0,.34);
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  transition: --glow-strength .34s ease-out;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  color: var(--text);
  font-size: 22px;
  text-shadow: 0 1px 3px rgba(0,0,0,.22);
}

.language-picker {
  position: relative;
  z-index: 8;
}

.language-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 74px;
  height: 42px;
  padding: 0 9px;
  border-radius: 14px;
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: .03em;
}

.language-chevron {
  margin-left: 4px;
  color: rgba(244,246,255,.58);
  font-size: 10px;
  transition: transform .18s ease;
}

.language-button[aria-expanded="true"] .language-chevron {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 74px;
  padding: 5px;
  gap: 2px;
  border-color: rgba(255,255,255,.25);
  border-radius: 16px;
  background:
    radial-gradient(120px circle at var(--gx) var(--gy), rgba(132,143,255,calc(.2 * var(--glow-strength))), transparent 52%),
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.035) 48%),
    rgba(15,16,26,.88);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.31),
    inset 0 -1px 0 rgba(255,255,255,.055),
    0 14px 42px rgba(0,0,0,.55),
    0 0 0 .5px rgba(127,139,255,.18);
  backdrop-filter: blur(34px) saturate(185%) contrast(108%);
  -webkit-backdrop-filter: blur(34px) saturate(185%) contrast(108%);
  animation: language-menu-enter .18s cubic-bezier(.2,.8,.25,1) both;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  height: 32px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 760;
  text-align: left;
}

.language-option[aria-checked="true"] {
  background: rgba(107,119,255,.24);
  box-shadow: inset 0 1px rgba(255,255,255,.18);
}

@keyframes language-menu-enter {
  from { opacity: 0; transform: translateY(-5px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hero {
  position: relative;
  z-index: 1;
  isolation: isolate;
  margin: 16px 0 20px;
  padding: 14px;
  overflow: hidden;
  border-radius: 23px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    inset 0 -1px 0 rgba(255,255,255,.045),
    0 22px 60px rgba(0,0,0,.38),
    0 0 62px rgba(39,57,255,.14);
  animation: interface-enter .55s cubic-bezier(.2,.8,.25,1) 1.1s both;
}

.hero::before,
.mailbox-card::before,
.sheet::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(112deg, rgba(255,255,255,.105), transparent 24%, transparent 72%, rgba(104,111,255,.12)),
    radial-gradient(260px 65px at 24% -5%, rgba(255,255,255,.11), transparent 72%);
  opacity: .85;
}

.hero-heading { gap: 15px; margin-bottom: 12px; }
.hero #hello {
  margin: 0 0 3px;
  color: rgba(221, 222, 242, .66);
  font-size: 11px;
  font-weight: 700;
}
.hero h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -.045em;
}

.limit-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 99px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px rgba(255,255,255,.1);
  color: rgba(245,248,255,.65);
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.quick-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.quick-create input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border-radius: 15px;
  outline: none;
  color: var(--text);
}
.quick-create input::placeholder { color: rgba(235,239,255,.42); }
.quick-create input:focus {
  border-color: rgba(120, 130, 255, .72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 0 0 3px rgba(81,91,255,.18),
    0 14px 36px rgba(0,0,0,.2);
}

button.primary,
button.secondary,
button.ghost {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 15px;
  font-weight: 720;
}

button.primary {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(151, 158, 255, .5);
  color: white;
  background:
    radial-gradient(120px circle at var(--gx) var(--gy), rgba(255,255,255,calc(.4 * var(--glow-strength))), transparent 48%),
    linear-gradient(145deg, #6876ff, #4554f2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -1px 0 rgba(21,28,153,.42),
    0 10px 30px rgba(52,65,255,.3);
  text-shadow: 0 1px 2px rgba(18,24,112,.3);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}

button.secondary,
button.ghost {
  color: rgba(248,250,255,.92);
}

.random-button {
  width: 100%;
  min-height: 41px !important;
  margin-top: 7px;
  font-size: 12px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.muted,
.empty p,
.message-preview { color: var(--muted); }

.section {
  animation: interface-enter .58s cubic-bezier(.2,.8,.25,1) 1.22s both;
}

.section-heading {
  margin: 0 3px 10px;
}
.section-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.025em;
}
.count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(28,29,40,.46);
  color: rgba(245,248,255,.68);
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  margin-bottom: 7px;
  padding: 0 13px;
  border-radius: 16px;
  color: var(--muted);
}
.search-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.mailbox-list {
  display: grid;
  gap: 6px;
  max-height: 57vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.mailbox-list::-webkit-scrollbar { display: none; }

.mailbox-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 8px 8px 10px;
  overflow: hidden;
  border-radius: 17px;
  color: var(--text);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, --glow-strength .34s ease-out;
}
.mailbox-card:active {
  transform: scale(.985);
  border-color: rgba(255,255,255,.34);
}

.copy-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background:
    radial-gradient(54px circle at var(--gx) var(--gy), rgba(255,255,255,calc(.46 * var(--glow-strength))), transparent 48%),
    radial-gradient(circle at 30% 15%, rgba(255,255,255,.26), transparent 38%),
    linear-gradient(145deg, rgba(112,124,255,.72), rgba(70,82,240,.42));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    0 5px 18px rgba(54,66,255,.24);
  color: white;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.copy-button::before,
.copy-button::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 12px;
  border: 1.5px solid rgba(255,255,255,.92);
  border-radius: 3px;
}
.copy-button::before {
  transform: translate(-2px, -2px);
}
.copy-button::after {
  transform: translate(2px, 2px);
  background: rgba(77,91,244,.7);
  box-shadow: -2px -2px 5px rgba(19,25,103,.24);
}
.copy-button:active {
  transform: scale(.9);
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,.5), transparent 35%),
    linear-gradient(145deg, rgba(130,141,255,.76), rgba(73,86,246,.46));
}

.mailbox-copy { min-width: 0; }
.mailbox-email {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12.5px;
  font-weight: 650;
}
.mailbox-hint {
  margin: 3px 0 0;
  color: rgba(235,239,255,.43);
  font-size: 10px;
}

.delete-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  background:
    radial-gradient(54px circle at var(--gx) var(--gy), rgba(255,255,255,calc(.34 * var(--glow-strength))), transparent 48%),
    rgba(255,255,255,.07);
  color: rgba(242,245,255,.58);
  font-size: 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.delete-button:active {
  border-color: rgba(255,69,58,.26);
  background: rgba(255,69,58,.19);
  color: #ff8d86;
}

.empty {
  padding: 31px 20px;
  text-align: center;
  border-radius: 22px;
}
.empty-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(105,117,255,.3), rgba(255,255,255,.06));
  box-shadow: inset 0 1px rgba(255,255,255,.25);
  color: var(--cyan);
  font-size: 20px;
  font-weight: 800;
}
.empty h3 { margin-bottom: 7px; }
.empty p { margin-bottom: 0; line-height: 1.45; }

.backdrop {
  position: fixed;
  z-index: 10;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(1,1,6,.68);
  transition:
    opacity .3s ease,
    visibility 0s linear .3s;
}

.backdrop.is-open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.sheet {
  --drag-y: 14px;
  position: fixed;
  z-index: 11;
  isolation: isolate;
  top: 50%;
  left: 50%;
  bottom: auto;
  width: min(calc(100% - 28px), 620px);
  max-height: min(82vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) translateY(var(--drag-y)) scale(.955);
  padding: 12px 18px 20px;
  border-radius: 28px;
  background:
    radial-gradient(300px circle at var(--gx) var(--gy), rgba(103,115,255,calc(.2 * var(--glow-strength))), transparent 48%),
    linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.035)),
    rgba(18,19,29,.88);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(255,255,255,.055),
    0 28px 90px rgba(0,0,0,.58),
    0 0 0 .5px rgba(128,139,255,.16);
  backdrop-filter: blur(36px) saturate(180%) contrast(106%);
  -webkit-backdrop-filter: blur(36px) saturate(180%) contrast(106%);
  touch-action: pan-y;
  pointer-events: none;
  transition:
    opacity .3s ease,
    transform .38s cubic-bezier(.2,.82,.24,1),
    visibility 0s linear .38s;
  will-change: transform, opacity;
}

.sheet.is-open {
  --drag-y: 0px;
  visibility: visible;
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) translateY(var(--drag-y)) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}

.sheet.is-dragging {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .human-scene,
  .scene-stage,
  .scene-lights,
  .moon-volume,
  .moon-light,
  .scene-actors,
  .scene-people,
  .shadow-system,
  .topbar,
  .hero,
  .section {
    animation: none;
  }
}

.grabber {
  width: 38px;
  height: 5px;
  margin: 0 auto 15px;
  border-radius: 99px;
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 1px rgba(255,255,255,.2);
  cursor: grab;
  touch-action: none;
}

.modal-close {
  position: sticky;
  z-index: 3;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -2px -4px -38px 10px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.045)),
    rgba(24,25,36,.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 8px 24px rgba(0,0,0,.28);
  color: rgba(248,249,255,.9);
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal-open {
  overflow: hidden;
}

#sheetContent {
  min-width: 0;
  max-width: 100%;
  padding-top: 2px;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.sheet h2 {
  max-width: 100%;
  margin-bottom: 11px;
  padding-right: 42px;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: clamp(18px, 6vw, 24px);
  line-height: 1.14;
  letter-spacing: -.04em;
}

.field {
  display: grid;
  gap: 7px;
  margin: 15px 0;
}
.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.field input,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  color: var(--text);
  outline: none;
}

.quick-create input,
.search-wrap input,
.field input,
.field textarea {
  font-size: 16px;
}
.field textarea { min-height: 138px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  border-color: rgba(132,141,255,.62);
  box-shadow: 0 0 0 3px rgba(82,94,255,.17);
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 17px;
}

.loading {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}
.message-list {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.message {
  display: block;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  padding: 9px 11px;
  overflow: hidden;
  border-radius: 14px;
  color: var(--text);
  text-align: left;
}
.message-meta {
  min-width: 0;
  gap: 7px;
  margin-bottom: 3px;
}
.message-from,
.message-subject {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-from {
  flex: 1 1 auto;
  color: var(--cyan);
  font-size: 10px;
}
.message-subject {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.message-date { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.letter-body {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: text;
  -webkit-touch-callout: default;
  -webkit-user-select: text !important;
  user-select: text !important;
  white-space: pre-wrap;
  touch-action: auto;
  pointer-events: auto;
  line-height: 1.55;
  color: rgba(246,248,255,.84);
}
.letter-address {
  display: block;
  max-width: calc(100% - 44px);
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: text;
  -webkit-touch-callout: default;
  -webkit-user-select: text !important;
  user-select: text !important;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: var(--cyan);
  font-size: 11px;
}

.sheet #sheetContent > h2,
.sheet > #sheetContent > .muted {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: text;
  -webkit-touch-callout: default;
  -webkit-user-select: text !important;
  user-select: text !important;
}

.sheet.is-selectable,
.sheet.is-selectable #sheetContent {
  -webkit-touch-callout: default;
  -webkit-user-select: text !important;
  user-select: text !important;
}

.sheet.is-selectable button,
.sheet.is-selectable .grabber {
  -webkit-user-select: none !important;
  user-select: none !important;
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 34px);
  padding: 12px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(143,151,255,.42);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(111,123,255,.96), rgba(71,84,239,.92)),
    rgba(73,84,238,.92);
  box-shadow:
    inset 0 1px rgba(255,255,255,.8),
    0 16px 50px rgba(0,0,0,.35);
  color: #fff;
  font-size: 12px;
  font-weight: 720;
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover:not(:active) {
    transform: translateY(-1px);
    filter: brightness(1.09) saturate(1.08);
    border-color: rgba(145, 154, 255, .48);
  }

  .copy-button:hover:not(:active) {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.58),
      0 7px 22px rgba(74,87,255,.38);
  }

  .delete-button:hover:not(:active) {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.24),
      0 7px 20px rgba(100,120,180,.18);
    color: rgba(255,255,255,.84);
  }
}

@media (max-width: 420px) {
  .shell { padding-inline: 12px; }
  .hero { padding: 13px; margin-top: 13px; }
  .quick-create .primary { padding-inline: 13px; }
  .actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .mailbox-card { transition: none; }
}
