:root {
  color-scheme: light;
  --bg: #fbf8f4;
  --panel: #ffffff;
  --sidebar: #fcfaf7;
  --text: #332d28;
  --muted: #a19689;
  --line: #eee4d8;
  --line-strong: #e5d5c6;
  --accent: #dfb08e;
  --accent-strong: #d27b46;
  --accent-soft: #f7ebe1;
  --accent-tint: #f4e3d6;
  --card-soft: #faf5ef;
  --success: #27ae60;
  --idle: #cf7e70;
  --shadow: 0 18px 40px rgba(92, 69, 46, 0.07);
  --radius: 20px;
}

/* Profile route reference layout */
body.profile-route-desktop {
  overflow: hidden;
}

body.profile-route-desktop .chat,
body.profile-route-desktop .utility-panel {
  visibility: hidden;
  pointer-events: none;
}

body.profile-route-desktop .setup {
  position: relative;
  z-index: 2;
  border-right: 1px solid #eee3d9;
  box-shadow: none;
}

body.profile-route-desktop .profile-route {
  position: fixed;
  inset: 0 0 0 376px;
  z-index: 15;
  overflow: auto;
  padding: 0;
  background: #fffaf5;
}

body.profile-route-desktop .profile-route .profile-route-shell,
body.profile-route-desktop .profile-route .profile-page-shell {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: 0 0 80px;
  gap: 0;
  background: #fffaf5;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-hero {
  position: relative;
  min-height: 535px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #eaded2;
  box-shadow: none;
  background:
    radial-gradient(circle, rgba(255, 235, 214, 0.35) 1.7px, transparent 1.7px),
    linear-gradient(180deg, #eb996d 0%, #dda143 218px, #fffaf5 218px, #fffaf5 100%);
  background-size: 52px 52px, 100% 100%;
}

body.profile-route-desktop .profile-route .profile-hero-pattern {
  display: none;
}

body.profile-route-desktop .profile-route .profile-hero-top {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px 30px 0;
}

body.profile-route-desktop .profile-route .profile-hero-back {
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 24px;
  background: rgba(145, 91, 54, 0.45);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-hero-back svg {
  width: 22px;
  height: 22px;
}

body.profile-route-desktop .profile-route .profile-hero-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 30px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 330px 42px 0;
}

body.profile-route-desktop .profile-route .profile-hero-avatar-wrap {
  position: absolute;
  top: 180px;
  left: 36px;
  z-index: 3;
  margin: 0;
}

body.profile-route-desktop .profile-route .profile-hero-avatar {
  width: 134px;
  height: 134px;
  border: 6px solid #fff;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(81, 55, 34, 0.16);
}

body.profile-route-desktop .profile-route .profile-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0;
}

body.profile-route-desktop .profile-route .profile-hero-name {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
  color: #2d251f;
}

body.profile-route-desktop .profile-route .profile-hero-user-id {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #b2a69b;
}

body.profile-route-desktop .profile-route .profile-hero-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
}

body.profile-route-desktop .profile-route .profile-photo-action,
body.profile-route-desktop .profile-route .profile-edit-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8f8379;
  font-size: 17px;
  font-weight: 700;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-photo-action svg {
  width: 22px;
  height: 22px;
}

body.profile-route-desktop .profile-route .profile-edit-button {
  display: none;
}

body.profile-route-desktop .profile-route .profile-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-hero-stat {
  min-width: 86px;
  display: grid;
  justify-items: center;
  gap: 4px;
}

body.profile-route-desktop .profile-route .profile-hero-stat-value {
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
  color: #2d251f;
}

body.profile-route-desktop .profile-route .profile-hero-stat-label,
body.profile-route-desktop .profile-route .profile-hero-membership,
body.profile-route-desktop .profile-route .profile-hero-presence {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  color: #8d8075;
}

body.profile-route-desktop .profile-route .profile-hero-meta-divider {
  display: block;
  width: 1px;
  height: 56px;
  background: #eaded2;
}

body.profile-route-desktop .profile-route .profile-hero-membership,
body.profile-route-desktop .profile-route .profile-hero-presence {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

body.profile-route-desktop .profile-route .profile-hero-membership svg {
  width: 22px;
  height: 22px;
}

body.profile-route-desktop .profile-route .profile-hero-presence {
  margin-left: 8px;
}

body.profile-route-desktop .profile-route .profile-online-dot {
  width: 10px;
  height: 10px;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-about-card {
  display: none !important;
}

body.profile-route-desktop .profile-route .profile-wall-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 31px 28px 80px;
  display: grid;
  gap: 28px;
  background: #fffaf5;
}

body.profile-route-desktop .profile-route .profile-wall-head {
  padding: 0 14px;
}

body.profile-route-desktop .profile-route .profile-wall-head h2 {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
  color: #2d251f;
}

body.profile-route-desktop .profile-route .profile-wall-count-label {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  color: #8d8075;
}

body.profile-route-desktop .profile-route .profile-wall-composer,
body.profile-route-desktop .profile-route .profile-wall-post,
body.profile-route-desktop .profile-route .profile-wall-empty {
  width: 100%;
  margin: 0;
  border: 1px solid #eaded2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(64, 46, 29, 0.12);
}

body.profile-route-desktop .profile-route .profile-wall-composer {
  overflow: hidden;
}

body.profile-route-desktop .profile-route .profile-wall-emoji-strip {
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #eee4da;
}

body.profile-route-desktop .profile-route .profile-wall-emoji-chip {
  font-size: 28px;
}

body.profile-route-desktop .profile-route .profile-wall-composer-body {
  min-height: 146px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 24px 24px 18px;
}

body.profile-route-desktop .profile-route .profile-wall-avatar {
  width: 62px;
  height: 62px;
  font-size: 24px;
  font-weight: 900;
}

body.profile-route-desktop .profile-route #profile-wall-input {
  min-height: 100px;
  padding-top: 5px;
  resize: none;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2f2722;
}

body.profile-route-desktop .profile-route #profile-wall-input::placeholder {
  color: rgba(47, 39, 34, 0.28);
}

body.profile-route-desktop .profile-route .profile-wall-composer-footer {
  min-height: 78px;
  padding: 18px 28px;
  gap: 16px;
  border-top: 1px solid #eee4da;
}

body.profile-route-desktop .profile-route .profile-wall-tool-row {
  gap: 26px;
}

body.profile-route-desktop .profile-route .profile-wall-tool-button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #887b70;
}

body.profile-route-desktop .profile-route .profile-wall-tool-button svg {
  width: 20px;
  height: 20px;
}

body.profile-route-desktop .profile-route .profile-wall-submit {
  min-width: 0;
  width: min(58%, 820px);
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #edc093;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-wall-submit:disabled {
  display: none;
}

body.profile-route-desktop .profile-route .profile-wall-list {
  gap: 28px;
}

body.profile-route-desktop .profile-route .profile-wall-post {
  padding: 28px 34px 0;
}

body.profile-route-desktop .profile-route .profile-wall-post .profile-wall-avatar {
  width: 62px;
  height: 62px;
  font-size: 24px;
}

body.profile-route-desktop .profile-route .profile-wall-post-head {
  gap: 20px;
}

body.profile-route-desktop .profile-route .profile-wall-post-author-name {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

body.profile-route-desktop .profile-route .profile-wall-post-author-meta {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

body.profile-route-desktop .profile-route .profile-wall-post-body {
  margin-top: 24px;
  padding: 0 0 28px;
  border-bottom: 1px solid #eee4da;
  font-size: 24px;
  line-height: 1.38;
}

@media (max-width: 980px) {
  .profile-route .profile-hero {
    min-height: 396px;
    background:
      radial-gradient(circle, rgba(255, 235, 214, 0.35) 1.7px, transparent 1.7px),
      linear-gradient(180deg, #eb996d 0%, #dda143 178px, #fffaf5 178px, #fffaf5 100%);
    background-size: 44px 44px, 100% 100%;
  }

  .profile-route .profile-hero-body {
    padding: 222px 24px 0;
  }

  .profile-route .profile-hero-avatar-wrap {
    top: 128px;
    left: 24px;
  }

  .profile-route .profile-hero-main {
    padding: 0;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(210, 123, 70, 0.08), transparent 28%),
    linear-gradient(180deg, #fcfaf7 0%, #f8f4ee 100%);
}

body.viewer-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 12px;
  word-break: break-word;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(238, 228, 216, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 434px);
  padding: 30px;
  text-align: center;
}

.auth-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 24px;
  font-weight: 700;
}

.auth-copy {
  display: grid;
  gap: 10px;
}

.auth-copy h1 {
  font-size: 24px;
  font-weight: 700;
}

.auth-copy p {
  font-size: 14px;
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0 16px;
}

.auth-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 600;
}

.auth-tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(210, 123, 70, 0.22);
}

.auth-form {
  text-align: left;
}

.auth-error {
  border: 1px solid rgba(201, 108, 97, 0.22);
  background: rgba(201, 108, 97, 0.08);
  color: #9e483f;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
}

