@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #04040a;
  --ink: #f7f5ff;
  --ink-2: #cfc9e6;
  --ink-3: #a49dbd;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  --glass-a: rgba(255, 255, 255, 0.078);
  --glass-b: rgba(255, 255, 255, 0.026);
  --accent: #f6b45f;
  --accent-deep: #e9973c;
  --accent-ink: #1c1206;
  --violet: #a78bfa;
  --cyan: #63d8f0;
  --mint: #5fe3b0;
  --amber: #f6c46b;
  --muted: #8b85a3;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: Vazirmatn, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

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

/* ---------- atmosphere ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #120e2e 0%, #07060f 45%, #04040a 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(58px);
  opacity: 0.5;
  transform: translate3d(0, 0, 0);
}

.blob-a {
  width: 460px;
  height: 460px;
  top: -210px;
  inset-inline-start: -150px;
  background: radial-gradient(circle at 35% 35%, rgba(124, 92, 255, 0.85), transparent 66%);
  animation: drift-a 34s ease-in-out infinite alternate;
}

.blob-b {
  width: 520px;
  height: 520px;
  bottom: -260px;
  inset-inline-end: -190px;
  background: radial-gradient(circle at 60% 40%, rgba(46, 74, 200, 0.75), transparent 68%);
  animation: drift-b 42s ease-in-out infinite alternate;
}

.blob-c {
  width: 320px;
  height: 320px;
  top: 34%;
  inset-inline-start: 42%;
  background: radial-gradient(circle at 50% 50%, rgba(214, 132, 60, 0.4), transparent 70%);
  opacity: 0.35;
  animation: drift-c 50s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift-a {
  to {
    transform: translate3d(40px, 60px, 0) scale(1.12);
  }
}
@keyframes drift-b {
  to {
    transform: translate3d(-50px, -40px, 0) scale(1.16);
  }
}
@keyframes drift-c {
  to {
    transform: translate3d(-30px, 30px, 0) scale(0.9);
  }
}

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

.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--glass-a), var(--glass-b));
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 26px 48px -26px rgba(0, 0, 0, 0.95);
}

.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(130% 90% at 12% -20%, rgba(255, 255, 255, 0.17), transparent 46%);
  opacity: 0.85;
  z-index: -1;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .sheet-inner,
  .dock {
    background: rgba(20, 18, 32, 0.94);
  }
}

/* ---------- shell ---------- */

.shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 12px) 14px calc(132px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: calc(var(--safe-t) + 8px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--pill);
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 2px 6px 2px 12px;
  border-radius: var(--pill);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  text-align: start;
  flex: 1;
  min-width: 0;
}

.who:active {
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.05);
}

.who-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.who-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who-sub {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who-sub[data-tone] {
  color: var(--tone, var(--ink-3));
}

.presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--pill);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(95, 227, 176, 0.55);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  60% {
    box-shadow: 0 0 0 7px rgba(95, 227, 176, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(95, 227, 176, 0);
  }
}

/* ---------- status tones ---------- */

[data-tone='game'] {
  --tone: #a78bfa;
}
[data-tone='out'] {
  --tone: #63d8f0;
}
[data-tone='free'] {
  --tone: #5fe3b0;
}
[data-tone='road'] {
  --tone: #f6c46b;
}
[data-tone='busy'] {
  --tone: #8d87a4;
}
[data-tone='sleep'] {
  --tone: #6d6884;
}

/* ---------- avatars ---------- */

