:root {
  --bg: #faf5ec;
  --ink: #14181e;
  --muted: #5d6670;
  --line: rgba(20, 24, 30, 0.08);
  --red: #ec2830;
  --green: #5fc978;
  --surface: #fff;
  --chat-bg: #faf5ec;
  --cream: #faf5ec;
  --font: "Onest", Tahoma, Arial, sans-serif;
  --tabbar-h: 78px;
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px)
  );
  --safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px)
  );
  --safe: var(--safe-bottom);
  --app-h: 100dvh;
  --app-top: 0px;
  --head-top: max(10px, env(safe-area-inset-top, 0px));
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 0.2s;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); background: #faf5ec; color: var(--ink); color-scheme: light; }
html, body { overscroll-behavior: none; touch-action: pan-y; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow: hidden; }
button, textarea, a { font: inherit; color: inherit; }
textarea, input { color-scheme: light; caret-color: #332f27; }
img { max-width: 100%; display: block; }
.hidden,
[hidden] { display: none !important; }
.ico {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.play-tri {
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}
.ico-pause {
  display: flex;
  align-items: stretch;
  gap: 3px;
  width: 11px;
  height: 12px;
}
.ico-pause i {
  flex: 1;
  display: block;
  background: currentColor;
  border-radius: 1px;
}

.app {
  height: var(--app-h, 100dvh);
  max-height: var(--app-h, 100dvh);
  max-width: 520px;
  margin: 0 auto;
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  background: var(--bg);
  overflow: hidden;
}

.brand-mark {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.gate {
  position: absolute;
  inset: 0;
  color: #fff;
}
.gate__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,12,16,.25), rgba(8,12,16,.82));
}
.gate__card {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 24px calc(28px + var(--safe));
}
.gate h1 { margin: 0; font-size: 48px; letter-spacing: -0.04em; line-height: 0.95; }
.gate__lead { margin: 10px 0 22px; color: rgba(255,255,255,.8); }
.gate__login {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  background: #ea8c61;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.gate__login:disabled { opacity: 0.65; }
.gate__hint { margin: 16px 0 0; font-size: 14px; color: rgba(255,255,255,.7); }
.gate__install { margin: 18px 0 0; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.55); }
.login-widget { min-height: 0; margin-top: 12px; }

.install-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 8px;
  padding: 10px 12px;
  background: #fce6d8;
  border-radius: 16px;
  color: #332f27;
}
.install-banner__kicker {
  margin: 0 0 2px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #de7a4c;
}
.install-banner p { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; }
.install-banner__action {
  border: 0;
  border-radius: 999px;
  background: #ea8c61;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 12px;
  white-space: nowrap;
}
.install-banner__close {
  border: 0;
  background: transparent;
  color: #918c7a;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.shell { height: 100%; display: flex; flex-direction: column; }
.screens { flex: 1; position: relative; overflow: hidden; }

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  display: none;
  flex-direction: column;
  z-index: 0;
}
.screen.is-active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
  animation: rise-in var(--t) var(--ease);
}
.screen[data-screen="profile"],
.screen[data-screen="media"] { overflow-y: auto; }

.home-sticky {
  flex: 0 0 auto;
  background: #0b0f14;
  color: #fff;
  padding: calc(12px + var(--safe-top)) 16px 12px;
}
.next-card h2 { margin: 4px 0 6px; font-size: 26px; letter-spacing: -0.03em; }
.next-card p { margin: 0; color: rgba(255,255,255,.72); font-size: 14px; }
.next-card__kicker, .push-banner__kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}
.push-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(236,40,48,.18);
  border: 1px solid rgba(236,40,48,.35);
}
.push-banner p:last-child { margin: 0; font-weight: 600; line-height: 1.35; }