.shell {
  display: grid;
  grid-template-columns: 376px minmax(0, 1fr);
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.setup {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 8px 2px;
}

#utility-toggle-button,
.utility-panel {
  display: none !important;
}

.sidebar-action-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(248, 240, 231, 0.92));
  border: 1px solid rgba(229, 213, 198, 0.84);
  box-shadow:
    0 10px 24px rgba(46, 43, 39, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sidebar-action-button {
  position: static;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transform: none;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff6ec, #f6e0ce);
  border: 1px solid rgba(223, 176, 142, 0.42);
  color: var(--accent-strong);
  box-shadow:
    0 10px 22px rgba(210, 123, 70, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 180ms ease,
    border-color 160ms ease;
}

.sidebar-action-button:hover,
.sidebar-action-button:focus-visible {
  background: linear-gradient(180deg, #ffeede, #efcfb6);
  border-color: rgba(210, 123, 70, 0.3);
  box-shadow:
    0 14px 28px rgba(210, 123, 70, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

.sidebar-action-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.sidebar-action-eyebrow {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b09c8b;
}

.sidebar-action-title {
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;
  color: #6e5f52;
}

.sidebar-action-button svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-2.5px) translateX(-4.5px);
}

.session-card {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 16px 15px;
}

.session-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.session-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-profile-button {
  overflow: hidden;
  background: linear-gradient(180deg, #fff8f1, #f6e6d7);
  color: var(--accent-strong);
}

.session-profile-image,
.session-profile-initials {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}

.session-profile-image {
  object-fit: cover;
  object-position: center;
}

.session-profile-initials {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.session-actions .icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #9c8f81;
}

.session-user-button {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
}

.session-user {
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  min-width: 0;
  word-break: break-word;
}

.session-copy-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ab9c8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.session-copy-button:hover {
  background: rgba(224, 129, 62, 0.09);
  color: var(--accent-strong);
}

.session-copy-button:active {
  transform: scale(0.96);
}

.session-copy-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-user-hint {
  font-size: 12px;
  color: var(--accent-strong);
  font-weight: 600;
}

.session-device {
  display: none;
}

.stack {
  display: grid;
  gap: 14px;
}

#contacts-section {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.contacts-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}

.contacts-list {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: auto;
  min-height: 0;
  padding-right: 2px;
}

.groups-list {
  overflow: visible;
}

.sidebar-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(229, 213, 198, 0.88);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.96), rgba(250, 244, 237, 0.92));
  box-shadow:
    0 16px 32px rgba(46, 43, 39, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4px;
  padding: 5px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7eee4, #f0e4d6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sidebar-tab-button {
  width: 100%;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 999px;
  background: transparent;
  color: #8b7e71;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-tab-button.active {
  background: linear-gradient(180deg, #fffdfb, #fff7ef);
  color: var(--accent-strong);
  box-shadow:
    0 8px 18px rgba(46, 43, 39, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sidebar-tab-button.has-unread:not(.active) {
  color: #7d6553;
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.9), rgba(247, 235, 222, 0.92));
}

.sidebar-tab-label {
  min-width: 0;
}

.sidebar-tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-strong);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(210, 123, 70, 0.18);
}

.sidebar-tab-button.active .sidebar-tab-badge {
  background: rgba(210, 123, 70, 0.14);
  color: var(--accent-strong);
  box-shadow: none;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9f8c7c;
}

.search-section {
  gap: 8px;
  padding: 18px 16px 16px;
}

.search-section .sidebar-section-title {
  display: none;
}

.search-section.hidden {
  display: none;
}

.contacts-section-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

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

input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible,
button:focus,
button:focus-visible,
a:focus,
a:focus-visible,
[tabindex]:focus,
[tabindex]:focus-visible {
  outline: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 13px 15px;
  background: #fffefc;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

textarea {
  resize: none;
  min-height: 44px;
  max-height: 120px;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

button:hover {
  filter: brightness(0.98);
}

button.ghost {
  background: transparent;
  color: var(--muted);
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffdfb;
  color: var(--muted);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.danger-button {
  color: #bd7668;
  background: #fff8f6;
  border-color: #f1ddd6;
}

.compact-button {
  width: 100%;
  min-height: 50px;
  padding: 14px 16px;
}

.room-form {
  display: block;
}

.field-label {
  gap: 6px;
}

.inline-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 12px 0 0;
  border: 1px solid rgba(229, 213, 198, 0.94);
  border-radius: 24px;
  background: rgba(255, 254, 252, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 20px rgba(46, 43, 39, 0.035);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.inline-field:focus-within {
  border-color: rgba(224, 129, 62, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(46, 43, 39, 0.045);
}

.field-icon {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.inline-field input {
  height: 56px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 50px;
  padding-right: 58px;
  font-size: 16px;
  font-weight: 600;
}

.inline-field input:focus,
.inline-field input:focus-visible {
  outline: none;
  box-shadow: none;
}

.inline-field input::-webkit-credentials-auto-fill-button,
.inline-field input::-webkit-contacts-auto-fill-button,
.inline-field input::-webkit-textfield-decoration-container {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}

.inline-field input:-webkit-autofill,
.inline-field input:-webkit-autofill:hover,
.inline-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 254, 252, 0.96) inset;
  box-shadow: 0 0 0 1000px rgba(255, 254, 252, 0.96) inset;
  transition: background-color 9999s ease-out 0s;
}

.icon-cta {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff8f1, #f7e8da);
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(210, 123, 70, 0.12);
}

.icon-cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#new-contact-section .sidebar-section-head {
  margin-bottom: 0;
}

#new-contact-section .field-label {
  display: block;
}

.contact-item {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 13px 14px;
  background: #fffdfb;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-touch-callout: none;
  box-shadow: 0 6px 18px rgba(46, 43, 39, 0.03);
  transition: transform 160ms ease, background 120ms ease, border-color 120ms ease, box-shadow 160ms ease;
}

.contact-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.contact-kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(210, 123, 70, 0.1);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.group-popover {
  position: relative;
}

.group-popover-toggle {
  list-style: none;
  cursor: pointer;
}

.group-popover-toggle::-webkit-details-marker {
  display: none;
}

.group-popover-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.group-popover-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.group-form-panel {
  position: static;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  z-index: auto;
}

.group-form-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.group-member-field {
  display: grid;
  gap: 8px;
}

.group-member-field-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.group-member-picker {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.group-selected-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 8px;
}

.group-selected-chip {
  width: auto;
  min-height: 0;
  padding: 7px 10px 7px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #fff8f1, #f8e7d7);
  color: var(--accent-strong);
  border: 1px solid rgba(223, 176, 142, 0.38);
  box-shadow: 0 8px 18px rgba(46, 43, 39, 0.04);
}

.group-selected-chip-label {
  font-size: 13px;
  font-weight: 700;
}

.group-selected-chip-remove {
  font-size: 16px;
  line-height: 1;
  opacity: 0.72;
}

.group-member-options {
  display: grid;
  gap: 8px;
  max-height: min(32vh, 320px);
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}

.group-member-option,
.group-member-option-empty {
  width: 100%;
  min-height: 0;
  padding: 9px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffdfb;
  box-shadow: 0 8px 18px rgba(46, 43, 39, 0.03);
}

.group-member-option {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  text-align: left;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.group-member-option:hover {
  border-color: rgba(210, 123, 70, 0.26);
  background: linear-gradient(180deg, #fffdfb, #fff8f2);
  box-shadow: 0 12px 24px rgba(46, 43, 39, 0.05);
  transform: translateY(-1px);
}

.group-member-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #df8b4f, #cf7341);
  color: #fff;
  box-shadow: 0 8px 18px rgba(210, 123, 70, 0.16);
}

.group-member-avatar-chip {
  width: 24px;
  height: 24px;
  min-width: 24px;
  font-size: 10px;
  box-shadow: none;
}

.group-member-avatar-image,
.group-member-avatar-fallback {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}

.group-member-avatar-image {
  object-fit: cover;
  object-position: center;
}

.group-member-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.group-member-option-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.group-member-option-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.group-member-option-meta,
.group-member-option-add,
.group-member-option-empty {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.group-member-option-add {
  color: var(--accent-strong);
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(223, 176, 142, 0.14);
}

.contact-item:hover {
  background: linear-gradient(180deg, #fffdfb, #fff8f2);
  transform: translateY(-1px);
}

.contact-item.active {
  background: var(--accent-tint);
  border-color: #ead7c6;
}

.contact-item.unread:not(.active) {
  border-color: rgba(210, 123, 70, 0.34);
  background: linear-gradient(180deg, #fffdfb, #fff8f2);
  box-shadow:
    0 10px 24px rgba(46, 43, 39, 0.05),
    inset 3px 0 0 var(--accent-strong);
}

.contact-item.unread .contact-name,
.contact-item.unread .contact-preview {
  color: var(--text);
}

.contact-item.context-open {
  background: #fff7f1;
  border-color: rgba(210, 123, 70, 0.4);
  box-shadow: 0 12px 24px rgba(46, 43, 39, 0.08);
}

.contact-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  align-self: center;
  background: linear-gradient(180deg, #df8b4f, #cf7341);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: 0 10px 20px rgba(210, 123, 70, 0.18);
}

.contact-avatar-image {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
  object-fit: cover;
  object-position: center;
}

.contact-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.contact-name {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}

.contact-preview {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.contacts-section-panel .muted {
  padding: 2px 4px 0;
  font-size: 12px;
}

.contact-context-menu {
  position: fixed;
  min-width: 170px;
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(46, 43, 39, 0.14);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 30;
}

.contact-context-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}

.sidebar-action-menu-item {
  display: block;
  padding: 12px 14px;
}

.menu-item-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-action-menu-item .sidebar-action-menu-icon {
  display: none;
}

.contact-context-menu-item:hover {
  background: var(--card-soft);
}

.contact-context-menu-item.danger {
  color: #c44747;
}

.contact-context-menu-item.danger:hover {
  background: rgba(212, 87, 87, 0.1);
}

.meta {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat {
  background: #fffdfb;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  min-height: 0;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.mobile-back-button {
  display: none;
  flex: 0 0 auto;
  margin-top: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(229, 213, 198, 0.9);
  background: rgba(255, 253, 251, 0.94);
  color: var(--muted);
  box-shadow: none;
  place-items: center;
  align-items: center;
  justify-items: center;
  justify-content: center;
}

.mobile-back-button:hover {
  color: var(--accent-strong);
  background: #fffaf6;
}

.mobile-back-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-actions .icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
}

.chat-header-copy {
  min-width: 0;
}

.chat-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.chat-header h2.is-link {
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
  transition: color 140ms ease;
}

.chat-header h2.is-link:hover,
.chat-header h2.is-link:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.chat-subtitle {
  margin-top: 8px;
  font-size: 11px;
}

.group-topics-panel {
  display: grid;
  gap: 12px;
  padding: 14px 22px 16px;
  border-bottom: 1px solid rgba(238, 228, 216, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(249, 243, 235, 0.86));
}

.group-topics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.group-topics-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9c8f81;
  white-space: nowrap;
}

.group-topics-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 340px);
}

.group-topics-form input {
  min-width: 0;
  height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.group-topics-form .icon-cta {
  position: static;
  transform: none;
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
}

.group-topics-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.group-topic-chip {
  width: auto;
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(229, 213, 198, 0.96);
  background: rgba(255, 253, 251, 0.94);
  color: #8d7d6d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(46, 43, 39, 0.04);
}

.group-topic-chip:hover {
  background: #fff8f1;
  color: var(--accent-strong);
}

.group-topic-chip.active {
  border-color: rgba(210, 123, 70, 0.3);
  background: linear-gradient(180deg, rgba(223, 176, 142, 0.2), rgba(223, 176, 142, 0.34));
  color: var(--accent-strong);
  box-shadow: 0 10px 22px rgba(210, 123, 70, 0.12);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: #fffdfb;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge-live {
  color: var(--success);
}

.badge-idle {
  color: var(--idle);
}

.messages {
  flex: 1 1 auto;
  padding: 20px 22px;
  overflow: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(250, 246, 239, 0.9));
  min-height: 0;
}

.empty-state {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px 24px;
  text-align: center;
  color: #b1a79b;
}

.feed-empty-state {
  min-height: 320px;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: #b5a99a;
  background: #fffdfb;
  font-size: 22px;
  font-weight: 700;
}

.empty-state h3 {
  font-size: 17px;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
}

.message {
  max-width: 68%;
  border-radius: 18px;
  padding: 12px 14px 10px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(46, 43, 39, 0.03);
}

.message.context-open {
  box-shadow: 0 0 0 2px rgba(210, 123, 70, 0.18), 0 14px 28px rgba(46, 43, 39, 0.08);
}

.message-kind-file {
  max-width: min(62%, 320px);
}

.message.self {
  align-self: flex-end;
  background: var(--accent-tint);
  border-bottom-right-radius: 8px;
}

.message.peer {
  align-self: flex-start;
  background: #fffdfb;
  border-bottom-left-radius: 8px;
}

.message.offline {
  box-shadow: inset 0 0 0 1px rgba(39, 174, 96, 0.18);
}

.message-kind-audio,
.message-kind-video_note {
  max-width: min(86%, 860px);
}

.message-kind-audio {
  width: auto;
  min-width: min(320px, 100%);
  max-width: min(82%, 720px);
}

.message-kind-video_note {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  margin: 4px 0 0;
  transition: margin 220ms ease;
}

.message-kind-video_note.self,
.message-kind-video_note.peer {
  background: transparent;
}

.message-kind-video_note.is-expanded {
  margin-bottom: 116px;
}

.message-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.message-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 14px;
}

.message-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  word-break: break-word;
}

.message-link:hover {
  color: #c96f31;
}

.message-reference {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 14px;
  border-left: 3px solid rgba(210, 123, 70, 0.52);
  background: rgba(255, 253, 251, 0.72);
}

.message-reference-author,
.message-forward-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-strong);
}

.message-reference-preview {
  font-size: 12px;
  line-height: 1.35;
  color: #7c6d60;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-reference-deleted {
  font-size: 12px;
  color: var(--muted);
}

.message-forward {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.72);
  border: 1px solid rgba(229, 213, 198, 0.82);
}

.message-forward-content {
  min-width: 0;
}

.message-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  font-size: 10px;
  color: var(--muted);
}

.message-meta-time {
  white-space: nowrap;
}

.message-upload-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.message-upload-status.is-uploading {
  color: var(--accent-strong);
}

.message-upload-status.is-failed {
  color: #cb5d4d;
}

.message-upload-spinner {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(210, 123, 70, 0.2);
  border-top-color: var(--accent-strong);
  animation: message-upload-spin 0.8s linear infinite;
}

.message-delivery {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.18em;
  color: #b7aea5;
}

.message-delivery-check {
  display: inline-block;
  font-weight: 800;
}

.message-delivery-check.second {
  margin-left: -2px;
}

.message-delivery-sent .message-delivery-check.second {
  opacity: 0;
}

.message-delivery-received {
  color: #b7aea5;
}

.message-delivery-displayed {
  color: var(--accent-strong);
}

.message.is-uploading .message-body {
  opacity: 0.62;
}

.message.is-failed .message-body {
  opacity: 0.88;
}

.audio-widget.is-uploading,
.video-note-widget.is-uploading {
  position: relative;
}

.audio-widget.is-uploading::after,
.video-note-widget.is-uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  animation: message-upload-sheen 1.2s ease-in-out infinite;
  pointer-events: none;
}

.audio-widget.is-failed,
.video-note-widget.is-failed {
  box-shadow: inset 0 0 0 1px rgba(203, 93, 77, 0.22);
}

@keyframes message-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes message-upload-sheen {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.56;
  }
}

.media-bubble {
  display: grid;
  gap: 8px;
}

.image-bubble {
  justify-items: start;
  position: relative;
}

.image-bubble.is-uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  animation: message-upload-sheen 1.2s ease-in-out infinite;
  pointer-events: none;
}