.av {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  color: #0b0a12;
  background: linear-gradient(150deg, #d8d2ee, #8f86ad);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.av[data-seed='0'] {
  background: linear-gradient(150deg, #ffd7a8, #d98f42);
}
.av[data-seed='1'] {
  background: linear-gradient(150deg, #c9b8ff, #7c5cff);
}
.av[data-seed='2'] {
  background: linear-gradient(150deg, #a8ecff, #4aa8d8);
}
.av[data-seed='3'] {
  background: linear-gradient(150deg, #b8ffdf, #3fa982);
}
.av[data-seed='4'] {
  background: linear-gradient(150deg, #ffc2d4, #c9668c);
}
.av[data-seed='5'] {
  background: linear-gradient(150deg, #e6e2f5, #9c94b8);
}

.av-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(
    from 140deg,
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0.06) 35%,
    rgba(255, 255, 255, 0.3) 70%,
    rgba(255, 255, 255, 0.06)
  );
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.av-wrap[data-tone] {
  background: conic-gradient(
    from 140deg,
    var(--tone),
    color-mix(in srgb, var(--tone) 20%, transparent) 40%,
    var(--tone) 75%,
    color-mix(in srgb, var(--tone) 25%, transparent)
  );
  box-shadow: 0 0 16px -2px color-mix(in srgb, var(--tone) 45%, transparent);
}

.av-wrap[data-tone] .av {
  background-color: #0b0a12;
}

/* quieter surface for repeated feed cards: keeps the layered look without
   paying for a backdrop blur on every row */
.glass-quiet {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 34px -28px rgba(0, 0, 0, 0.9);
}

/* ---------- sections ---------- */

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 10px;
}

.sec-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sec-title::before {
  content: '';
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(246, 180, 95, 0.15));
}

.sec-note {
  font-size: 11.5px;
  color: var(--ink-3);
}

.mini {
  min-height: 44px;
  padding: 0 10px;
  margin: -12px -6px -12px 0;
  border-radius: var(--pill);
  font-size: 12.5px;
  color: var(--accent);
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.mini:hover {
  background: rgba(246, 180, 95, 0.1);
  color: #ffd9a8;
}

.mini:active {
  transform: scale(0.95);
}

/* ---------- people ring ---------- */

.ring {
  list-style: none;
  margin: 0;
  padding: 0 2px 2px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.ring::-webkit-scrollbar {
  display: none;
}

.person {
  scroll-snap-align: start;
  flex: none;
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  animation: rise 0.5s var(--ease) both;
}

.person .av {
  width: 50px;
  height: 50px;
}

.person .av-wrap {
  padding: 2.5px;
}

.person-name {
  max-width: 100%;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-status {
  font-size: 11.5px;
  color: var(--tone, var(--ink-3));
  white-space: nowrap;
  margin-top: -5px;
}

.person.is-off .av {
  filter: saturate(0.45) brightness(0.8);
}

.person.is-off .person-name {
  color: var(--muted);
}

/* ---------- plan card ---------- */

.plan-card {
  border-radius: var(--r-xl);
  padding: 18px 18px 16px;
}

.plan-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.plan-topic {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-when {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-when b {
  color: var(--ink-2);
  font-weight: 500;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--pill);
  font-size: 12px;
  color: #ffd9a8;
  background: rgba(246, 180, 95, 0.12);
  border: 1px solid rgba(246, 180, 95, 0.28);
}

.plan-answers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.ans {
  position: relative;
  min-height: 48px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-2);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.ans:active {
  transform: scale(0.96);
}

.ans[aria-pressed='true'] {
  color: var(--accent-ink);
  font-weight: 700;
  border-color: transparent;
  background: linear-gradient(180deg, #ffd39b, var(--accent));
  box-shadow: 0 10px 24px -14px rgba(246, 180, 95, 0.9);
}

.ans[aria-pressed='true'] .react-count {
  color: rgba(28, 18, 6, 0.72);
  border-color: rgba(28, 18, 6, 0.2);
  background: rgba(28, 18, 6, 0.1);
}

.ans[aria-pressed='false']:hover {
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
}

.plan-crowd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--pill);
  font-size: 12px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
}

.chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
  flex: none;
}

.plan-empty {
  border-radius: var(--r-xl);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.plan-empty p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------- feed ---------- */

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  border-radius: var(--r-lg);
  padding: 13px 14px 11px;
  animation: rise 0.5s var(--ease) both;
}

.item-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.item-head .av {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.item-who {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-time {
  font-size: 11.5px;
  color: var(--muted);
  flex: none;
}

.item-del {
  margin: -7px -6px -7px auto;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--pill);
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.item-del:hover {
  color: #ffb4b4;
  background: rgba(255, 120, 120, 0.1);
}

.item-body {
  margin: 9px 2px 10px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.react {
  min-height: 44px;
  min-width: 44px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  transition: transform 0.16s var(--ease);
}

.react .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--pill);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.react:hover .pill {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-2);
}

.react:active {
  transform: scale(0.94);
}

.react[aria-pressed='true'] .pill {
  color: #ffd9a8;
  background: rgba(246, 180, 95, 0.14);
  border-color: rgba(246, 180, 95, 0.38);
}

.react-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--pill);
  font-size: 11px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-soft);
}

/* ---------- empty + skeleton ---------- */

.empty {
  border-radius: var(--r-lg);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  padding: 22px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.empty b {
  color: var(--ink-2);
  font-weight: 500;
}

.empty .linkish {
  margin-top: 10px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pill);
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  height: 84px;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.07) 45%,
    transparent 70%
  );
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* ---------- dock ---------- */

.dock {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(var(--safe-b) + 10px);
  z-index: 40;
  max-width: 536px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 24px;
}

.dock-btn {
  flex: 1;
  min-height: 52px;
  border-radius: 18px;
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  transition: transform 0.18s var(--ease), background 0.2s var(--ease);
}

.dock-btn:active {
  transform: scale(0.97);
}

.dock-primary {
  flex: 1.15;
  font-weight: 700;
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(180deg, #ffd6a2, var(--accent) 62%, var(--accent-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 26px -16px rgba(246, 180, 95, 0.95);
}

.dock-btn[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.09);
}

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

dialog.sheet {
  width: 100%;
  max-width: 560px;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  max-height: 90dvh;
}

dialog.sheet::backdrop {
  background: rgba(3, 3, 8, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

dialog.sheet[open] {
  animation: sheet-in 0.36s var(--ease) both;
}

dialog.sheet[open]::backdrop {
  animation: fade-in 0.28s var(--ease) both;
}

@keyframes sheet-in {
  from {
    transform: translateY(28px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet-inner {
  margin: 0 8px calc(var(--safe-b) + 8px);
  padding: 10px 18px calc(16px + var(--safe-b));
  border-radius: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(32, 29, 52, 0.92), rgba(12, 11, 22, 0.96));
  backdrop-filter: blur(34px) saturate(160%);
  -webkit-backdrop-filter: blur(34px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 -20px 60px -20px rgba(0, 0, 0, 0.9);
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.grab {
  width: 38px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.22);
}

.sheet-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.field {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 15px;
  resize: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.field::placeholder {
  color: #8b85a3;
}

.field:focus {
  outline: none;
  border-color: rgba(246, 180, 95, 0.55);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0 0 3px rgba(246, 180, 95, 0.14);
}

textarea.field {
  min-height: 96px;
  line-height: 1.7;
}

.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.counter {
  font-size: 11.5px;
  color: var(--muted);
}

.sheet-send {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-ink);
  background: linear-gradient(180deg, #ffd6a2, var(--accent) 62%, var(--accent-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 12px 24px -16px rgba(246, 180, 95, 0.95);
  transition: transform 0.18s var(--ease), filter 0.2s var(--ease);
}

.sheet-send:active {
  transform: scale(0.97);
}

.sheet-send:disabled {
  filter: grayscale(0.4) brightness(0.7);
}

.sheet-send-wide {
  width: 100%;
  margin-top: 14px;
}

.sheet-cancel {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--ink-3);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.sheet-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.status-opt {
  min-height: 52px;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-2);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.16s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.status-opt::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone, rgba(255, 255, 255, 0.35));
  box-shadow: 0 0 10px -1px var(--tone, transparent);
  flex: none;
}

.status-opt:active {
  transform: scale(0.97);
}

.status-opt[aria-pressed='true'] {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.status-opt[aria-pressed='true']::after {
  content: '✓';
  margin-inline-start: auto;
  font-size: 12px;
  color: var(--accent);
}

.name-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.name-edit .field {
  margin-top: 0;
  min-height: 46px;
  flex: 1;
}

.ghost {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  transition: background 0.2s var(--ease), transform 0.16s var(--ease);
}

.ghost:active {
  transform: scale(0.96);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  inset-inline: 0;
  bottom: calc(96px + var(--safe-b));
  z-index: 60;
  margin: 0 auto;
  width: max-content;
  max-width: 84%;
  padding: 10px 16px;
  border-radius: var(--pill);
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(24, 21, 38, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: none;
}

/* ---------- motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.22);
    --line-soft: rgba(255, 255, 255, 0.16);
    --ink-3: #c6c0dd;
    --muted: #b3adc9;
  }
}

@media (max-width: 360px) {
  .shell {
    padding-inline: 11px;
  }
  .plan-topic {
    font-size: 19px;
  }
  .person {
    width: 58px;
  }
  .presence {
    display: none;
  }
  .dock-btn {
    font-size: 13.5px;
  }
}