.home-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.event {
  background: var(--surface);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(15,20,25,.06);
}
.event img { width: 100%; height: 140px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.event__badge { color: var(--red); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.event h3 { margin: 6px 0; font-size: 20px; }
.event p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.event ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }

.screen--chat {
  --cream: #faf5ec;
  --paper: #ffffff;
  --ink: #332f27;
  --muted: #918c7a;
  --forest: #5c8a5a;
  --forest-soft: #e3efdf;
  --forest-text: #3e6440;
  --coral: #ea8c61;
  --coral-deep: #de7a4c;
  --coral-soft: #fce6d8;
  --sand: #f1e5d1;
  --sky: #e4eef2;
  --chat-line: rgba(51, 47, 39, 0.09);
  --f-head: "Quicksand", sans-serif;
  --f-body: "Nunito", sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
}
.screen--chat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./assets/chat-pattern.png") 0 0 / 210px auto repeat;
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}
.screen--chat > * { position: relative; z-index: 1; }
.chat-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  flex: 0 0 auto;
  padding: calc(var(--head-top) + 6px) 68px 36px;
  text-align: center;
  background: linear-gradient(
    to bottom,
    rgba(250, 245, 236, 0.94) 0%,
    rgba(250, 245, 236, 0.78) 42%,
    rgba(250, 245, 236, 0.28) 72%,
    rgba(250, 245, 236, 0) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.chat-head__title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(51, 47, 39, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
}
.chat-presence {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.chat-typing {
  margin: 1px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  min-height: 14px;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--head-top) + 72px) 14px 8px;
}
.bubble-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: flex-end;
  width: fit-content;
  max-width: 86%;
  transform-origin: left bottom;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.bubble-row.is-group-tight { margin-bottom: 3px; }