.image-bubble.is-failed .image-preview-button {
  box-shadow: inset 0 0 0 1px rgba(203, 93, 77, 0.24), 0 10px 22px rgba(46, 43, 39, 0.08);
}

.image-preview-button {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(46, 43, 39, 0.08);
}

.image-preview {
  display: block;
  width: min(100%, 220px);
  max-height: 220px;
  object-fit: cover;
  border-radius: 18px;
  background: #efe6db;
}

.image-preview-meta {
  max-width: 220px;
}

.image-caption {
  margin: 0;
  max-width: 220px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}

.file-bubble {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.media-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(210, 123, 70, 0.14);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
}

.media-copy {
  min-width: 0;
}

.media-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.composer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: block;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.96), rgba(250, 243, 235, 0.94));
  position: relative;
  z-index: 1;
}

.composer-reference {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 253, 251, 0.9);
  border: 1px solid rgba(229, 213, 198, 0.88);
}

.composer-reference-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.composer-reference-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.composer-reference-preview {
  font-size: 12px;
  line-height: 1.35;
  color: #7c6d60;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-reference-clear {
  width: 30px;
  height: 30px;
  min-width: 30px;
}

.composer-reference-clear svg {
  width: 14px;
  height: 14px;
}

.media-compose {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdfb;
  box-shadow: 0 10px 24px rgba(46, 43, 39, 0.04);
}

.media-compose-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.media-compose-image {
  width: 72px;
  height: 72px;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  object-position: center;
  background: #efe6db;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.media-compose-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.media-compose-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-compose-meta {
  font-size: 11px;
  color: var(--muted);
}

.media-compose-caption {
  min-height: 72px;
  max-height: 132px;
  border-radius: 16px;
}

.media-compose-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.media-compose-remove {
  width: auto;
  min-height: 42px;
  padding-inline: 14px;
}

.media-compose-send {
  width: auto;
  min-height: 42px;
  padding-inline: 16px;
}

.composer-emoji-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px;
  margin-bottom: 8px;
  border: 1px solid rgba(229, 213, 198, 0.82);
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 18px rgba(46, 43, 39, 0.03);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.composer-emoji-strip::-webkit-scrollbar {
  display: none;
}

.composer-emoji-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(229, 213, 198, 0.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdfb, #f8efe6);
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 8px 18px rgba(46, 43, 39, 0.04);
}

.composer-emoji-button:hover {
  transform: translateY(-1px);
  border-color: rgba(210, 123, 70, 0.3);
  background: linear-gradient(180deg, #fffaf6, #f6e8dc);
  box-shadow: 0 12px 24px rgba(46, 43, 39, 0.07);
}

.composer-emoji-button:active {
  transform: translateY(0);
}

.composer-shell {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(229, 213, 198, 0.9);
  border-radius: 24px;
  background: rgba(255, 253, 251, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 10px 24px rgba(46, 43, 39, 0.035);
}

.composer-left,
.composer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.composer-input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.72);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  position: relative;
}

#message-input {
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 11px 12px;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.35;
}

#message-input:focus {
  outline: none;
}

.recorder-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(255, 251, 248, 0.98), rgba(254, 247, 241, 0.98));
  color: #8e5f56;
}

.recorder-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d45757;
  box-shadow: 0 0 0 0 rgba(212, 87, 87, 0.38);
  animation: recorder-pulse 1.3s ease-out infinite;
  flex: 0 0 auto;
}

.recorder-time {
  min-width: 40px;
  color: #8a6f64;
  font-size: 12px;
}

.recorder-meter {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  display: flex;
  align-items: end;
  gap: 4px;
}

.recorder-meter-bar {
  width: 5px;
  min-width: 5px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(223, 176, 142, 0.34), rgba(210, 123, 70, 0.82));
  transform-origin: center bottom;
  transform: scaleY(var(--meter-scale, 0.18));
  transition: transform 90ms linear, opacity 90ms linear;
  opacity: 0.92;
}

.composer.is-recording #message-input {
  visibility: hidden;
}

.composer.is-recording .composer-input-wrap {
  border-color: rgba(212, 87, 87, 0.22);
  background: #fff8f6;
}

.composer-icon-button,
.composer-send {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.composer-icon-button {
  border: 1px solid rgba(229, 213, 198, 0.76);
  background: rgba(255, 250, 245, 0.78);
  color: var(--muted);
  transition:
    color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.composer-icon-button svg,
.composer-send svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-send svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
}

.composer-icon-button:hover {
  color: var(--accent-strong);
  background: rgba(255, 245, 236, 0.98);
  box-shadow: 0 8px 18px rgba(46, 43, 39, 0.06);
}

.composer-readonly .composer-input-wrap {
  background: #faf3ed;
  border-color: #ead7c6;
}

.composer-icon-button:disabled,
.composer-send:disabled,
#message-input:disabled {
  cursor: not-allowed;
}

.composer-icon-button:disabled {
  opacity: 0.42;
}

#message-input:disabled {
  color: #96897c;
}

#file-button:hover {
  color: var(--accent-strong);
}

#voice-button:hover,
#circle-button:hover {
  color: #d45757;
}

.composer-send {
  position: relative;
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 10px 20px rgba(210, 123, 70, 0.22);
}

.composer-send:not(.hidden) {
  animation: composer-send-pop 360ms cubic-bezier(0.22, 1.28, 0.32, 1);
}

.composer-send .send-plane {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
}

.composer-send .send-plane-body {
  fill: rgba(255, 255, 255, 0.96);
  stroke: none;
}

.composer-send .send-plane-wing {
  fill: rgba(255, 255, 255, 0.72);
  stroke: none;
}

.composer-send .send-plane-tail {
  fill: rgba(255, 255, 255, 0.58);
  stroke: none;
}

.composer-send .send-plane-fold {
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.1;
  stroke-linecap: round;
}

.composer-send:hover .send-plane {
  transform: translate(3px, -3px) rotate(5deg);
}

.composer-send:active .send-plane {
  transform: translate(6px, -6px) rotate(10deg);
  opacity: 0.66;
}

@keyframes composer-send-pop {
  0% {
    transform: scale(0.68);
    opacity: 0;
  }
  55% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.icon-only {
  font-size: 0;
}

.composer-menu-wrap {
  position: relative;
}

.composer-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 190px;
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 5;
}

.composer-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 500;
}

.composer-menu-item:hover {
  background: var(--card-soft);
}

.forward-picker-sheet {
  width: min(100%, 420px);
}

.group-sheet {
  width: min(92vw, 560px);
  max-height: min(84vh, 860px);
  overflow: hidden;
}

.group-members-sheet {
  width: min(92vw, 460px);
}

.group-members-list {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 460px);
  overflow: auto;
}

.group-members-add-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdfb;
}

.group-members-add-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.group-members-add-options {
  display: grid;
  gap: 8px;
  max-height: min(28vh, 260px);
  overflow: auto;
  align-content: start;
}

.group-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fffdfb;
}

.group-member-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.group-member-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.group-member-meta {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.group-member-remove {
  width: auto;
  min-height: 38px;
  padding-inline: 12px;
  color: #c44747;
}

.forward-picker-preview {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fffaf5;
  border: 1px solid rgba(229, 213, 198, 0.88);
  color: #7c6d60;
  font-size: 13px;
  line-height: 1.4;
}

.forward-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(56vh, 420px);
  overflow: auto;
}

.forward-picker-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(229, 213, 198, 0.9);
  background: #fffdfb;
  display: grid;
  gap: 4px;
}

.forward-picker-item:hover {
  background: #fff8f1;
  border-color: rgba(210, 123, 70, 0.22);
}

.forward-picker-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.forward-picker-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.voice-recording {
  background: #d45757 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(212, 87, 87, 0.26);
}

#voice-button.voice-recording:hover,
#circle-button.voice-recording:hover {
  color: #fff;
}

@keyframes recorder-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 87, 87, 0.34);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(212, 87, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 87, 87, 0);
  }
}

.file-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

.audio-widget {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas: "control main";
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  width: clamp(320px, 46vw, 560px);
  max-width: 100%;
  min-height: 72px;
}

.audio-widget.audio-widget-short {
  width: clamp(300px, 34vw, 400px);
}

.audio-widget.audio-widget-medium {
  width: clamp(340px, 42vw, 500px);
}

.audio-widget.audio-widget-long {
  width: clamp(400px, 52vw, 620px);
}

.audio-widget.audio-widget-xlong {
  width: clamp(460px, 60vw, 720px);
}

.audio-native {
  display: none;
}

.audio-control {
  grid-area: control;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-strong), #cf6f36);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 28px rgba(210, 123, 70, 0.22);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.audio-control:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 30px rgba(210, 123, 70, 0.26);
}

.audio-control-inner {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.audio-icon,
.video-note-icon,
.video-note-audio {
  display: grid;
  place-items: center;
}

.audio-control .audio-icon {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.72);
  transition:
    opacity 170ms ease,
    transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.audio-control .audio-icon.is-active {
  opacity: 1;
  transform: scale(1);
}

.audio-icon svg,
.video-note-icon svg,
.video-note-audio svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-control .audio-icon-play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
  margin-left: 2px;
}

.audio-control .audio-icon-pause svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.audio-main {
  grid-area: main;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.audio-waveform {
  height: 34px;
  display: grid;
  grid-template-columns: repeat(28, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
}

.audio-wave-bar {
  height: clamp(10px, calc(var(--bar-height, 18px) * 0.82), 28px);
  border-radius: 999px;
  background: rgba(210, 123, 70, 0.2);
  transition: background 140ms ease, transform 140ms ease;
}

.audio-wave-bar.is-active {
  background: var(--accent-strong);
}

.audio-widget.is-playing .audio-wave-bar.is-active {
  box-shadow: 0 0 0 1px rgba(210, 123, 70, 0.06);
}

.audio-scrub {
  position: relative;
  height: 16px;
  cursor: pointer;
}

.audio-scrub-track,
.audio-scrub-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 999px;
}

.audio-scrub-track {
  width: 100%;
  background: rgba(210, 123, 70, 0.12);
}

.audio-scrub-fill {
  width: 0%;
  background: var(--accent-strong);
}

.audio-scrub-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: var(--accent-strong);
  border: 2px solid #fffdfb;
  box-shadow: 0 6px 14px rgba(210, 123, 70, 0.24);
}

.audio-times {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #7d7369;
  font-size: 12px;
  line-height: 1;
}

.audio-size {
  position: absolute;
  left: 0;
  bottom: -2px;
  min-width: 0;
  margin: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 11px;
  opacity: 0.9;
}

.video-note-widget {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding-bottom: 0;
}

.video-note-shell {
  position: relative;
  width: 212px;
  height: 212px;
  filter: drop-shadow(0 18px 22px rgba(210, 123, 70, 0.18));
  transform-origin: center top;
  transition: transform 220ms ease, filter 220ms ease;
}

.message-kind-video_note.self .video-note-shell {
  transform-origin: right top;
}

.message-kind-video_note.peer .video-note-shell {
  transform-origin: left top;
}

.video-note-size {
  position: static;
  left: auto;
  top: auto;
  font-size: 10px;
  line-height: 1;
  opacity: 0.88;
  z-index: auto;
  margin: 0;
}

.video-note-ring {
  position: absolute;
  inset: 0;
  width: 212px;
  height: 212px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.video-note-ring-track,
.video-note-ring-progress {
  fill: none;
  stroke-width: 8;
}

.video-note-ring-track {
  stroke: rgba(210, 123, 70, 0.12);
}

.video-note-ring-progress {
  stroke: var(--accent-strong);
  stroke-linecap: round;
  transition: stroke-dashoffset 120ms linear;
}

.video-note-frame {
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #d8d0c8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.video-note-media {
  width: 192px;
  height: 192px;
  display: block;
  object-fit: cover;
  border-radius: 999px;
  background: #d7cfc5;
}

.video-note-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38, 26, 18, 0.03), rgba(38, 26, 18, 0.18));
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease;
}

.video-note-frame:hover .video-note-overlay,
.video-note-widget.is-playing .video-note-overlay {
  opacity: 1;
}

.video-note-toggle,
.video-note-mute {
  position: absolute;
  border-radius: 999px;
  display: grid;
  place-items: center;
  z-index: 1;
}

.video-note-toggle {
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  padding: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  border: 0;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.video-note-frame:hover .video-note-toggle,
.video-note-widget:not(.is-playing) .video-note-toggle {
  opacity: 1;
}

.video-note-widget.is-viewed .video-note-mute {
  display: none;
}

.video-note-toggle:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.video-note-toggle .video-note-icon-play svg {
  fill: currentColor;
  stroke: none;
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

.video-note-toggle .video-note-icon-pause svg {
  fill: currentColor;
  stroke: none;
  width: 16px;
  height: 16px;
}

.video-note-toggle .video-note-icon-replay svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-note-widget.is-playing {
  z-index: 3;
}

.video-note-widget.is-playing .video-note-shell {
  transform: scale(1.5);
  filter: drop-shadow(0 24px 34px rgba(210, 123, 70, 0.24));
}

.video-note-widget.is-playing .video-note-toggle {
  opacity: 0;
  pointer-events: none;
}

.video-note-mute {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(60, 60, 60, 0.72);
  color: #fff;
  box-shadow: 0 10px 16px rgba(40, 32, 25, 0.18);
}

.video-note-mute svg {
  width: 18px;
  height: 18px;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 17, 0.76);
  backdrop-filter: blur(8px);
}

.image-viewer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 251, 0.94);
  color: var(--text);
  z-index: 1;
}

.image-viewer-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-viewer-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(92vw, 980px);
  display: grid;
  gap: 12px;
  justify-items: center;
}

.image-viewer-image {
  display: block;
  max-width: 100%;
  max-height: min(80vh, 920px);
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(18, 14, 11, 0.24);
  background: #f5efe7;
}

.image-viewer-caption {
  color: rgba(255, 248, 241, 0.88);
  font-size: 13px;
  text-align: center;
}

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

body.profile-route-open {
  overflow: auto;
}

.profile-route {
  min-height: 100dvh;
  padding: 0 0 48px;
  background: linear-gradient(180deg, #fffbf7 0%, #f7f1ea 100%);
}

.profile-route-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.profile-page-shell {
  padding-bottom: 12px;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  min-height: 408px;
  background: linear-gradient(135deg, #e98b61 0%, #d59a45 100%);
  border-bottom: 1px solid rgba(201, 151, 91, 0.18);
}

.profile-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 241, 229, 0.26) 1.7px, transparent 1.7px);
  background-size: 48px 48px;
  opacity: 0.75;
}

.profile-hero-top,
.profile-hero-body {
  position: relative;
  z-index: 1;
}

.profile-hero-top {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 18px 28px 0;
}

.profile-hero-back {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(126, 76, 39, 0.32);
  color: #fff;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}

.profile-hero-back:hover,
.profile-hero-back:focus-visible {
  background: rgba(126, 76, 39, 0.3);
  color: #fff;
}

.profile-hero-back svg,
.profile-photo-action svg,
.profile-hero-membership svg,
.profile-wall-tool-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-hero-body {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 128px 28px 0;
  display: grid;
  gap: 26px;
}

.profile-hero-avatar-wrap {
  position: relative;
  margin-bottom: -74px;
}

.profile-hero-avatar {
  width: 132px;
  height: 132px;
  border-radius: 999px;
  border: 6px solid rgba(255, 255, 255, 0.98);
  background: #cc326f;
  box-shadow: 0 20px 36px rgba(45, 27, 11, 0.18);
}

.profile-hero-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 0;
}

.profile-hero-copy {
  min-width: 0;
  padding-left: 0;
}

.profile-hero-name {
  font-size: clamp(54px, 5vw, 86px);
  line-height: 0.94;
  font-weight: 900;
  color: #2f2722;
}

.profile-hero-user-id {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.15;
  color: rgba(73, 47, 28, 0.38);
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-photo-action,
.profile-edit-button {
  min-height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(131, 100, 74, 0.12);
  background: rgba(255, 247, 239, 0.92);
  color: #8d7b6b;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.profile-photo-action:hover,
.profile-photo-action:focus-visible,
.profile-edit-button:hover,
.profile-edit-button:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  color: #6f5e50;
}

.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 4px;
  padding: 26px 30px;
  border-radius: 38px;
  box-shadow: 0 22px 42px rgba(145, 95, 45, 0.14);
}

.profile-hero-stat {
  display: grid;
  gap: 2px;
}

.profile-hero-stat-value {
  font-size: 66px;
  line-height: 0.96;
  font-weight: 900;
  color: #2d251f;
}

.profile-hero-stat-label {
  font-size: 18px;
  color: #857567;
}

.profile-hero-meta-divider {
  width: 1px;
  align-self: stretch;
  background: #ead8c8;
}

.profile-hero-membership,
.profile-hero-presence {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #7f7062;
  font-size: 20px;
  font-weight: 600;
}

.profile-hero-presence {
  margin-left: auto;
  color: #6c5d51;
  font-weight: 700;
}

.profile-online-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #18c27c;
  box-shadow: 0 0 0 4px rgba(24, 194, 124, 0.12);
}

.profile-about-card,
.profile-wall-section {
  margin: 0 24px;
}

.profile-about-card {
  padding: 22px 24px;
  border-radius: 28px;
}

.profile-about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-about-head h2,
.profile-wall-head h2 {
  font-size: clamp(44px, 4vw, 62px);
  line-height: 1;
  font-weight: 900;
  color: #2e2722;
}

.profile-about-copy {
  font-size: 17px;
  line-height: 1.5;
  color: #7d6c5d;
}

.profile-wall-section {
  display: grid;
  gap: 18px;
}

.profile-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-wall-count-label {
  font-size: 18px;
  color: #9a8b7d;
  font-weight: 600;
}

.profile-wall-composer,
.profile-wall-post,
.profile-wall-empty {
  border-radius: 30px;
}

.profile-wall-composer {
  overflow: hidden;
  padding: 0;
  box-shadow: 0 22px 44px rgba(132, 96, 47, 0.1);
}

.profile-wall-emoji-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 22px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.profile-wall-emoji-chip {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
}

.profile-wall-emoji-chip:hover,
.profile-wall-emoji-chip:focus-visible {
  transform: translateY(-1px);
}

.profile-wall-composer-body {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  padding: 30px 28px 34px;
}

.profile-wall-pending-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px 18px;
}

.profile-wall-pending-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-wall-pending-name {
  font-size: 16px;
  font-weight: 700;
  color: #3a3028;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-wall-pending-meta {
  font-size: 13px;
  color: #8d7b6b;
}

.profile-wall-pending-remove {
  border: 0;
  background: transparent;
  color: #ce7c34;
  font-size: 14px;
  font-weight: 700;
}

.profile-wall-avatar {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: #cc326f;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
}

#profile-wall-input {
  width: 100%;
  min-height: 186px;
  resize: vertical;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: clamp(42px, 4vw, 58px);
  line-height: 1.12;
  color: #302823;
  background: transparent;
}

#profile-wall-input::placeholder {
  color: rgba(48, 40, 35, 0.28);
}

#profile-wall-input:focus {
  outline: none;
}

.profile-wall-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line);
}

.profile-wall-tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-wall-tool-button {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  border: 0;
  background: transparent;
  color: #8e7d70;
  display: grid;
  place-items: center;
}

.profile-wall-tool-button.is-accent {
  border: 4px solid #dd9307;
  color: #e37d42;
  background: rgba(255, 249, 240, 0.88);
}

.profile-wall-submit {
  min-width: 420px;
  min-height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #dfa059, #ce7c34);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.profile-wall-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.profile-wall-empty {
  padding: 28px;
  font-size: 16px;
  line-height: 1.45;
  color: #8b7a6c;
}

.profile-wall-list {
  display: grid;
  gap: 16px;
}

.profile-wall-post {
  padding: 20px 22px 0;
  box-shadow: 0 18px 36px rgba(132, 96, 47, 0.08);
}

.profile-wall-post-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.profile-wall-post-author {
  min-width: 0;
  flex: 1 1 auto;
}

.profile-wall-post-author-name {
  font-size: 22px;
  font-weight: 900;
  color: #2e2722;
}

.profile-wall-post-author-meta {
  margin-top: 2px;
  font-size: 16px;
  color: #9a8b7d;
  font-weight: 600;
}

.profile-wall-post-delete {
  border: 0;
  background: transparent;
  color: #c6b4a4;
  padding: 6px;
  border-radius: 12px;
}

.profile-wall-post-delete svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-wall-post-delete:hover,
.profile-wall-post-delete:focus-visible {
  background: rgba(198, 180, 164, 0.12);
}

.profile-wall-post-body {
  margin-top: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(234, 220, 207, 0.92);
  font-size: 22px;
  line-height: 1.55;
  color: #302823;
}

.profile-wall-post-body p + p {
  margin-top: 14px;
}

.profile-wall-media-card {
  display: grid;
  gap: 10px;
}

.profile-wall-media-image {
  display: block;
  width: min(100%, 360px);
  max-height: 360px;
  border-radius: 18px;
  object-fit: cover;
  background: #f5efe7;
  border: 1px solid rgba(234, 220, 207, 0.92);
}

.profile-wall-media-link {
  color: #ce7c34;
  font-weight: 700;
  text-decoration: none;
}

.profile-wall-media-link:hover,
.profile-wall-media-link:focus-visible {
  text-decoration: underline;
}

.profile-wall-media-meta {
  font-size: 13px;
  color: #9a8b7d;
}

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 17, 0.48);
  backdrop-filter: blur(6px);
}

.profile-sheet {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.profile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-sheet-header .icon-button {
  display: grid;
  place-items: center;
}

.profile-sheet-header .icon-button svg {
  transform: translateY(-0.5px);
}

.profile-sheet-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.profile-avatar-block {
  display: grid;
  gap: 12px;
}

.profile-avatar-preview-wrap {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8eadf, #f2dccb);
  border: 1px solid rgba(229, 213, 198, 0.92);
  box-shadow: 0 12px 24px rgba(46, 43, 39, 0.06);
}

.profile-avatar-preview,
.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
}

.profile-avatar-preview {
  display: block;
  object-fit: cover;
  background: #f2e5d8;
}

.profile-avatar-placeholder {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-strong);
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-avatar-upload,
.profile-avatar-remove {
  width: auto;
  min-height: 42px;
  padding-inline: 14px;
}

.profile-route .stack label {
  display: grid;
  gap: 10px;
}

.profile-route .stack label > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.profile-route textarea {
  min-height: 160px;
  resize: vertical;
}

#profile-editor-avatar-preview.hidden + #profile-editor-avatar-placeholder {
  display: grid;
}

#profile-editor-avatar-placeholder.hidden,
#profile-editor-avatar-preview.hidden {
  display: none;
}