.bubble-row.hide-avatar .avatar {
  visibility: hidden;
  pointer-events: none;
}
.bubble-row.hide-name .bubble__name { display: none; }
.bubble-row.hide-time .bubble__time { display: none; }
.bubble-row.mine {
  flex-direction: row-reverse;
  margin-left: auto;
  transform-origin: right bottom;
}
.bubble-row.is-pressing,
.bubble-row.is-raised {
  transform: scale(1.06);
  z-index: 3;
  position: relative;
}
.bubble-row.is-raised {
  transform: scale(1.07);
}
.bubble-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  width: fit-content;
  max-width: calc(100% - 34px);
}
.bubble-row.mine .bubble-stack { align-items: flex-end; }
.circle-hit {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
}
.circle-msg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sand);
  border: 3px solid var(--coral-soft);
}
.msg-media,
.video-thumb {
  width: min(180px, 68vw);
  max-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(51, 47, 39, 0.12);
  background: var(--forest-soft);
  display: block;
}
.msg-media {
  height: auto;
  max-height: 240px;
  object-fit: cover;
}
.video-thumb {
  position: relative;
  padding: 0;
  background: #1c1914;
  cursor: pointer;
}
.video-thumb video {
  width: 100%;
  height: 118px;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border-radius: 0;
  max-width: none;
}
.video-thumb__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(51, 47, 39, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.video-thumb__dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(51, 47, 39, 0.55);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.screen--chat .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--forest-text);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  flex: 0 0 26px;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.bubble {
  width: fit-content;
  max-width: 100%;
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  border-bottom-left-radius: 5px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.bubble-row.mine .bubble {
  background: var(--coral);
  color: #fff;
  border-radius: 18px;
  border-bottom-right-radius: 5px;
}
.bubble__text { word-break: break-word; white-space: pre-wrap; }
.bubble a { color: var(--forest-text); font-weight: 800; }
.bubble-row.mine .bubble a { color: #fff; }
.bubble__name {
  font-size: 10px;
  font-weight: 800;
  color: var(--forest-text);
  margin: 0 0 3px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: block;
  text-align: left;
  line-height: 1.2;
}
.bubble-stack > .bubble__name { padding: 0 2px; }
.bubble__time {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 0 2px;
}
.bubble-row.mine .bubble__time { justify-content: flex-end; }
.bubble__meta { font-size: 10px; color: var(--muted); font-weight: 700; }
.ticks {
  display: inline-flex;
  letter-spacing: -0.42em;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1;
}
.ticks.is-read { color: var(--forest-text); }
.voice-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 176px;
  border: 0;
  background: transparent;
  padding: 1px 0;
  text-align: left;
}
.voice-msg__play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  font-size: 12px;
  line-height: 1;
}
.bubble-row.mine .voice-msg__play {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.voice-msg__wave {
  flex: 1;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.voice-msg__bar {
  flex: 1;
  min-width: 2px;
  max-width: 3px;
  height: 28%;
  border-radius: 99px;
  background: var(--coral-soft);
}
.bubble-row.mine .voice-msg__bar { background: rgba(255, 255, 255, 0.38); }
.voice-msg__bar.is-played { background: var(--coral); }
.bubble-row.mine .voice-msg__bar.is-played { background: #fff; }
.voice-msg__dur {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}
.bubble-row.mine .voice-msg__dur { color: rgba(255, 255, 255, 0.92); }
.chat-compose {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 14px 12px;
  background: linear-gradient(
    to top,
    rgba(250, 245, 236, 0.96) 55%,
    rgba(250, 245, 236, 0.72) 100%
  );
  border-top: 0;
  z-index: 3;
}
body.kb-open .chat-compose {
  background: linear-gradient(
    to top,
    rgba(250, 245, 236, 0.88) 40%,
    rgba(250, 245, 236, 0.55) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.chat-compose textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  max-height: 88px;
  padding: 10px 15px;
  background: var(--paper);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  caret-color: #332f27;
  touch-action: manipulation;
}
.chat-compose textarea::placeholder { color: var(--muted); }
.icon-btn,
.tab,
button {
  touch-action: manipulation;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  padding: 0;
}
.icon-btn .ico { width: 17px; height: 17px; }
.icon-btn.hold,
.circle-rec-btn {
  touch-action: none;
}
.screen--chat #btn-send,
.icon-btn.send {
  background: var(--coral);
  color: #fff;
}
.edit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--coral-soft);
}
.edit-bar__kicker {
  margin: 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--coral-deep);
}
#edit-preview {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70vw;
}
#edit-cancel {
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  color: var(--muted);
}
.voice-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--cream, #faf5ec);
}
.voice-preview .voice-msg { flex: 1; width: auto; }
.icon-btn.hold.is-recording { background: var(--coral, #ea8c61); color: #fff; }
.chat-record {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--cream, #faf5ec);
  min-height: 56px;
}
.record-cancel {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--red);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}
.record-wave {
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.record-wave span {
  flex: 1;
  min-width: 2px;
  max-width: 4px;
  height: 18%;
  border-radius: 99px;
  background: var(--red);
  opacity: 0.85;
}
.record-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
}
.record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: rec-blink 1s ease-in-out infinite;
}
@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.record-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 58px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.circle-overlay {
  position: absolute; inset: 0; background: rgba(8,12,16,.96); z-index: 12;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  animation: fade-in 0.18s var(--ease);
  padding: calc(12px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
}
.circle-overlay.is-front video { transform: scaleX(-1); }
.circle-overlay.is-preview video { transform: none; }
.circle-overlay video {
  width: min(72vw, 280px); height: min(72vw, 280px);
  border-radius: 50%; object-fit: cover; background: #111;
  border: 3px solid var(--coral-soft, #fce6d8);
}
.circle-overlay button {
  border: 0; border-radius: 999px; padding: 12px 20px; background: var(--coral, #ea8c61); color: #fff;
  font-weight: 700;
}
.circle-close {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 12px;
  background: transparent !important;
  color: #fff !important;
  padding: 8px 10px !important;
}
.circle-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(72vw, 280px);
  min-height: 76px;
}
.circle-dock__spacer,
.circle-flip {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.circle-flip {
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  display: grid;
  place-items: center;
}
.circle-rec-btn {
  width: 72px !important;
  height: 72px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--coral, #ea8c61) !important;
  border: 4px solid #fff !important;
  box-shadow: 0 0 0 4px rgba(234, 140, 97, 0.28);
  touch-action: none;
}
.circle-rec-btn.is-recording {
  background: #de7a4c !important;
  transform: scale(0.9);
}
.media-player {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: #000;
  display: flex;
  flex-direction: column;
  animation: fade-in 0.16s var(--ease);
}
.media-player__close {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  z-index: 3;
}
.media-player__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.media-player__stage video {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  background: #000;
  object-fit: contain;
}
.media-player.is-circle .media-player__stage video {
  width: min(92vw, 420px);
  height: min(92vw, 420px);
  max-height: none;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.9);
}
.media-player__toggle {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 12, 16, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease);
}
.media-player.is-paused .media-player__toggle,
.media-player.is-controls .media-player__toggle {
  opacity: 1;
  pointer-events: auto;
}
.media-player__toggle .play-tri {
  border-width: 10px 0 10px 16px;
}
.media-player__dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 18px 16px calc(16px + var(--safe-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.media-player__dock input[type="range"] {
  flex: 1;
  height: 28px;
  accent-color: var(--green);
  touch-action: auto;
}
.circle-overlay .ghost { background: transparent !important; color: #fff !important; }
.circle-status { color: #fff; margin: 0; font-weight: 600; text-align: center; }
.circle-overlay #circle-preview-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sheet {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: rgba(51, 47, 39, 0.28);
  animation: fade-in 0.16s var(--ease);
}
.sheet__card {
  position: absolute;
  width: min(220px, calc(100% - 32px));
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(51, 47, 39, 0.18);
  animation: menu-pop 0.22s var(--ease);
}
.sheet__card button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 13px 16px;
  text-align: left;
  font-family: "Nunito", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #332f27;
  border-bottom: 1px solid rgba(51, 47, 39, 0.08);
}
.sheet__card button.danger { color: #de7a4c; }
.sheet__card button:last-child { border-bottom: 0; color: #918c7a; }

.react-bar {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 6px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(51, 47, 39, 0.18);
}
.react-bar button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  padding: 0;
}
.react-bar button.is-on,
.react-bar button:active { transform: scale(1.22); background: #faf5ec; }
.reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding: 0 2px;
  max-width: 240px;
  position: relative;
  z-index: 1;
}
.reacts:empty { display: none; }
.bubble-row.mine .reacts { justify-content: flex-end; }
.react {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 1px 4px 1px 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(51, 47, 39, 0.16);
  line-height: 1;
  color: #332f27;
}
.react__emoji {
  font-size: 14px;
  line-height: 1;
}
.react__face {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #eadfce;
}
.react__face--letter {
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
  color: #6a6256;
}
.react__n {
  min-width: 14px;
  padding: 0 3px 0 0;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #332f27;
  text-align: center;
}
.react.is-mine {
  background: #cfe6ff;
  box-shadow: none;
}

.page-head { padding: calc(14px + var(--safe-top)) 18px 8px; }
.page-head h1 { margin: 0; font-size: 32px; letter-spacing: -0.03em; }
.page-head__text { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.media-grid {
  flex: 1; overflow-y: auto; padding: 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.media-grid img { width: 100%; height: 140px; object-fit: cover; }

.profile-hero {
  padding: calc(20px + var(--safe-top)) 18px 8px; text-align: center;
}
.profile-hero img {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; background: #ddd;
}
.profile-hero h1 { margin: 0; font-size: 26px; }
.profile-hero p { margin: 6px 0 16px; color: var(--muted); }
.prepare-btn {
  border: 0; background: var(--red); color: #fff;
  border-radius: 999px; padding: 12px 22px; font-weight: 700;
}
.panel { padding: 8px 16px 20px; overflow-y: auto; }
.contact {
  display: block; text-decoration: none; padding: 16px; margin-bottom: 10px;
  background: #fff; border-radius: 18px;
}
.contact__label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact__value { font-weight: 700; }

.push-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 10px;
}
.push-card__hint {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.push-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.push-row:first-of-type { border-top: 0; }
.push-row__title { margin: 0; font-weight: 700; font-size: 15px; }
.push-row__sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.push-switch {
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #d8d4cc;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.push-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(51, 47, 39, 0.18);
  transition: transform 0.2s var(--ease);
}
.push-switch[aria-checked="true"] { background: #ea8c61; }
.push-switch[aria-checked="true"]::after { transform: translateX(20px); }
.push-switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tabbar {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  min-height: var(--tabbar-h);
  padding: 10px 8px calc(12px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  background: #fff;
  border-top: 1px solid var(--line);
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
body.kb-open .tabbar,
body.kb-open .install-banner,
.shell:has(#chat-input:focus) .tabbar,
.shell:has(#chat-input:focus) .install-banner {
  display: none !important;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border-radius: 16px;
  min-height: 48px;
  padding: 8px 4px 10px;
}
.tab.is-active { color: var(--red); background: rgba(236,40,48,.08); }

.lightbox {
  position: absolute; inset: 0; background: rgba(0,0,0,.92); z-index: 8;
  display: grid; place-items: center; padding: 16px;
}
.lightbox img { max-height: 90dvh; width: auto; max-width: 100%; }

.prep {
  position: absolute; inset: 0; z-index: 7; background: var(--bg);
  display: flex; flex-direction: column;
}
.prep__close {
  border: 0; background: transparent; padding: calc(16px + var(--safe-top)) 18px 0; text-align: left;
  color: var(--red); font-weight: 700;
}
.prep__body { overflow-y: auto; padding: 8px 20px 32px; }
.prep h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: -0.03em; }
.prep h2 { margin: 22px 0 8px; font-size: 18px; }
.prep p, .prep li { color: var(--muted); line-height: 1.5; }

.presence-name {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.member {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.member__close {
  border: 0;
  background: transparent;
  padding: calc(16px + var(--safe-top)) 18px 0;
  text-align: left;
  color: var(--red);
  font-weight: 700;
}
.member__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 48px;
  text-align: center;
}
.member__photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: #c5d0c6;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 18px;
}
.member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member__body h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.member__you {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.event, .contact { animation: rise-in 0.24s var(--ease); }
.lightbox, .prep, .member { animation: fade-in 0.18s var(--ease); }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-pop {
  from { opacity: 0; transform: scale(0.92) translateY(6px); }
  to { opacity: 1; transform: none; }
}