@media (min-width: 981px) {
  body.profile-route-desktop {
    overflow: hidden;
  }

  body.profile-route-desktop .chat,
  body.profile-route-desktop .utility-panel {
    visibility: hidden;
    pointer-events: none;
  }

  body.profile-route-desktop .setup {
    position: relative;
    z-index: 2;
    border-right: 1px solid var(--line);
    box-shadow: 4px 0 24px rgba(64, 46, 29, 0.04);
  }

  body.profile-route-desktop .profile-route {
    position: fixed;
    inset: 0 0 0 376px;
    z-index: 15;
    overflow: auto;
    padding: 0;
    background:
      radial-gradient(circle at top left, rgba(240, 173, 92, 0.14), transparent 28%),
      linear-gradient(180deg, #fffdf9 0%, #f8f2eb 100%);
  }

  body.profile-route-desktop .profile-route-shell {
    width: 100%;
    max-width: none;
    min-height: 100%;
    gap: 22px;
  }

  body.profile-route-desktop .profile-page-shell {
    padding: 0 0 28px;
  }

  body.profile-route-desktop .profile-hero {
    min-height: 318px;
    border-radius: 0 0 26px 26px;
    box-shadow: 0 18px 46px rgba(187, 125, 52, 0.14);
  }

  body.profile-route-desktop .profile-hero-top,
  body.profile-route-desktop .profile-hero-body {
    width: min(100%, 1180px);
  }

  body.profile-route-desktop .profile-hero-top {
    padding: 18px 20px 0;
  }

  body.profile-route-desktop .profile-hero-body {
    padding: 96px 20px 0;
    gap: 16px;
  }

  body.profile-route-desktop .profile-hero-avatar-wrap {
    margin-bottom: -46px;
  }

  body.profile-route-desktop .profile-hero-avatar {
    width: 92px;
    height: 92px;
    border-width: 5px;
  }

  body.profile-route-desktop .profile-hero-main {
    gap: 16px;
  }

  body.profile-route-desktop .profile-hero-name {
    font-size: clamp(40px, 3.8vw, 66px);
  }

  body.profile-route-desktop .profile-hero-user-id {
    font-size: 16px;
    margin-top: 6px;
  }

  body.profile-route-desktop .profile-photo-action,
  body.profile-route-desktop .profile-edit-button {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 14px;
  }

  body.profile-route-desktop .profile-hero-meta {
    gap: 22px;
    padding: 18px 22px;
    border-radius: 28px;
  }

  body.profile-route-desktop .profile-hero-stat-value {
    font-size: 42px;
  }

  body.profile-route-desktop .profile-hero-stat-label,
  body.profile-route-desktop .profile-hero-membership,
  body.profile-route-desktop .profile-hero-presence {
    font-size: 14px;
  }

  body.profile-route-desktop .profile-about-head h2,
  body.profile-route-desktop .profile-wall-head h2 {
    font-size: clamp(28px, 2.8vw, 42px);
  }

  body.profile-route-desktop .profile-wall-count-label {
    font-size: 14px;
  }

  body.profile-route-desktop .profile-about-card,
  body.profile-route-desktop .profile-wall-section {
    width: min(calc(100% - 40px), 1120px);
    margin-left: auto;
    margin-right: auto;
  }

  body.profile-route-desktop .profile-wall-section {
    gap: 14px;
  }

  body.profile-route-desktop .profile-wall-composer,
  body.profile-route-desktop .profile-wall-post {
    border-radius: 24px;
  }

  body.profile-route-desktop .profile-wall-emoji-strip {
    gap: 8px;
    padding: 14px 18px 12px;
  }

  body.profile-route-desktop .profile-wall-emoji-chip {
    font-size: 28px;
  }

  body.profile-route-desktop .profile-wall-composer-body {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 18px 16px;
  }

  body.profile-route-desktop .profile-wall-pending-media {
    padding: 0 18px 12px;
  }

  body.profile-route-desktop .profile-wall-pending-name {
    font-size: 13px;
  }

  body.profile-route-desktop .profile-wall-pending-meta {
    font-size: 11px;
  }

  body.profile-route-desktop .profile-wall-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  body.profile-route-desktop #profile-wall-input {
    min-height: 104px;
    font-size: clamp(22px, 2.6vw, 34px);
    line-height: 1.18;
  }

  body.profile-route-desktop .profile-wall-composer-footer {
    padding: 12px 18px 16px;
    gap: 12px;
  }

  body.profile-route-desktop .profile-wall-tool-row {
    gap: 6px;
  }

  body.profile-route-desktop .profile-wall-tool-button {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  body.profile-route-desktop .profile-wall-tool-button svg {
    width: 16px;
    height: 16px;
  }

  body.profile-route-desktop .profile-wall-tool-button.is-accent {
    border-width: 3px;
  }

  body.profile-route-desktop .profile-wall-submit {
    min-width: 320px;
    min-height: 44px;
    font-size: 14px;
  }

  body.profile-route-desktop .profile-wall-post {
    padding: 16px 18px 0;
  }

  body.profile-route-desktop .profile-wall-post-author-name {
    font-size: 16px;
  }

  body.profile-route-desktop .profile-wall-post-author-meta {
    font-size: 12px;
  }

  body.profile-route-desktop .profile-wall-post-body {
    margin-top: 12px;
    padding-bottom: 18px;
    font-size: 16px;
  }

  body.profile-route-desktop .profile-wall-post-delete svg {
    width: 18px;
    height: 18px;
  }
}

.events {
  display: none;
}

.card-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
}

#event-log {
  margin: 8px 0 0;
  max-height: 320px;
  overflow: auto;
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
}

.utility-panel {
  width: 280px;
  border-left: 1px solid var(--line);
  background: #faf6f0;
  padding: 14px 12px;
  min-height: 0;
  overflow: auto;
}

.utility-card {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 14px;
}

.utility-section {
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.utility-status,
.utility-copy {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  .setup {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    height: 100dvh;
    overflow: auto;
  }

  .chat {
    height: 100dvh;
    min-height: 0;
  }

  .message {
    max-width: 100%;
  }

  .utility-panel {
    display: none !important;
  }

  .composer-shell {
    flex-wrap: wrap;
  }

  .composer-input-wrap {
    order: 3;
    width: 100%;
  }

  .mobile-back-button {
    display: grid;
  }

  .shell.mobile-chat-open .setup {
    display: none;
  }

  .shell:not(.mobile-chat-open) .chat {
    display: none;
  }

  .shell.mobile-chat-open .chat {
    display: flex;
  }

  .profile-sheet {
    width: min(100vw, 100%);
    min-height: 100vh;
    border-radius: 0;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  }
}

/* Profile alignment pass */
.profile-route .profile-page-shell {
  max-width: 1240px;
  margin: 0 auto;
}

.profile-route .profile-hero {
  min-height: 300px;
  background:
    radial-gradient(circle, rgba(255, 241, 229, 0.28) 1.8px, transparent 1.8px),
    linear-gradient(180deg, #ea9468 0%, #dfa047 178px, #fff9f2 178px, #fff9f2 100%);
  background-size: 48px 48px, 100% 100%;
}

.profile-route .profile-hero-top,
.profile-route .profile-hero-body,
.profile-route .profile-wall-head {
  width: min(100%, 1160px);
  margin: 0 auto;
}

.profile-route .profile-hero-body {
  padding: 94px 32px 20px;
}

.profile-route .profile-hero-avatar-wrap {
  top: 118px;
  left: 32px;
}

.profile-route .profile-hero-avatar {
  width: 104px;
  height: 104px;
}

.profile-route .profile-hero-main {
  min-height: 112px;
  padding-top: 72px;
  padding-left: 132px;
  align-items: end;
}

.profile-route .profile-hero-name {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.04;
  letter-spacing: 0;
}

.profile-route .profile-hero-user-id {
  font-size: 15px;
}

.profile-route .profile-hero-actions {
  padding-bottom: 4px;
}

.profile-route .profile-wall-section {
  width: min(100%, 1160px);
  margin: 0 auto;
}

.profile-route .profile-wall-composer,
.profile-route .profile-wall-post,
.profile-route .profile-wall-empty {
  margin-left: 32px;
  margin-right: 32px;
}

.profile-route .profile-wall-composer-body {
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
}

.profile-route #profile-wall-input {
  min-height: 64px;
  font-size: 15px;
}

.profile-route .profile-wall-submit {
  max-width: 420px;
}

@media (min-width: 981px) {
  body.profile-route-desktop .profile-route {
    inset: 0 0 0 446px;
  }

  body.profile-route-desktop .profile-route .profile-hero-body {
    padding: 92px 32px 20px;
  }

  body.profile-route-desktop .profile-route .profile-hero-main {
    padding-top: 70px;
    padding-left: 130px;
  }
}

@media (max-width: 980px) {
  .profile-route .profile-page-shell,
  .profile-route .profile-wall-section {
    max-width: none;
  }

  .profile-route .profile-hero {
    min-height: 324px;
    background:
      radial-gradient(circle, rgba(255, 241, 229, 0.28) 1.8px, transparent 1.8px),
      linear-gradient(180deg, #ea9468 0%, #dfa047 176px, #fff9f2 176px, #fff9f2 100%);
    background-size: 48px 48px, 100% 100%;
  }

  .profile-route .profile-hero-body {
    padding: 92px 24px 18px;
  }

  .profile-route .profile-hero-avatar-wrap {
    top: 124px;
    left: 24px;
  }

  .profile-route .profile-hero-avatar {
    width: 104px;
    height: 104px;
  }

  .profile-route .profile-hero-main {
    padding-top: 88px;
    padding-left: 0;
  }

  .profile-route .profile-hero-name {
    font-size: 26px;
  }

  .profile-route .profile-wall-composer,
  .profile-route .profile-wall-post,
  .profile-route .profile-wall-empty {
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (max-width: 720px) {
  .auth-screen {
    padding: 16px;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .setup {
    padding: 12px 10px 16px;
  }

  .profile-route {
    padding-bottom: 28px;
  }

  .profile-hero {
    min-height: 392px;
  }

  .profile-hero-top,
  .profile-hero-body,
  .profile-about-card,
  .profile-wall-section {
    padding-left: 16px;
    padding-right: 16px;
    margin-left: 0;
    margin-right: 0;
  }

  .profile-hero-top {
    padding-top: 16px;
  }

  .profile-hero-body {
    padding-top: 94px;
  }

  .profile-hero-avatar-wrap {
    margin-bottom: -60px;
  }

  .profile-hero-avatar {
    width: 124px;
    height: 124px;
    border-width: 6px;
  }

  .profile-avatar-placeholder {
    font-size: 24px;
  }

  .profile-hero-main {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-hero-copy {
    padding-left: 0;
  }

  .profile-hero-name {
    font-size: 34px;
  }

  .profile-hero-user-id {
    font-size: 18px;
  }

  .profile-hero-actions {
    justify-content: flex-start;
  }

  .profile-photo-action,
  .profile-edit-button {
    min-height: 44px;
    font-size: 14px;
  }

  .profile-hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 20px;
  }

  .profile-hero-meta-divider {
    display: none;
  }

  .profile-hero-presence {
    margin-left: 0;
  }

  .profile-about-card {
    padding: 18px 20px;
  }

  .profile-about-head h2,
  .profile-wall-head h2 {
    font-size: 22px;
  }

  .profile-wall-head {
    align-items: flex-end;
  }

  .profile-wall-count-label {
    font-size: 14px;
  }

  .profile-wall-emoji-strip {
    gap: 8px;
    padding: 16px 16px 14px;
  }

  .profile-wall-emoji-chip {
    font-size: 28px;
  }

  .profile-wall-composer-body {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px 20px;
  }

  .profile-wall-avatar {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  #profile-wall-input {
    min-height: 118px;
    font-size: 18px;
  }

  .profile-wall-composer-footer {
    padding: 14px 16px 16px;
    flex-wrap: wrap;
  }

  .profile-wall-tool-row {
    gap: 6px;
  }

  .profile-wall-tool-button {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .profile-wall-submit {
    width: 100%;
    min-width: 0;
  }

  .profile-wall-post {
    padding: 16px 16px 0;
  }

  .profile-wall-post-body {
    font-size: 16px;
  }

  .topbar {
    padding: 4px 2px 0;
  }

  .sidebar-action-wrap {
    min-height: 50px;
    padding: 6px 8px;
    border-radius: 18px;
    gap: 10px;
  }

  .brand {
    column-gap: 8px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .session-card {
    margin-top: 14px;
    padding: 12px;
    border-radius: 18px;
  }

  .session-user {
    font-size: 18px;
  }

  .session-device {
    font-size: 10px;
  }

  label {
    gap: 6px;
    font-size: 13px;
  }

  input,
  select,
  textarea {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .compact-button {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
  }

  .field-label {
    gap: 4px;
  }

  .inline-field {
    min-height: 54px;
    border-radius: 20px;
  }

  .inline-field input {
    height: 54px;
    font-size: 15px;
  }

  .icon-cta {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    right: 7px;
    padding: 0;
  }

  .sidebar-action-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  .sidebar-action-title {
    font-size: 13px;
  }

  .contacts-list {
    gap: 8px;
  }

  .contact-item {
    border-radius: 16px;
    padding: 10px 11px;
  }

  .contact-avatar {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .contact-name {
    font-size: 15px;
  }

  .chat-header {
    padding: 14px 14px 12px;
  }

  .group-topics-panel {
    padding: 12px 14px 14px;
    gap: 10px;
  }

  .group-topics-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .group-topics-form {
    width: 100%;
  }

  .messages {
    padding: 16px 14px;
  }

  .composer {
    padding: 12px 14px;
  }

  .composer-emoji-button {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .composer-shell {
    flex-wrap: nowrap;
  }

  .composer-left,
  .composer-right {
    gap: 6px;
  }

  .composer-icon-button,
  .composer-send {
    width: 36px;
    height: 36px;
  }

  .composer-icon-button svg,
  .composer-send svg {
    width: 16px;
    height: 16px;
  }

  .composer-input-wrap {
    order: initial;
  }

  #message-input {
    min-height: 40px;
    padding: 10px 12px;
  }

  .recorder-status {
    gap: 10px;
    padding: 0 12px;
  }

  .recorder-meter {
    gap: 3px;
  }

  .recorder-meter-bar {
    width: 4px;
    min-width: 4px;
  }

  .audio-widget {
    width: min(100%, 100%);
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 10px;
    min-height: 56px;
  }

  .audio-control {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .audio-waveform {
    gap: 3px;
  }

  .video-note-shell {
    width: 196px;
    height: 196px;
  }

  .video-note-ring {
    width: 196px;
    height: 196px;
  }

  .video-note-frame {
    inset: 9px;
  }

  .video-note-media {
    width: 178px;
    height: 178px;
  }
}

@media (max-width: 560px) {
  .chat-header {
    padding: 12px 12px 10px;
  }

  .profile-hero-back {
    min-height: 46px;
    padding: 12px 16px;
  }

  .profile-hero-membership,
  .profile-hero-presence {
    font-size: 16px;
  }

  .group-topics-panel {
    padding: 10px 12px 12px;
  }

  .group-topics-form input {
    height: 38px;
    padding: 8px 12px;
  }

  .group-topics-form .icon-cta {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .group-topic-chip {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .messages {
    padding: 14px 12px;
  }

  .composer {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 252, 248, 0.98);
  }

  .composer-emoji-strip {
    gap: 6px;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }

  .composer-emoji-button {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    font-size: 18px;
  }

  .composer-shell {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .composer-left,
  .composer-right {
    display: flex;
    align-items: center;
  }

  .composer-menu-wrap {
    display: none;
  }

  .composer-left {
    gap: 2px;
    flex: 0 0 auto;
  }

  .composer-right {
    gap: 2px;
    flex: 0 0 auto;
  }

  .composer-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 16px;
  }

  #message-input {
    min-height: 36px;
    max-height: 96px;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1.3;
  }

  .recorder-status {
    gap: 8px;
    padding: 0 10px;
  }

  .recorder-time {
    min-width: 34px;
    font-size: 11px;
  }

  .recorder-meter {
    height: 18px;
    gap: 2px;
  }

  .recorder-meter-bar {
    width: 3px;
    min-width: 3px;
  }

  .composer-icon-button,
  .composer-send {
    width: 30px;
    height: 30px;
  }

  .composer-icon-button svg,
  .composer-send svg {
    width: 14px;
    height: 14px;
  }

  .message {
    max-width: 82%;
  }

  .message-kind-audio,
  .message-kind-video_note {
    max-width: 94%;
  }

  .image-preview {
    width: min(100%, 248px);
    max-height: 248px;
  }

  .image-preview-meta {
    max-width: 248px;
  }

  .image-caption {
    max-width: 248px;
  }

  .message-kind-audio {
    width: auto;
    min-width: min(240px, 100%);
    max-width: min(94%, 420px);
  }

  .audio-widget {
    width: 100%;
    min-height: 48px;
    column-gap: 10px;
  }

  .audio-waveform {
    height: 18px;
    gap: 4px;
  }

  .audio-wave-bar {
    height: clamp(5px, calc(var(--bar-height, 18px) * 0.48), 14px);
  }

  .audio-times {
    padding-right: 0;
  }

  .audio-size {
    left: 0;
    bottom: -2px;
    font-size: 9px;
  }

  .message-kind-video_note {
    width: auto;
  }

  .video-note-shell {
    width: 184px;
    height: 184px;
  }

  .video-note-ring {
    width: 184px;
    height: 184px;
  }

  .video-note-frame {
    inset: 8px;
  }

  .video-note-media {
    width: 168px;
    height: 168px;
  }

  .video-note-size {
    font-size: 9px;
  }

  .media-compose {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 16px;
  }

  .media-compose-preview {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
  }

  .media-compose-image {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .media-compose-caption {
    min-height: 64px;
    max-height: 120px;
    padding: 10px 12px;
  }

  .media-compose-actions {
    gap: 6px;
  }

  .media-compose-remove,
  .media-compose-send {
    min-height: 38px;
    font-size: 13px;
  }
}

/* Final profile wall layout overrides */
.profile-route {
  background:
    radial-gradient(circle at top left, rgba(236, 163, 92, 0.12), transparent 24%),
    linear-gradient(180deg, #fffdf9 0%, #f7f1ea 100%);
}

.profile-route .profile-page-shell {
  gap: 18px;
}

.profile-route .profile-hero {
  min-height: 300px;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}

.profile-route .profile-hero-top {
  width: min(100%, 1120px);
  padding: 16px 18px 0;
}

.profile-route .profile-hero-body {
  width: min(100%, 1120px);
  padding: 94px 18px 18px;
  position: relative;
  gap: 18px;
}

.profile-route .profile-hero-avatar-wrap {
  position: absolute;
  top: 128px;
  left: 18px;
  margin: 0;
}

.profile-route .profile-hero-avatar {
  width: 110px;
  height: 110px;
  border-width: 6px;
  border-radius: 34px;
  background: #cc326f;
}

.profile-route .profile-hero-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 132px;
}

.profile-route .profile-hero-copy {
  width: 100%;
}

.profile-route .profile-hero-name {
  font-size: clamp(32px, 8vw, 52px);
  line-height: 0.94;
}

.profile-route .profile-hero-user-id {
  margin-top: 8px;
  font-size: 16px;
}

.profile-route .profile-hero-actions {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
}

.profile-route .profile-photo-action,
.profile-route .profile-edit-button {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
}

.profile-route .profile-hero-meta {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 32px;
}

.profile-route .profile-hero-stat-value {
  font-size: 54px;
}

.profile-route .profile-hero-stat-label,
.profile-route .profile-hero-membership,
.profile-route .profile-hero-presence {
  font-size: 14px;
}

.profile-route .profile-hero-meta-divider {
  display: none;
}

.profile-route .profile-hero-presence {
  margin-left: 0;
}

.profile-route .profile-about-card,
.profile-route .profile-wall-section {
  margin: 0 16px;
}

.profile-route .profile-about-card {
  padding: 18px 20px;
  border-radius: 24px;
}

.profile-route .profile-about-head h2,
.profile-route .profile-wall-head h2 {
  font-size: clamp(24px, 7vw, 42px);
}

.profile-route .profile-wall-count-label {
  font-size: 14px;
}

.profile-route .profile-wall-section {
  gap: 14px;
}

.profile-route .profile-wall-composer,
.profile-route .profile-wall-post,
.profile-route .profile-wall-empty {
  border-radius: 24px;
}

.profile-route .profile-wall-emoji-strip {
  gap: 8px;
  padding: 14px 16px 12px;
}

.profile-route .profile-wall-emoji-chip {
  font-size: 28px;
}

.profile-route .profile-wall-composer-body {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 16px 14px;
}

.profile-route .profile-wall-avatar {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.profile-route .profile-wall-pending-media {
  padding: 0 16px 12px;
}

.profile-route .profile-wall-pending-name {
  font-size: 13px;
}

.profile-route .profile-wall-pending-meta {
  font-size: 11px;
}

.profile-route #profile-wall-input {
  min-height: 104px;
  font-size: clamp(18px, 5vw, 30px);
  line-height: 1.18;
}

.profile-route .profile-wall-composer-footer {
  gap: 12px;
  padding: 12px 16px 16px;
}

.profile-route .profile-wall-tool-row {
  gap: 6px;
}

.profile-route .profile-wall-tool-button {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.profile-route .profile-wall-tool-button svg {
  width: 16px;
  height: 16px;
}

.profile-route .profile-wall-tool-button.is-accent {
  border-width: 3px;
}

.profile-route .profile-wall-submit {
  min-width: 0;
  flex: 1 1 220px;
  min-height: 44px;
  font-size: 14px;
}

.profile-route .profile-wall-post {
  padding: 16px 16px 0;
}

.profile-route .profile-wall-post-author-name {
  font-size: 16px;
}

.profile-route .profile-wall-post-author-meta {
  font-size: 12px;
}

.profile-route .profile-wall-post-body {
  margin-top: 12px;
  padding-bottom: 18px;
  font-size: 16px;
}

@media (min-width: 981px) {
  body.profile-route-desktop .profile-route {
    inset: 0 0 0 340px;
  }

  body.profile-route-desktop .profile-route .profile-page-shell {
    gap: 20px;
  }

  body.profile-route-desktop .profile-route .profile-hero {
    min-height: 286px;
    border-radius: 0 0 24px 24px;
  }

  body.profile-route-desktop .profile-route .profile-hero-top {
    width: min(100%, 1120px);
    padding: 18px 20px 0;
  }

  body.profile-route-desktop .profile-route .profile-hero-body {
    width: min(100%, 1120px);
    padding: 84px 20px 0;
    gap: 16px;
  }

  body.profile-route-desktop .profile-route .profile-hero-avatar-wrap {
    top: 124px;
    left: 20px;
  }

  body.profile-route-desktop .profile-route .profile-hero-avatar {
    width: 96px;
    height: 96px;
    border-radius: 30px;
    border-width: 5px;
  }

  body.profile-route-desktop .profile-route .profile-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    padding-top: 126px;
    padding-left: 0;
  }

  body.profile-route-desktop .profile-route .profile-hero-copy {
    min-width: 0;
  }

  body.profile-route-desktop .profile-route .profile-hero-name {
    font-size: clamp(34px, 3.2vw, 58px);
  }

  body.profile-route-desktop .profile-route .profile-hero-user-id {
    font-size: 15px;
    margin-top: 6px;
  }

  body.profile-route-desktop .profile-route .profile-hero-actions {
    width: auto;
    justify-content: flex-end;
    align-items: center;
    padding-top: 4px;
  }

  body.profile-route-desktop .profile-route .profile-photo-action,
  body.profile-route-desktop .profile-route .profile-edit-button {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 14px;
  }

  body.profile-route-desktop .profile-route .profile-hero-meta {
    grid-template-columns: auto 1px auto auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 28px;
  }

  body.profile-route-desktop .profile-route .profile-hero-meta-divider {
    display: block;
    width: 1px;
    height: 56px;
    background: #ead8c8;
  }

  body.profile-route-desktop .profile-route .profile-hero-stat-value {
    font-size: 42px;
  }

  body.profile-route-desktop .profile-route .profile-hero-stat-label,
  body.profile-route-desktop .profile-route .profile-hero-membership,
  body.profile-route-desktop .profile-route .profile-hero-presence {
    font-size: 14px;
  }

  body.profile-route-desktop .profile-route .profile-hero-presence {
    margin-left: auto;
  }

  body.profile-route-desktop .profile-route .profile-about-card,
  body.profile-route-desktop .profile-route .profile-wall-section {
    width: min(calc(100% - 40px), 1120px);
    margin-left: auto;
    margin-right: auto;
  }

  body.profile-route-desktop .profile-route .profile-about-head h2,
  body.profile-route-desktop .profile-route .profile-wall-head h2 {
    font-size: clamp(26px, 2.6vw, 42px);
  }

  body.profile-route-desktop .profile-route .profile-wall-composer,
  body.profile-route-desktop .profile-route .profile-wall-post,
  body.profile-route-desktop .profile-route .profile-wall-empty {
    border-radius: 22px;
  }

  body.profile-route-desktop .profile-route .profile-wall-emoji-strip {
    gap: 8px;
    padding: 14px 18px 12px;
  }

  body.profile-route-desktop .profile-route .profile-wall-emoji-chip {
    font-size: 28px;
  }

  body.profile-route-desktop .profile-route .profile-wall-composer-body {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 18px 14px;
  }

  body.profile-route-desktop .profile-route .profile-wall-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  body.profile-route-desktop .profile-route .profile-wall-pending-media {
    padding: 0 18px 12px;
  }

  body.profile-route-desktop .profile-route #profile-wall-input {
    min-height: 108px;
    font-size: clamp(20px, 2.2vw, 32px);
  }

  body.profile-route-desktop .profile-route .profile-wall-composer-footer {
    padding: 12px 18px 16px;
  }

  body.profile-route-desktop .profile-route .profile-wall-tool-button {
    width: 36px;
    height: 36px;
  }

  body.profile-route-desktop .profile-route .profile-wall-submit {
    min-height: 44px;
    max-width: 520px;
  }

  body.profile-route-desktop .profile-route .profile-wall-post {
    padding: 16px 18px 0;
  }

  body.profile-route-desktop .profile-route .profile-wall-post-author-name {
    font-size: 16px;
  }

  body.profile-route-desktop .profile-route .profile-wall-post-author-meta {
    font-size: 12px;
  }

  body.profile-route-desktop .profile-route .profile-wall-post-body {
    font-size: 16px;
  }
}

/* Profile wall refinement */
.profile-route {
  background: #fffdf9;
}

.profile-route .profile-hero {
  min-height: 320px;
  background:
    radial-gradient(circle, rgba(255, 241, 229, 0.22) 1.7px, transparent 1.7px),
    linear-gradient(180deg, #ea9468 0%, #df9c4b 210px, transparent 210px, transparent 100%);
  background-size: 48px 48px, 100% 100%;
  border-bottom: 0;
}

.profile-route .profile-hero-top {
  padding: 18px 24px 0;
}

.profile-route .profile-hero-back {
  width: auto;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(146, 93, 58, 0.38);
  color: #fff;
  box-shadow: none;
}

.profile-route .profile-hero-body {
  padding: 82px 34px 14px;
  gap: 12px;
}

.profile-route .profile-hero-avatar-wrap {
  top: 154px;
  left: 28px;
}

.profile-route .profile-hero-avatar {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  border: 7px solid #fff;
}

.profile-route .profile-hero-main {
  padding-top: 132px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

.profile-route .profile-hero-name {
  font-size: clamp(28px, 3.4vw, 42px);
}

.profile-route .profile-hero-user-id {
  font-size: 16px;
  margin-top: 6px;
}

.profile-route .profile-photo-action,
.profile-route .profile-edit-button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

.profile-route .profile-hero-meta {
  padding: 0;
  gap: 16px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.profile-route .profile-hero-meta-divider {
  display: block;
  width: 1px;
  height: 46px;
  background: #ead8c8;
}

.profile-route .profile-hero-stat-value {
  font-size: 22px;
  line-height: 1;
}

.profile-route .profile-hero-stat-label,
.profile-route .profile-hero-membership,
.profile-route .profile-hero-presence {
  font-size: 13px;
  font-weight: 500;
}

.profile-route .profile-wall-head {
  padding: 0 34px;
}

.profile-route .profile-about-head h2,
.profile-route .profile-wall-head h2 {
  font-size: 18px;
  font-weight: 700;
}

.profile-route .profile-wall-count-label {
  font-size: 13px;
}

@media (min-width: 981px) {
  body.profile-route-desktop .profile-route {
    inset: 0 0 0 376px;
  }

  body.profile-route-desktop .profile-route .profile-hero {
    min-height: 292px;
    background:
      radial-gradient(circle, rgba(255, 241, 229, 0.22) 1.7px, transparent 1.7px),
      linear-gradient(180deg, #ea9468 0%, #df9c4b 204px, transparent 204px, transparent 100%);
    background-size: 48px 48px, 100% 100%;
  }

  body.profile-route-desktop .profile-route .profile-hero-top {
    padding: 22px 28px 0;
  }

  body.profile-route-desktop .profile-route .profile-hero-back {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
  }

  body.profile-route-desktop .profile-route .profile-hero-body {
    width: min(100%, 1120px);
    padding: 92px 28px 8px;
  }

  body.profile-route-desktop .profile-route .profile-hero-avatar-wrap {
    top: 126px;
    left: 28px;
  }

  body.profile-route-desktop .profile-route .profile-hero-avatar {
    width: 104px;
    height: 104px;
    border-radius: 999px;
  }

  body.profile-route-desktop .profile-route .profile-hero-main {
    padding-top: 124px;
    gap: 14px;
  }

  body.profile-route-desktop .profile-route .profile-hero-name {
    font-size: clamp(30px, 3vw, 48px);
  }

  body.profile-route-desktop .profile-route .profile-hero-user-id {
    font-size: 15px;
  }

  body.profile-route-desktop .profile-route .profile-hero-actions {
    align-self: start;
    padding-top: 4px;
  }

  body.profile-route-desktop .profile-route .profile-photo-action,
  body.profile-route-desktop .profile-route .profile-edit-button {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
  }

  body.profile-route-desktop .profile-route .profile-hero-meta {
    gap: 14px;
  }

  body.profile-route-desktop .profile-route .profile-hero-stat-value {
    font-size: 20px;
  }

  body.profile-route-desktop .profile-route .profile-hero-stat-label,
  body.profile-route-desktop .profile-route .profile-hero-membership,
  body.profile-route-desktop .profile-route .profile-hero-presence {
    font-size: 12px;
  }

  body.profile-route-desktop .profile-route .profile-wall-head {
    padding: 0 28px;
  }
}

/* Profile wall exact layout pass */
.profile-route .profile-hero {
  min-height: 340px;
  background:
    radial-gradient(circle, rgba(255, 241, 229, 0.22) 1.7px, transparent 1.7px),
    linear-gradient(180deg, #ea9468 0%, #df9c4b 62%, #fffdf9 62%, #fffdf9 100%);
  background-size: 48px 48px, 100% 100%;
  border-radius: 0;
  border-bottom: 1px solid #eadfd4;
  box-shadow: none;
}

.profile-route .profile-hero-top {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: none;
  padding: 18px 24px 0;
}

.profile-route .profile-hero-back {
  min-height: 42px;
  padding: 10px 18px;
  background: rgba(138, 87, 53, 0.42);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.profile-route .profile-hero-body {
  width: 100%;
  max-width: none;
  padding: 82px 34px 26px;
  position: relative;
  z-index: 2;
  gap: 18px;
}

.profile-route .profile-hero-avatar-wrap {
  position: absolute;
  top: 134px;
  left: 28px;
  margin: 0;
  z-index: 3;
}

.profile-route .profile-hero-avatar {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  border: 7px solid #fff;
  box-shadow: 0 18px 36px rgba(50, 30, 14, 0.12);
}

.profile-route .profile-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding-top: 128px;
}

.profile-route .profile-hero-copy {
  min-width: 0;
}

.profile-route .profile-hero-name {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 0.98;
  color: #2d2621;
}

.profile-route .profile-hero-user-id {
  margin-top: 8px;
  font-size: 18px;
  color: #aea195;
}

.profile-route .profile-hero-actions {
  width: auto;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
}

.profile-route .profile-photo-action,
.profile-route .profile-edit-button {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  border: 0;
  background: transparent;
  color: #8f8072;
}

.profile-route .profile-edit-button {
  display: none;
}

.profile-route .profile-hero-meta {
  width: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-route .profile-hero-meta-divider {
  display: block;
  width: 1px;
  height: 46px;
  background: #ead8c8;
}

.profile-route .profile-hero-stat {
  gap: 0;
}

.profile-route .profile-hero-stat-value {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}

.profile-route .profile-hero-stat-label,
.profile-route .profile-hero-membership,
.profile-route .profile-hero-presence {
  font-size: 14px;
  font-weight: 500;
}

.profile-route .profile-hero-stat-label {
  margin-top: 4px;
}

.profile-route .profile-hero-presence {
  margin-left: 0;
}

.profile-route .profile-about-card {
  display: none !important;
}

.profile-route .profile-about-card,
.profile-route .profile-wall-section {
  margin-left: 0;
  margin-right: 0;
}

.profile-route .profile-wall-section {
  gap: 14px;
}

.profile-route .profile-wall-head {
  padding: 0 34px;
}

.profile-route .profile-about-head h2,
.profile-route .profile-wall-head h2 {
  font-size: 18px;
  font-weight: 700;
}

.profile-route .profile-wall-count-label {
  font-size: 13px;
  font-weight: 500;
}

.profile-route .profile-wall-composer,
.profile-route .profile-wall-post,
.profile-route .profile-wall-empty {
  margin: 0 22px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(70, 50, 29, 0.08);
}

.profile-route .profile-wall-emoji-strip {
  padding: 14px 18px 12px;
  gap: 8px;
}

.profile-route .profile-wall-emoji-chip {
  font-size: 28px;
}

.profile-route .profile-wall-composer-body {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 18px 16px;
}

.profile-route .profile-wall-avatar {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.profile-route .profile-wall-pending-media {
  padding: 0 18px 12px;
}

.profile-route #profile-wall-input {
  min-height: 72px;
  font-size: 16px;
  line-height: 1.3;
}

.profile-route .profile-wall-composer-footer {
  padding: 10px 18px 14px;
  gap: 12px;
}

.profile-route .profile-wall-tool-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.profile-route .profile-wall-tool-button svg {
  width: 16px;
  height: 16px;
}

.profile-route .profile-wall-submit {
  min-height: 40px;
  max-width: 420px;
  font-size: 14px;
}

.profile-route .profile-wall-post {
  padding: 18px 18px 0;
}

.profile-route .profile-wall-post-author-name {
  font-size: 16px;
}

.profile-route .profile-wall-post-author-meta {
  font-size: 12px;
}

.profile-route .profile-wall-post-body {
  margin-top: 10px;
  padding-bottom: 18px;
  font-size: 16px;
}

@media (max-width: 980px) {
  .profile-route .profile-hero {
    min-height: 320px;
    background:
      radial-gradient(circle, rgba(255, 241, 229, 0.22) 1.7px, transparent 1.7px),
      linear-gradient(180deg, #ea9468 0%, #df9c4b 64%, #fffdf9 64%, #fffdf9 100%);
    background-size: 48px 48px, 100% 100%;
  }

  .profile-route .profile-hero-top {
    padding: 18px 22px 0;
  }

  .profile-route .profile-hero-body {
    padding: 86px 22px 24px;
  }

  .profile-route .profile-hero-avatar-wrap {
    top: 142px;
    left: 22px;
  }

  .profile-route .profile-hero-avatar {
    width: 106px;
    height: 106px;
  }

  .profile-route .profile-hero-main {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 126px;
  }

  .profile-route .profile-hero-name {
    font-size: 30px;
  }

  .profile-route .profile-hero-user-id {
    font-size: 16px;
  }

  .profile-route .profile-hero-actions {
    display: none;
  }

  .profile-route .profile-hero-meta {
    flex-wrap: wrap;
    gap: 14px;
  }

  .profile-route .profile-hero-meta-divider {
    height: 38px;
  }

  .profile-route .profile-wall-head {
    padding: 0 22px;
  }

  .profile-route .profile-wall-composer,
  .profile-route .profile-wall-post,
  .profile-route .profile-wall-empty {
    margin: 0 22px;
  }
}

/* Profile wall final geometry */
.profile-route,
.profile-route .profile-route-shell,
.profile-route .profile-page-shell {
  background: #fff9f2;
}

.profile-route .profile-route-shell,
.profile-route .profile-page-shell {
  box-shadow: none;
}

.profile-route .profile-hero {
  position: relative;
  min-height: 302px;
  background:
    radial-gradient(circle, rgba(255, 241, 229, 0.28) 1.8px, transparent 1.8px),
    linear-gradient(180deg, #ea9468 0%, #dfa047 184px, transparent 184px, transparent 100%);
  background-size: 48px 48px, 100% 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.profile-route .profile-hero-top {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  padding: 24px 28px 0;
}

.profile-route .profile-hero-back {
  min-height: 0;
  padding: 9px 18px;
  border: 0;
  border-radius: 18px;
  background: rgba(145, 91, 54, 0.55);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.profile-route .profile-hero-back:hover,
.profile-route .profile-hero-back:focus-visible {
  background: rgba(145, 91, 54, 0.68);
}

.profile-route .profile-hero-body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  padding: 118px 28px 16px;
  gap: 14px;
}

.profile-route .profile-hero-avatar-wrap {
  position: absolute;
  top: 122px;
  left: 28px;
  z-index: 3;
  margin: 0;
}

.profile-route .profile-hero-avatar {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  border: 6px solid #fff;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(83, 52, 24, 0.14);
}

.profile-route .profile-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding-top: 94px;
}

.profile-route .profile-hero-copy {
  min-width: 0;
}

.profile-route .profile-hero-name {
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #2b231e;
}

.profile-route .profile-hero-user-id {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.2;
  color: #b0a294;
}

.profile-route .profile-hero-actions {
  align-self: center;
  justify-content: flex-end;
}

.profile-route .profile-photo-action,
.profile-route .profile-edit-button {
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.9);
  color: #8f8072;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.profile-route .profile-edit-button {
  display: none;
}

.profile-route .profile-hero-meta {
  width: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.profile-route .profile-hero-stat {
  gap: 2px;
}

.profile-route .profile-hero-stat-value {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: #2b231e;
}

.profile-route .profile-hero-stat-label,
.profile-route .profile-hero-membership,
.profile-route .profile-hero-presence {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  color: #8f8072;
}

.profile-route .profile-hero-meta-divider {
  display: block;
  width: 1px;
  height: 38px;
  background: #ead8c8;
}

.profile-route .profile-hero-presence {
  margin-left: 0;
}

.profile-route .profile-about-card {
  display: none !important;
}

.profile-route .profile-wall-section {
  gap: 12px;
}

.profile-route .profile-wall-head {
  padding: 0 28px;
}

.profile-route .profile-about-head h2,
.profile-route .profile-wall-head h2 {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2b231e;
}

.profile-route .profile-wall-count-label {
  font-size: 12px;
  font-weight: 500;
  color: #9d8c7b;
}

.profile-route .profile-wall-composer,
.profile-route .profile-wall-post,
.profile-route .profile-wall-empty {
  margin: 0 22px;
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(83, 52, 24, 0.08);
}

.profile-route .profile-wall-post {
  padding: 18px 18px 0;
}

.profile-route .profile-wall-post-author-name {
  font-size: 15px;
}

.profile-route .profile-wall-post-author-meta {
  font-size: 11px;
}

.profile-route .profile-wall-post-body {
  margin-top: 10px;
  padding-bottom: 18px;
  font-size: 15px;
  line-height: 1.35;
}

.profile-route .profile-wall-composer-body {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 18px 14px;
}

.profile-route .profile-wall-avatar {
  width: 40px;
  height: 40px;
  font-size: 17px;
}

.profile-route #profile-wall-input {
  min-height: 68px;
  font-size: 15px;
  line-height: 1.3;
}

.profile-route .profile-wall-composer-footer {
  padding: 10px 18px 14px;
  gap: 12px;
}

.profile-route .profile-wall-tool-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.profile-route .profile-wall-tool-button svg {
  width: 16px;
  height: 16px;
}

.profile-route .profile-wall-submit {
  min-height: 38px;
  max-width: 360px;
  font-size: 13px;
}

@media (min-width: 981px) {
  body.profile-route-desktop .profile-route {
    inset: 0 0 0 446px;
  }

  body.profile-route-desktop .profile-route .profile-route-shell,
  body.profile-route-desktop .profile-route .profile-page-shell {
    max-width: none;
    margin: 0;
  }

  body.profile-route-desktop .profile-route .profile-hero {
    min-height: 286px;
    background:
      radial-gradient(circle, rgba(255, 241, 229, 0.28) 1.8px, transparent 1.8px),
      linear-gradient(180deg, #ea9468 0%, #dfa047 178px, transparent 178px, transparent 100%);
    background-size: 48px 48px, 100% 100%;
  }

  body.profile-route-desktop .profile-route .profile-hero-top {
    padding: 22px 32px 0;
  }

  body.profile-route-desktop .profile-route .profile-hero-back {
    padding: 9px 16px;
    border-radius: 17px;
    font-size: 13px;
  }

  body.profile-route-desktop .profile-route .profile-hero-body {
    padding: 106px 32px 14px;
  }

  body.profile-route-desktop .profile-route .profile-hero-avatar-wrap {
    top: 116px;
    left: 32px;
  }

  body.profile-route-desktop .profile-route .profile-hero-avatar {
    width: 108px;
    height: 108px;
  }

  body.profile-route-desktop .profile-route .profile-hero-main {
    padding-top: 88px;
    padding-left: 130px;
  }

  body.profile-route-desktop .profile-route .profile-hero-name {
    font-size: clamp(24px, 2.4vw, 38px);
  }

  body.profile-route-desktop .profile-route .profile-wall-head {
    padding: 0 32px;
  }
}

@media (max-width: 980px) {
  .profile-route,
  .profile-route .profile-route-shell,
  .profile-route .profile-page-shell {
    background: #fff9f2;
  }

  .profile-route .profile-hero {
    min-height: 312px;
    background:
      radial-gradient(circle, rgba(255, 241, 229, 0.28) 1.8px, transparent 1.8px),
      linear-gradient(180deg, #ea9468 0%, #dfa047 176px, transparent 176px, transparent 100%);
    background-size: 48px 48px, 100% 100%;
  }

  .profile-route .profile-hero-top {
    padding: 18px 24px 0;
  }

  .profile-route .profile-hero-back {
    padding: 10px 18px;
    font-size: 14px;
  }

  .profile-route .profile-hero-body {
    padding: 90px 24px 14px;
  }

  .profile-route .profile-hero-avatar-wrap {
    top: 122px;
    left: 24px;
  }

  .profile-route .profile-hero-avatar {
    width: 110px;
    height: 110px;
    border-width: 6px;
  }

  .profile-route .profile-hero-main {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 92px;
  }

  .profile-route .profile-hero-name {
    font-size: 24px;
  }

  .profile-route .profile-hero-user-id {
    font-size: 13px;
  }

  .profile-route .profile-hero-actions {
    display: none;
  }

  .profile-route .profile-hero-meta {
    gap: 12px;
  }

  .profile-route .profile-hero-meta-divider {
    height: 34px;
  }

  .profile-route .profile-wall-head {
    padding: 0 24px;
  }

  .profile-route .profile-about-head h2,
  .profile-route .profile-wall-head h2 {
    font-size: 18px;
  }

  .profile-route .profile-wall-composer,
  .profile-route .profile-wall-post,
  .profile-route .profile-wall-empty {
    margin: 0 24px;
  }
}

/* Profile route reference layout final override */
body.profile-route-desktop {
  overflow: hidden;
}

body.profile-route-desktop .chat,
body.profile-route-desktop .utility-panel {
  visibility: hidden;
  pointer-events: none;
}

body.profile-route-desktop .profile-route {
  position: fixed;
  inset: 0 0 0 376px;
  z-index: 15;
  overflow: auto;
  padding: 0;
  background: #fffaf5;
}

body.profile-route-desktop .profile-route .profile-route-shell,
body.profile-route-desktop .profile-route .profile-page-shell {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: 0 0 80px;
  gap: 0;
  background: #fffaf5;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-hero {
  position: relative;
  min-height: 535px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #eaded2;
  box-shadow: none;
  background:
    radial-gradient(circle, rgba(255, 235, 214, 0.35) 1.7px, transparent 1.7px),
    linear-gradient(180deg, #eb996d 0%, #dda143 218px, #fffaf5 218px, #fffaf5 100%);
  background-size: 52px 52px, 100% 100%;
}

body.profile-route-desktop .profile-route .profile-hero-pattern {
  display: none;
}

body.profile-route-desktop .profile-route .profile-hero-top {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px 30px 0;
}

body.profile-route-desktop .profile-route .profile-hero-back {
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 24px;
  background: rgba(145, 91, 54, 0.45);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-hero-back svg {
  width: 22px;
  height: 22px;
}

body.profile-route-desktop .profile-route .profile-hero-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 30px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 330px 42px 0;
}

body.profile-route-desktop .profile-route .profile-hero-avatar-wrap {
  position: absolute;
  top: 180px;
  left: 36px;
  z-index: 3;
  margin: 0;
}

body.profile-route-desktop .profile-route .profile-hero-avatar {
  width: 134px;
  height: 134px;
  border: 6px solid #fff;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(81, 55, 34, 0.16);
}

body.profile-route-desktop .profile-route .profile-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0;
}

body.profile-route-desktop .profile-route .profile-hero-name {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
  color: #2d251f;
}

body.profile-route-desktop .profile-route .profile-hero-user-id {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #b2a69b;
}

body.profile-route-desktop .profile-route .profile-hero-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
}

body.profile-route-desktop .profile-route .profile-photo-action,
body.profile-route-desktop .profile-route .profile-edit-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8f8379;
  font-size: 17px;
  font-weight: 700;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-photo-action svg {
  width: 22px;
  height: 22px;
}

body.profile-route-desktop .profile-route .profile-edit-button {
  display: none;
}

body.profile-route-desktop .profile-route .profile-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-hero-stat {
  min-width: 86px;
  display: grid;
  justify-items: center;
  gap: 4px;
}

body.profile-route-desktop .profile-route .profile-hero-stat-value {
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
  color: #2d251f;
}

body.profile-route-desktop .profile-route .profile-hero-stat-label,
body.profile-route-desktop .profile-route .profile-hero-membership,
body.profile-route-desktop .profile-route .profile-hero-presence {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  color: #8d8075;
}

body.profile-route-desktop .profile-route .profile-hero-meta-divider {
  display: block;
  width: 1px;
  height: 56px;
  background: #eaded2;
}

body.profile-route-desktop .profile-route .profile-hero-membership,
body.profile-route-desktop .profile-route .profile-hero-presence {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

body.profile-route-desktop .profile-route .profile-hero-membership svg {
  width: 22px;
  height: 22px;
}

body.profile-route-desktop .profile-route .profile-hero-presence {
  margin-left: 8px;
}

body.profile-route-desktop .profile-route .profile-online-dot {
  width: 10px;
  height: 10px;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-about-card {
  display: none !important;
}

body.profile-route-desktop .profile-route .profile-wall-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 31px 28px 80px;
  display: grid;
  gap: 28px;
  background: #fffaf5;
}

body.profile-route-desktop .profile-route .profile-wall-head {
  padding: 0 14px;
}

body.profile-route-desktop .profile-route .profile-wall-head h2 {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
  color: #2d251f;
}

body.profile-route-desktop .profile-route .profile-wall-count-label {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  color: #8d8075;
}

body.profile-route-desktop .profile-route .profile-wall-composer,
body.profile-route-desktop .profile-route .profile-wall-post,
body.profile-route-desktop .profile-route .profile-wall-empty {
  width: 100%;
  margin: 0;
  border: 1px solid #eaded2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(64, 46, 29, 0.12);
}

body.profile-route-desktop .profile-route .profile-wall-composer {
  overflow: hidden;
}

body.profile-route-desktop .profile-route .profile-wall-emoji-strip {
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid #eee4da;
}

body.profile-route-desktop .profile-route .profile-wall-emoji-chip {
  font-size: 28px;
}

body.profile-route-desktop .profile-route .profile-wall-composer-body {
  min-height: 146px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 24px 24px 18px;
}

body.profile-route-desktop .profile-route .profile-wall-avatar {
  width: 62px;
  height: 62px;
  font-size: 24px;
  font-weight: 900;
}

body.profile-route-desktop .profile-route #profile-wall-input {
  min-height: 100px;
  padding-top: 5px;
  resize: none;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2f2722;
}

body.profile-route-desktop .profile-route #profile-wall-input::placeholder {
  color: rgba(47, 39, 34, 0.28);
}

body.profile-route-desktop .profile-route .profile-wall-composer-footer {
  min-height: 78px;
  padding: 18px 28px;
  gap: 16px;
  border-top: 1px solid #eee4da;
}

body.profile-route-desktop .profile-route .profile-wall-tool-row {
  gap: 26px;
}

body.profile-route-desktop .profile-route .profile-wall-tool-button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #887b70;
}

body.profile-route-desktop .profile-route .profile-wall-tool-button svg {
  width: 20px;
  height: 20px;
}

body.profile-route-desktop .profile-route .profile-wall-submit {
  min-width: 0;
  width: min(58%, 820px);
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #edc093;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: none;
}

body.profile-route-desktop .profile-route .profile-wall-submit:disabled {
  display: none;
}

body.profile-route-desktop .profile-route .profile-wall-list {
  gap: 28px;
}

body.profile-route-desktop .profile-route .profile-wall-post {
  padding: 28px 34px 0;
}

body.profile-route-desktop .profile-route .profile-wall-post .profile-wall-avatar {
  width: 62px;
  height: 62px;
  font-size: 24px;
}

body.profile-route-desktop .profile-route .profile-wall-post-head {
  gap: 20px;
}

body.profile-route-desktop .profile-route .profile-wall-post-author-name {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

body.profile-route-desktop .profile-route .profile-wall-post-author-meta {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

body.profile-route-desktop .profile-route .profile-wall-post-body {
  margin-top: 24px;
  padding: 0 0 28px;
  border-bottom: 1px solid #eee4da;
  font-size: 24px;
  line-height: 1.38;
}

@media (max-width: 980px) {
  .profile-route .profile-hero {
    min-height: 396px;
    background:
      radial-gradient(circle, rgba(255, 235, 214, 0.35) 1.7px, transparent 1.7px),
      linear-gradient(180deg, #eb996d 0%, #dda143 178px, #fffaf5 178px, #fffaf5 100%);
    background-size: 44px 44px, 100% 100%;
  }

  .profile-route .profile-hero-body {
    padding: 222px 24px 0;
  }

  .profile-route .profile-hero-avatar-wrap {
    top: 128px;
    left: 24px;
  }

  .profile-route .profile-hero-main {
    padding: 0;
  }
}
