@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("assets/fonts/lora.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* Shared design kit. All screens use these tokens and reusable components. */
:root {
  color-scheme: dark;
  --bg: #111315;
  --surface: #191c1f;
  --surface-raised: #25292d;
  --glass: rgba(25, 28, 31, 0.88);
  --panel-top: rgba(37, 41, 45, 0.85);
  --panel-bottom: rgba(25, 28, 31, 0.8);
  --panel-glass: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface-raised) 92%, transparent),
    color-mix(in srgb, var(--surface) 86%, transparent)
  );
  --panel-glass-edge: color-mix(in srgb, var(--text) 16%, transparent);
  --panel-glass-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 10%, transparent),
    0 8px 28px #00000020;
  --panel-glass-blur: 24px;
  --floating-glass-background:
    linear-gradient(155deg, #ffffff0d, transparent 55%),
    color-mix(in srgb, var(--surface) 42%, transparent);
  --menu-glass-background:
    linear-gradient(155deg, #ffffff0d, transparent 55%),
    color-mix(in srgb, var(--surface) 90%, transparent);
  --menu-glass-blur: 20px;
  --floating-glass-edge: color-mix(in srgb, var(--text) 10%, transparent);
  --floating-glass-blur: 5px;
  --floating-glass-shadow: inset 0 1px #ffffff16, 0 4px 16px #0002;
  --conversation-font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --text: #e8ecee;
  --muted: #a4acb1;
  --subtle: #7e898f;
  --line: rgba(224, 235, 240, 0.1);
  --accent: #99d6e8;
  --accent-strong: #377d91;
  --accent-soft: rgba(153, 214, 232, 0.1);
  --success: #64d8a5;
  --danger: #ff8193;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  --radius: 20px;
  --radius-sm: 14px;
  --gutter: 18px;
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    calc(var(--tg-content-safe-area-inset-top, 0px) / var(--mini-app-scale, 1))
  );
  --safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    calc(var(--tg-safe-area-inset-bottom, 0px) / var(--mini-app-scale, 1))
  );
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  /* Keep CSS typography stable in mobile browsers and embedded WebViews.
     This controls automatic text inflation; user pinch zoom stays available. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --chat-title-size: 16px;
  --chat-preview-size: 14px;
  --nav-label-size: 13px;
  --list-title-size: 20px;
  --list-preview-size: 17px;
  --list-meta-size: 13px;
  --list-label-size: 14px;
  --section-heading-size: 22px;
  --tile-title-size: 17px;
  --list-row-height: 86px;
  --list-avatar-size: 52px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f5;
  --surface: #fff;
  --surface-raised: #ecefee;
  --glass: rgba(255, 255, 255, 0.9);
  --panel-top: rgba(255, 255, 255, 0.8);
  --panel-bottom: rgba(236, 239, 238, 0.85);
  --text: #20282c;
  --muted: #626e74;
  --subtle: #859096;
  --line: rgba(36, 53, 61, 0.1);
  --accent: #246b80;
  --accent-strong: #246b80;
  --accent-soft: rgba(36, 107, 128, 0.08);
  --shadow: 0 12px 36px rgba(34, 36, 71, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: transparent;
  padding: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
img {
  display: block;
  width: 100%;
  object-fit: cover;
}
svg.icon {
  display: block;
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.65px;
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
small,
.caption {
  font-size: 13px;
  line-height: 1.35;
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.danger {
  color: var(--danger);
}
.text-body {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.app-shell {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--bg);
  overflow-x: clip;
  padding-top: var(--safe-top);
}
.page {
  padding-bottom: calc(114px + var(--safe-bottom));
}
.content {
  padding: 0 var(--gutter);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.row-top {
  align-items: flex-start;
}
.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}
.section-heading:first-child {
  margin-top: 0;
}
.section-heading > button {
  flex-shrink: 0;
}
.card {
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}
.card-tight {
  padding: 5px 16px;
}
.card-link {
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-link:hover {
  background: var(--surface-raised);
}
.card > .section-heading {
  margin: 0 0 13px;
}
.button {
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  background: var(--surface-raised);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  line-height: 1.25;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.button .icon {
  width: 21px;
  height: 21px;
}
.button-primary {
}
.button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding: 6px 2px;
  min-height: 36px;
}
.button-block {
  width: 100%;
}
.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 42px;
  background: transparent;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-button:hover {
  background: var(--accent-soft);
}
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.avatar.blue {
  background: rgba(83, 147, 225, 0.2);
  color: #8abdf8;
}
.avatar.pink {
  background: rgba(200, 118, 180, 0.2);
  color: #e2a4d9;
}
.avatar-lg > span {
  font-size: 32px;
}
.avatar img {
  height: 100%;
  border-radius: inherit;
}
.avatar-sm {
  width: 34px;
  height: 34px;
}
.avatar-lg {
  width: 106px;
  height: 106px;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px rgba(208, 191, 255, 0.55);
}
.avatar-online::after {
  content: "";
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border: 2px solid var(--bg);
  border-radius: 50%;
}
.badge-icon {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge-icon.blue {
  color: #8abdf8;
  background: rgba(83, 147, 225, 0.16);
}
.badge-icon.pink {
  color: #e2a4d9;
  background: rgba(200, 118, 180, 0.15);
}
.premium {
  display: inline-flex;
  color: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
}
.premium .icon {
  width: 19px;
  height: 19px;
  fill: color-mix(in srgb, var(--accent) 25%, transparent);
}
.appbar {
  height: 58px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.appbar-title {
  font-size: 18px;
  font-weight: 650;
  flex: 1;
  text-align: center;
}
.appbar .icon-button:last-child {
  margin-left: auto;
}

.profile-identity {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 0 var(--gutter);
}
.profile-identity h1 {
  margin-bottom: 5px;
}
.profile-identity .grow {
}
.profile-bio {
  padding: 17px var(--gutter) 0;
  white-space: pre-line;
  color: var(--muted);
}
.profile-actions {
  padding: 19px var(--gutter) 0;
  display: flex;
  gap: 9px;
}
.profile-actions .button:first-child {
  flex: 1;
}
.profile-actions .icon-button {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
}
.profile-meta {
  display: flex;
  gap: 12px;
  padding: 14px var(--gutter) 0;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.profile-meta .row {
  gap: 5px;
}
.profile-meta .icon {
  width: 15px;
  height: 15px;
}
.tabs {
  display: flex;
  gap: 23px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  position: relative;
  background: none;
  padding: 17px 0 14px;
  color: var(--muted);
  flex-shrink: 0;
  font-size: 14px;
  white-space: nowrap;
}
.tab[aria-selected="true"] {
  color: var(--text);
  font-weight: 600;
}
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 -2px 11px color-mix(in srgb, var(--accent) 45%, transparent);
}
.profile-tabs {
  margin-top: 10px;
  margin-bottom: 19px;
}
.composer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
}
.composer > span:not(.avatar) {
  flex: 1;
  color: var(--muted);
}
.composer > .icon {
  color: var(--muted);
  width: 22px;
}
.post {
  padding: 15px;
}
.post-text {
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.post-media {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  border-radius: 14px;
  overflow: hidden;
}
.post-media button {
  background: var(--surface-raised);
  padding: 0;
  overflow: hidden;
}
.post-media img {
  height: 215px;
}
.post-media.multiple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.post-media.multiple img {
  height: 145px;
}
.post-footer {
  display: flex;
  align-items: center;
  margin-top: 13px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  min-height: 36px;
  border-radius: 20px;
  background: var(--surface-raised);
  border: 1px solid transparent;
  font-size: 13px;
}
.pill .icon {
  width: 18px;
  height: 18px;
}
.pill[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow: none;
}
.post-views {
  color: var(--subtle);
  display: flex;
  align-items: center;
}
.post-views .icon {
}

.collection {
  position: relative;
  width: 95px;
  height: 105px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  background: var(--surface);
}
.collection img {
  height: 100%;
}
.collection::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 20%, rgba(7, 9, 16, 0.8));
}
.collection span {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  left: 10px;
  right: 7px;
  color: #fff;
  font-size: 12px;
  text-align: left;
}

.list-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 61px;
  text-align: left;
  padding: 11px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row > .icon {
  color: var(--muted);
  flex-shrink: 0;
}
.list-row .chevron {
  width: 17px;
  height: 17px;
  margin-left: auto;
}
.list-row .grow > .muted {
  margin-top: 3px;
  font-size: 13px;
}
.list-row .row h3 {
  flex: 1;
}
.info-row {
  display: grid;
  grid-template-columns: 25px 100px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child {
  border: 0;
}
.info-row .icon {
  width: 21px;
  height: 21px;
  color: var(--muted);
}
.info-row span:last-child {
  overflow-wrap: anywhere;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  background: var(--surface-raised);
  padding: 5px 10px;
  border-radius: 18px;
  font-size: 12px;
  color: var(--muted);
}
.chip:first-child {
  color: var(--accent);
  background: var(--accent-soft);
}
.timeline {
  padding-left: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 20px;
  width: 1px;
  left: 4px;
  background: var(--line);
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -21px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.project-tile {
  position: relative;
  padding: 0;
  height: 139px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-raised);
  text-align: left;
}
.project-tile img {
  height: 100%;
}
.project-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(10, 12, 22, 0.9));
}
.project-tile > span {
  position: absolute;
  z-index: 1;
  left: 12px;
  bottom: 11px;
  right: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.project-tile small {
  display: block;
  opacity: 0.7;
  font-size: 11px;
  margin-top: 3px;
}
.toggle {
  position: relative;
  width: 46px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  padding: 3px;
}
.toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}
.toggle[aria-checked="true"] {
  background: var(--accent-strong);
}
.toggle[aria-checked="true"]::after {
  transform: translateX(17px);
}
.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  display: grid;
}
.nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: none;
  color: var(--muted);
}
.nav-item .icon {
  width: 30px;
  height: 30px;
}
.nav-item[aria-current="page"] {
}
.nav-item[aria-current="page"] .icon {
  filter: drop-shadow(0 0 7px rgba(168, 131, 251, 0.3));
}

.avatar-nav {
  width: 32px;
  height: 32px;
  font-size: 10px;
  box-shadow: 0 0 0 1px var(--line);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
}
.search-field > .icon {
  width: 20px;
  color: var(--subtle);
}
.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 0;
  outline: none;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}
.input {
  width: 100%;
  border-radius: 13px;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px;
  font-size: 16px;
  outline: none;
}
textarea.input {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}
.input:focus {
  border-color: var(--accent);
}
.input::placeholder {
  color: var(--subtle);
}
.unread {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: var(--accent-strong);
  color: #fff;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 5px;
}
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}
.empty > .icon {
  width: 35px;
  height: 35px;
  margin: 0 auto 12px;
  color: var(--accent);
}
.empty h3 {
  color: var(--text);
  margin-bottom: 6px;
}
.overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: #03060f30;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.16s ease-out;
}
.sheet {
  position: absolute;
  width: min(480px, calc(var(--app-vw, 1vw) * 100 - 32px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  animation: fade-in 0.14s ease-out;
  outline: none;
}
.sheet-compact {
  width: min(360px, calc(var(--app-vw, 1vw) * 100 - 32px));
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.sheet-header .icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  background: var(--surface-raised);
}
.sheet-header h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.sheet .stack {
  gap: 14px;
}
.sheet .list-row {
  min-height: 48px;
  padding: 11px 8px;
}
.sheet .list-row h3 {
  font-size: 13px;
}
.sheet .list-row small {
  font-size: 11px;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 6px;
}
.form-actions .button {
  flex: 1;
}
.toast {
  position: fixed;
  z-index: 80;
  bottom: calc(105px + var(--safe-bottom));
  left: 50%;
  transform: translate(-50%, 12px);
  padding: 12px 18px;
  max-width: calc(calc(var(--app-vw, 1vw) * 100) - 36px);
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
  white-space: normal;
  text-align: center;
  font-size: 14px;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  border-radius: 17px;
  overflow: hidden;
}
.media-grid button {
  padding: 0;
  background: var(--surface);
}
.media-grid img {
  aspect-ratio: 1;
}
.lightbox {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(4, 7, 13, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  width: 100%;
  height: calc(var(--app-dvh, 1dvh) * 80);
  max-width: 800px;
  object-fit: contain;
}
.lightbox .icon-button {
  position: absolute;
  top: calc(18px + var(--safe-top));
  right: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.note-preview {
  white-space: pre-line;
  font-size: 14px;
  color: var(--muted);
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-screen {
  padding-bottom: 180px;
}
.chat-screen .appbar {
  position: sticky;
  top: var(--safe-top);
  background: var(--glass);
  backdrop-filter: blur(20px);
  z-index: 10;
  height: 68px;
  border-bottom: 1px solid var(--line);
}
.chat-screen .appbar-title {
  text-align: left;
  font-size: 16px;
}
.chat-screen .appbar-title small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.chat-messages {
  padding: 24px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-date {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 9px;
  padding: 5px 12px;
  background: var(--surface);
  border-radius: 20px;
}
.bubble {
  max-width: 87%;
  align-self: flex-start;
  border-radius: 18px 18px 18px 5px;
  padding: 11px 13px 8px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.bubble.own {
  align-self: flex-end;
  border-radius: 18px 18px 5px 18px;
}
.bubble small {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.bubble small .icon {
  width: 14px;
  height: 14px;
}
.message-input {
  position: fixed;
  z-index: 15;
  width: calc(100% - 32px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
}
.message-input input {
  border: 0;
  min-width: 0;
  flex: 1;
  color: var(--text);
  background: transparent;
  outline: none;
}
.message-input .icon-button {
  background: var(--accent-strong);
}
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
}
.loading-orbit {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: orbit 0.8s linear infinite;
}
.error-screen {
  padding: calc(var(--app-dvh, 1dvh) * 30) 24px 0;
  text-align: center;
}
.error-screen .button {
  margin-top: 20px;
}
.avatar-pile {
  display: flex;
  padding-left: 8px;
}
.avatar-pile .avatar {
  border: 2px solid var(--surface);
  margin-left: -8px;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
}

.link-copy {
  display: flex;
  gap: 8px;
  align-items: center;
}
.link-copy input {
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes slide-in {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
}

@media (max-width: 359px) {
  :root {
    --gutter: 14px;
  }
  .profile-identity {
    gap: 12px;
  }
  .profile-identity h1 {
    font-size: 21px;
  }
  .avatar-lg {
    width: 92px;
    height: 92px;
  }
  .tabs {
    gap: 19px;
  }
  .profile-actions .button {
    padding: 10px 11px;
    font-size: 13px;
  }
  .info-row {
    grid-template-columns: 22px 85px minmax(0, 1fr);
    gap: 7px;
  }
  .nav-item {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Shared spacing and content utilities. */
.mt-xs {
  margin-top: 4px;
}
.mt-sm {
  margin-top: 8px;
}
.mt {
  margin-top: 12px;
}
.mt-lg {
  margin-top: 16px;
}
.card-button {
  text-align: left;
  width: 100%;
}
.text-button {
  background: none;
}
.image-preview {
}

/* Shared context, filter, story and list components. */

.segments {
  display: flex;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  gap: 3px;
}
.segments button {
  min-width: 0;
  flex: 1;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.segments button[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.filter-strip,
.story-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.filter-strip > *,
.story-strip > * {
  flex-shrink: 0;
}
.filter-strip .pill {
  font-size: 12px;
  padding: 7px 12px;
}
.filter-count {
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  min-width: 17px;
  padding: 1px 4px;
}
.context-tag {
  display: inline-block;
  max-width: 140px;
  padding: 1px 6px;
  background: var(--accent-soft);
  color: var(--muted);
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.context-tag .icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  margin-right: 4px;
}

.story-strip {
  gap: 15px;
  padding-top: 6px;
  padding-bottom: 4px;
}
.story {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  width: 59px;
  font-size: 11px;
}
.story-ring {
  display: flex;
  padding: 3px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.story[data-seen="true"] .story-ring {
  border-color: var(--line);
}
.story .avatar {
  width: 48px;
  height: 48px;
}
.story-view {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.story-view > img {
  height: min(calc(var(--app-dvh, 1dvh) * 58), 480px);
}
.story-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 50px 20px 22px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}
.story-caption p {
  margin-top: 8px;
  font-size: 18px;
}
.story-caption small {
  opacity: 0.8;
}

.chat-row {
  align-items: center;
  padding: 10px 0;
  min-height: 72px;
}
.chat-row > .avatar,
.chat-row > .badge-icon {
  margin-top: 2px;
  width: 49px;
  height: 49px;
}
.chat-row h3,
.contact-row h3 {
}
.chat-row h3 {
  font-size: var(--chat-title-size);
}
.chat-row .row {
  gap: 7px;
}
.chat-time {
  flex-shrink: 0;
  color: var(--subtle);
  font-size: 11px;
}
.chat-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: var(--chat-preview-size);
  color: var(--muted);
}
.chat-preview > .truncate {
  flex: 1;
  min-width: 0;
}
.chat-preview > .icon {
  width: 17px;
  height: 17px;
}
.chat-labels {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}
.chat-labels > .icon {
  width: 11px;
  height: 11px;
  color: var(--subtle);
}
.unread {
  flex-shrink: 0;
  min-width: 20px;
}
.unread.is-muted {
  background: var(--surface-raised);
  color: var(--muted);
}
.contact-row {
  min-height: var(--list-row-height);
  padding: 14px 0;
  gap: 14px;
}
.contact-row .grow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-row .grow > .row {
  gap: 7px;
}
.contact-row h3 {
  min-width: 0;
  font-size: var(--list-title-size);
  font-weight: 600;
}
.status-tag {
  flex-shrink: 0;
  max-width: 90px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  border-radius: 8px;
  padding: 3px 7px;
}
.status-tag.is-online {
  background: color-mix(in srgb, var(--success) 13%, transparent);
  color: color-mix(in srgb, var(--success) 55%, var(--text));
}

.chat-section.is-nested {
  margin-bottom: 6px;
}

/* Hubs reuse cards, tabs, rows and fields from the shared kit. */
.hub-context {
  background: var(--hub-backdrop, var(--bg));
  padding-bottom: 0;
}
.hub-header {
  position: relative;
  overflow: hidden;
}
.hub-cover {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0.9;
}
.hub-header::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 170px;
  right: -120px;
  top: 20px;
  border: 35px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: rotate(-28deg);
  filter: blur(4px);
  pointer-events: none;
}
.hub-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hub-header[data-backdrop="photo"]::after {
}
.hub-header[data-backdrop="photo"]::before {
  display: none;
}
.hub-header-body {
  position: relative;
  z-index: 1;
  padding: 10px var(--gutter) 18px;
}

.hub-identity {
  position: relative;
  display: flex;
  width: 100%;
  align-items: flex-start;
  text-align: left;
}
.hub-identity > .badge-icon {
  width: 66px;
  height: 66px;
  border-radius: 21px;
  background: color-mix(in srgb, var(--hub-ink, #fff) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hub-ink, #fff) 25%, transparent);
  color: inherit;
  backdrop-filter: blur(15px);
}
.hub-identity > .badge-icon .icon {
  width: 34px;
  height: 34px;
}
.hub-identity h1 {
  color: inherit;
  margin-top: 2px;
}
.hub-identity p {
  color: inherit;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 7px;
}

.hub-tabs {
  gap: 9px;
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  border-color: transparent;
}
.hub-tabs .tab {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 11px 10px 12px;
  border-radius: 12px;
  color: inherit;
  opacity: 0.77;
}
.hub-tabs .tab[aria-selected="true"] {
  opacity: 1;
}
.hub-tabs .tab[aria-selected="true"]::after {
}
.hub-tabs .icon {
  width: 18px;
  height: 18px;
}
.hub-surface {
  position: relative;
  z-index: 2;
  margin-top: -22px;
  border-radius: 28px 28px 0 0;
  min-height: calc(var(--app-dvh, 1dvh) * 65);
  padding-bottom: calc(114px + var(--safe-bottom));
  background: var(--bg);
  border-top: 1px solid color-mix(in srgb, var(--surface) 85%, transparent);
  box-shadow: 0 -5px 20px rgba(18, 29, 52, 0.035);
}
.hub-content {
  padding-top: 21px;
}

.feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #cdd2dc;
  min-height: 210px;
}
.feature-card > img {
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: -2;
}
.feature-card::after {
  position: absolute;
  content: "";
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    115deg,
    rgba(14, 19, 29, 0.91),
    rgba(22, 27, 40, 0.58)
  );
}
.feature-card h2 {
  margin-top: 9px;
  color: #d2d6df;
  font-size: 18px;
}
.feature-card p {
  margin-top: 7px;
  font-size: 12px;
  opacity: 0.87;
}
.feature-card .button {
  margin-top: 14px;
  background: rgba(38, 44, 57, 0.72);
  color: #ccd1dc;
  padding: 8px 10px;
  font-size: 12px;
  min-height: 35px;
}
.feature-grid > .card h3 {
  font-size: 16px;
}
.feature-grid > .card > .row.between {
  flex-wrap: wrap;
  gap: 6px;
}
.feature-grid > .card > .row:first-child .icon {
  width: 18px;
  height: 18px;
}
.feature-grid .button-ghost {
  font-size: 12px;
}

.folder-group {
  padding: 4px 13px 9px;
}
.folder-heading {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 9px;
  min-height: 49px;
}
.folder-heading h3 {
  flex: 1;
}
.folder-heading > .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.folder-heading > .icon:last-child {
  width: 17px;
  height: 17px;
}
.folder-children {
  padding-left: 12px;
  margin-left: 8px;
  border-left: 1px solid var(--line);
}
.folder-group .list-row h3 {
  font-size: 14px;
}
.folder-group .list-row small {
  font-size: 10px;
  flex-shrink: 0;
}
.folder-group .list-row .row {
  gap: 5px;
}
.folder-group .list-row .badge-icon {
  width: 35px;
  height: 35px;
  border-radius: 12px;
}
.document-body {
  white-space: pre-line;
}
.list-row[role="checkbox"][aria-checked="true"] .grow {
  color: var(--muted);
  text-decoration: line-through;
}
.poll-option {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  text-align: left;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.poll-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  background: var(--accent-soft);
}
.poll-option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.pinned-message {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  gap: 9px;
  border-radius: 13px;
  background: var(--accent-soft);
  text-align: left;
  margin-bottom: 8px;
}
.pinned-message > .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.pinned-message > .icon:last-child {
  margin-left: auto;
  width: 15px;
}
.pinned-message span {
  min-width: 0;
  flex: 1;
}
.pinned-message strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.pinned-message small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}
.room-message > .avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
  margin-top: 3px;
}
.room-message .bubble {
  max-width: 100%;
  white-space: normal;
  font-size: var(--message-font-size, 17px);
  padding: 10px;
}
.room-message .bubble p {
  white-space: pre-line;
}
.room-message.own {
  padding-left: 20px;
}
.message-author {
  display: block;
  color: var(--accent);
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
}
.attachment {
  display: flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 8px;
  background: var(--accent-soft);
  border-radius: 11px;
  margin-top: 8px;
}
.attachment > .badge-icon {
  width: 28px;
  height: 32px;
  border-radius: 8px;
}
.attachment .icon {
  width: 17px;
  height: 17px;
}
.attachment strong {
  display: block;
  font-size: 11px;
}
.attachment .grow > small {
  justify-content: flex-start;
  margin-top: 3px;
}
.message-reactions {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}
.message-reactions .pill {
  min-height: 27px;
  padding: 3px 7px;
  font-size: 10px;
}

.theme-preview {
  border-radius: 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}
.theme-preview .hub-header {
  padding-bottom: 23px;
}
.theme-preview .hub-header-body {
  padding: 15px 14px 25px;
}
.theme-preview .hub-identity {
  margin-top: 0;
  gap: 10px;
  align-items: center;
}
.theme-preview .hub-identity > .badge-icon {
  width: 43px;
  height: 43px;
  border-radius: 14px;
}
.theme-preview .hub-identity .icon {
  width: 24px;
  height: 24px;
}
.theme-preview .hub-identity h3 {
  font-size: 17px;
}
.theme-preview .hub-identity small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.8;
}
.theme-preview .hub-surface {
  min-height: 0;
  padding: 16px 13px;
  border-radius: 20px 20px 0 0;
}
.theme-preview .hub-surface h3 {
  font-size: 12px;
}
.theme-preview .hub-surface small {
  font-size: 10px;
}
.theme-preview .hub-surface .badge-icon {
  width: 32px;
  height: 32px;
}
.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.palette-choice {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  padding: 7px;
  border-radius: 13px;
  border: 1px solid var(--line);
  font-size: 11px;
}
.palette-choice[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.palette-swatch {
  width: 100%;
  height: 31px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
}
.palette-swatch .icon {
  width: 17px;
  height: 17px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
@media (max-width: 359px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .room-message > .avatar {
    display: none;
  }
}

/* Shared dashboard and context surfaces reuse the same cards and controls. */

#dashboard-content {
  padding-top: 22px;
  min-height: calc(var(--app-vh, 1vh) * 60);
}
#dashboard-content > .stack-lg {
  gap: 18px;
}
#dashboard-content .card:not(.card-tight):not(.metric):not(.space-card) {
  padding: 14px;
}
.context-header {
  margin-bottom: 18px;
  background: var(--context-wash, var(--accent-soft));
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  text-align: left;
}
.metric > .icon {
  color: var(--accent);
  width: 20px;
  height: 20px;
  grid-column: 2;
  grid-row: 1;
}
.metric strong {
  font-size: 27px;
  line-height: 1.1;
  font-weight: 650;
  grid-column: 1;
  grid-row: 1;
}
.metric small {
  grid-column: 1 / -1;
}

.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 12px 4px;
  font-size: 11px;
  text-align: center;
  overflow-wrap: anywhere;
}
.shortcut .badge-icon {
  width: 40px;
  height: 40px;
}
.directory-heading {
  padding: 20px 0 8px;
  font-size: 18px;
  color: var(--accent);
}
.contact-row .status-tag {
  flex-shrink: 0;
}
.metrics .card {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}

.dashboard-page {
  padding-bottom: 0;
}

.metric small {
  overflow-wrap: anywhere;
}
#dashboard-content .chat-row > .grow > small {
  display: block;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.metrics .metric {
  gap: 7px;
}
.metrics .metric strong {
  font-size: 23px;
}
.metrics .metric > .icon {
  width: 16px;
  height: 16px;
}
.metrics .metric small {
}

/* Compact shared surfaces: no hero, flat conversations, clearer glass. */

.bottom-nav {
}
.context-header {
  border-radius: 0;
  margin: 0;
  padding: 18px var(--gutter) 40px;
}
.context-header .appbar-title {
  font-size: 23px;
}

.chats-content {
}
.chats-content .search-field {
  flex: 1;
  min-width: 0;
}
.chat-list > .chat-row {
  border-bottom: 1px solid var(--line);
}
.chat-list .chat-labels {
  display: none;
}

.chat-origin {
  display: inline-block;
  color: var(--chat-tint, var(--muted));
  font-size: 9px;
  font-weight: 400;
  margin-left: 6px;
  vertical-align: middle;
}

.sheet-compact {
  max-height: calc(var(--app-dvh, 1dvh) * 72);
}
.compact-picker .list-row {
  padding: 11px 0;
  min-height: 65px;
}
.compact-picker .primary-persona {
  margin-bottom: 7px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.compact-picker .primary-persona h3 {
  color: var(--accent);
}
.compact-picker small {
  display: block;
  font-size: 11px;
}

/* Shared section headers and light glass surfaces. */
.section-header {
  position: relative;
  isolation: isolate;
}
:root[data-theme="light"] .section-header {
}
.section-header .appbar {
}
.section-header .appbar-title {
  line-height: 1.15;
}

.bottom-nav {
}

.profile-identity {
  align-items: center;
}
.profile-identity > .avatar-lg {
  width: 88px;
  height: 88px;
}
.profile-identity h1 {
  font-size: 23px;
}
.profile-bio {
  padding-top: 10px;
}
.profile-actions {
  padding-top: 13px;
}
.card {
}
.post {
}
.post-footer {
  flex-wrap: nowrap;
  gap: 5px;
}
.post-footer .pill {
}
.post-views {
  margin-left: auto;
}
.choice-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-raised);
  padding: 0 12px;
}
.choice-list .list-row {
  min-height: 46px;
}
.choice-list .list-row + .list-row {
  border-top: 1px solid var(--line);
}
.choice-list [aria-pressed="true"] {
  color: var(--accent);
}

.card.space-card {
  position: relative;
  overflow: hidden;
  padding: 13px;
}

.space-card .space-logo {
  flex-shrink: 0;
}

.space-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  overflow: hidden;
  flex-shrink: 0;
}
.space-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.space-monogram {
  background: linear-gradient(
    135deg,
    var(--accent-strong),
    color-mix(in srgb, var(--accent-strong) 50%, var(--surface))
  );
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.image-preview {
  width: 100%;
  max-height: 180px;
  border-radius: 15px;
  object-fit: cover;
}

.space-directory {
  padding-bottom: 72px;
}

.floating-action {
  position: fixed;
  z-index: 22;
  right: var(--gutter);
  bottom: calc(var(--viewport-offset) + var(--safe-bottom) + 105px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0.5px solid var(--line);
}
.floating-action .icon {
  width: 27px;
  height: 27px;
  stroke-width: 1.9;
}
.conversation-header {
  position: sticky;
  top: var(--safe-top);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
}
.conversation-header > .icon-button {
  border-radius: 25px;
}
.conversation-person {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  flex: 1;
  min-width: 0;
  padding: 6px 10px 6px 6px;
  border-radius: 28px;
  min-height: 48px;
}
.conversation-person strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-person small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.conversation-actions {
  display: flex;
  border-radius: 25px;
  padding: 2px;
}
.conversation-actions .icon-button {
  width: 31px;
  height: 40px;
  flex-basis: 31px;
}
.conversation-actions .icon {
  width: 19px;
  height: 19px;
}
.message-input {
  min-height: 56px;
  padding: 7px;
  border-radius: 32px;
  gap: 6px;
  border: 0.5px solid var(--line);
  box-shadow: 0 4px 20px #0001;
}
.message-input .icon-button {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 50%;
}
.message-input [data-action="message-attach"] {
  color: var(--muted);
  background: transparent;
}
.message-input input[name="message"] {
  font-size: 15px;
}
.message-photo {
  max-height: 280px;
  border-radius: 12px;
}
.bubble {
  box-shadow: 0 2px 8px #0001;
}
.bubble.own {
}

.hub-identity > .space-logo {
  width: 66px;
  height: 66px;
  border-radius: 21px;
}

.section-header .appbar-title {
  text-align: left;
}

/* Stable height sizes compact surfaces; fixed controls use the measured offset. */
:root {
  --app-height: var(
    --app-stable-height,
    var(--tg-viewport-stable-height, calc(var(--app-dvh, 1dvh) * 100))
  );
  --viewport-offset: max(
    0px,
    calc(calc(var(--app-dvh, 1dvh) * 100) - var(--app-height))
  );
}
.app-shell,
.chat-screen,
.loading-screen {
  min-height: var(--app-height);
}
.bottom-nav {
  bottom: calc(var(--viewport-offset) + 15px + var(--safe-bottom));
}
.message-input {
  bottom: calc(var(--viewport-offset) + 99px + var(--safe-bottom));
}
.overlay,
.lightbox {
  bottom: auto;
  height: var(--app-height);
}
.sheet {
  max-height: calc(var(--app-height) - 50px);
}
/* A single title line and a single tab indicator at the content edge. */
.section-header .appbar-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: nowrap;
}
.section-header .appbar-title small {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}

.section-header .appbar > .icon-button {
}
.section-tab-surface {
  position: relative;
  z-index: 3;
  overflow: hidden;
  isolation: isolate;
  margin-top: -22px;
  padding-top: 8px;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
}
.section-tab-surface .hub-tabs {
  color: var(--text);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.section-tab-surface .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 8px 12px;
  font-size: 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.hub-tabs .tab[aria-selected="true"] {
  background: transparent;
  color: var(--accent);
}
.hub-tabs .tab[aria-selected="true"]::after {
  bottom: 0;
  height: 2px;
  left: 7px;
  right: 7px;
  background: var(--accent);
  box-shadow: none;
  opacity: 1;
}
.main-tab-surface .hub-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
.main-tab-surface .tab {
  padding-left: 0;
  padding-right: 0;
  font-size: 10px;
}
.dashboard-page > .hub-surface,
.hub-context > .hub-surface {
  margin-top: 0;
  border-radius: 0;
  border-top: 0;
}

/* Real translucent fills; the subtle background remains visible through cards. */
.page:has(.profile-cover) {
  background: var(--bg);
}
.card,
.post,
.subprofile-card {
  border: 0.5px solid color-mix(in srgb, var(--text) 12%, transparent);
  backdrop-filter: blur(8px) saturate(105%);
  -webkit-backdrop-filter: blur(8px) saturate(105%);
}
.subprofile-card {
  padding: 10px 12px;
}

.profile-identity {
  margin-top: -54px;
}
.profile-identity .grow {
  padding-bottom: 0;
}
.profile-avatar-editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 0 4px;
}
.profile-avatar-editor .avatar-lg {
  width: 90px;
  height: 90px;
  border: 1px solid var(--line);
  border-radius: 27px;
  box-shadow: 0 5px 25px var(--accent-soft);
}
.profile-avatar-editor .button {
  font-size: 12px;
}
.subprofile-memberships {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.subprofile-memberships > .list-row {
  padding-left: 0;
  padding-right: 0;
}
.subprofile-memberships .list-row h3 {
}
.subprofile-memberships .list-row small {
}
/* Space cover and palette share a subdued tint; tabs sit on solid material. */
.hub-header {
  padding-bottom: 24px;
}
.hub-header::before {
  display: none;
}
.hub-header[data-backdrop="photo"]::after {
  background:
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--accent-strong) 44%, transparent),
      rgba(5, 10, 20, 0.24)
    ),
    linear-gradient(180deg, rgba(5, 10, 20, 0.12), rgba(5, 10, 20, 0.72));
}
.hub-header-body {
  padding-bottom: 20px;
}
.hub-identity {
  margin-top: 10px;
  gap: 12px;
}
.hub-identity h1 {
  font-size: 24px;
}
.hub-identity p {
  opacity: 0.8;
}

.hub-tab-surface {
  background: var(--bg);
}
.hub-tab-surface .hub-tabs {
  color: var(--text);
}
.hub-context .feature-card img {
  filter: saturate(0.88) brightness(0.87);
}
.hub-context .badge-icon {
}
@media (max-width: 359px) {
  .section-header .appbar-title {
    font-size: 16px;
    gap: 5px;
  }

  .section-header .appbar {
  }

}

.post-footer .pill {
  padding: 6px 7px;
  gap: 5px;
}
.post-footer .icon {
  width: 18px;
  height: 18px;
}
.post-views {
  font-size: 11px;
  gap: 4px;
}
.post-views .icon {
  width: 15px;
  height: 15px;
}

/* Dense identity cards share the same translucent material as the other surfaces. */
.subprofile-card > .row {
  gap: 7px;
}
.subprofile-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.subprofile-identity .avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.subprofile-identity h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.subprofile-identity small {
  display: block;
  font-size: 11px;
}

.subprofile-card .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  background: transparent;
}
.subprofile-card .icon-button .icon {
  width: 17px;
  height: 17px;
}
.subprofile-spaces {
  margin: 6px 0 0 45px;
  gap: 5px;
}
.subprofile-spaces .context-tag {
  font-size: 10px;
  padding: 3px 7px;
  color: var(--muted);
}
.subprofile-editor .sheet-header {
  margin-bottom: 10px;
}
.subprofile-editor .sheet-header h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}
.subprofile-editor .stack {
  gap: 10px;
}
.subprofile-editor .field {
  font-size: 12px;
  gap: 5px;
}
.subprofile-editor .input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--glass) 85%, transparent),
    color-mix(in srgb, var(--surface) 35%, transparent)
  );
  border: 0.5px solid var(--line);
}
.subprofile-editor .profile-avatar-editor {
  padding: 0;
  gap: 2px;
}
.subprofile-editor .avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 23px;
}
.subprofile-editor .profile-avatar-editor .button {
  min-height: 28px;
  font-size: 11px;
}
.subprofile-editor label.row {
  font-size: 12px;
  color: var(--muted);
}
.subprofile-editor .subprofile-memberships {
  padding-top: 10px;
}
.subprofile-memberships > h3 {
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle);
}
.subprofile-memberships > .list-row {
  min-height: 46px;
  padding: 8px 0;
}
.subprofile-memberships .list-row h3 {
  color: var(--muted);
  font-size: 13px;
}
.subprofile-memberships .list-row small {
  color: var(--subtle);
  font-size: 11px;
}
.subprofile-memberships .space-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  opacity: 0.75;
}
.participant-list .list-row {
  min-height: 60px;
  padding: 9px 0;
  gap: 10px;
  width: 100%;
  text-align: left;
  border-bottom: 0.5px solid var(--line);
}
.participant-list .avatar {
  width: 38px;
  height: 38px;
}
.participant-list h3 {
  font-size: 14px;
}
.participant-list small {
  font-size: 11px;
}
.directory-contact {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.directory-contact .contact-row {
  flex: 1;
  min-width: 0;
  border: 0;
}
.directory-contact > .icon-button {
  width: 40px;
  height: 44px;
  flex-basis: 40px;
  color: var(--muted);
  background: transparent;
}
/* A conversation ends in its composer; the application dock belongs to listings. */
#app[data-view="chat"] .chat-screen {
  padding-bottom: calc(88px + var(--safe-bottom));
}
#app[data-view="chat"] .message-input {
  bottom: calc(var(--chat-bottom, 0px) + 12px + var(--safe-bottom));
}
.message-input .icon-button {
  color: var(--text);
}

.space-conversation {
  --chrome-height: 70px;
}
.room-chat-header {
  height: 54px;
}

.room-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: calc(var(--app-height) - var(--safe-top) - 130px);
}
.room-workspace.has-topics {
  grid-template-columns: 58px minmax(0, 1fr);
}
/* Topics attach to the edge; the menu stays at the end while topics scroll. */
.room-navigation {
  position: sticky;
  top: calc(var(--safe-top) + var(--chrome-height, 64px) + 6px);
  align-self: start;
  display: flex;
  flex-direction: column;
  height: min(
    490px,
    calc(
      var(--app-height) - var(--safe-top) - var(--chrome-height, 64px) - 96px
    )
  );
  min-height: 140px;
  overflow: hidden;
  gap: 2px;
  padding: 5px 3px;
  border-radius: 0 25px 25px 0;
  border-width: 0.5px 0.5px 0.5px 0;
  box-shadow: 0 5px 18px #0002;
}
.topic-items {
  display: flex;
  flex-direction: column;
  overflow: auto;
  scrollbar-width: none;
  min-height: 0;
  flex: 1;
}
.room-navigation .topic-items button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 3px;
  min-height: 56px;
  flex-shrink: 0;
  border-radius: 17px;
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
}
.room-navigation .icon {
  width: 21px;
  height: 21px;
}
.room-navigation [aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.room-navigation > .icon-button {
  width: 100%;
  height: 38px;
  flex-basis: 38px;
  flex-shrink: 0;
  border-radius: 17px;
  background: transparent;
}
.room-navigation > .icon-button .icon {
  width: 22px;
  height: 22px;
}
.room-workspace .chat-messages {
  min-width: 0;
  padding: 14px 10px;
}
.room-workspace[data-layout="top"],
.room-workspace[data-layout="bottom"] {
  grid-template-columns: minmax(0, 1fr);
}
.room-workspace[data-layout="top"] .room-navigation,
.room-workspace[data-layout="bottom"] .room-navigation {
  flex-direction: row;
  width: calc(100% - 24px);
  margin: 0 12px;
  height: 66px;
  min-height: 66px;
  padding: 3px;
  z-index: 18;
  border-radius: 24px;
  border-width: 0.5px;
}
.room-workspace[data-layout="top"] .topic-items,
.room-workspace[data-layout="bottom"] .topic-items {
  flex-direction: row;
  min-width: 0;
}
.room-workspace[data-layout="top"] .topic-items button,
.room-workspace[data-layout="bottom"] .topic-items button {
  flex: 1;
  min-width: 66px;
  min-height: 56px;
  padding: 8px;
}
.room-workspace[data-layout="top"] .room-navigation > .icon-button,
.room-workspace[data-layout="bottom"] .room-navigation > .icon-button {
  width: 32px;
  height: 56px;
  flex-basis: 32px;
  align-self: center;
}
.room-workspace[data-layout="bottom"] .room-navigation {
  position: fixed;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  margin: 0;
  bottom: calc(var(--chat-bottom, 0px) + var(--safe-bottom) + 80px);
}
.space-conversation:has([data-layout="bottom"]) {
  padding-bottom: calc(160px + var(--safe-bottom)) !important;
}
.room-search-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  font-size: 12px;
  color: var(--muted);
}

.room-navigation button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-workspace[data-layout="top"] .room-navigation button span {
  max-width: 130px;
}
.subprofile-editor textarea.input {
  min-height: 70px;
}

/* The space identity shares one row with the circular navigation controls. */

.hub-context .card:not(.feature-card) {
}

.member-role {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 9px;
  padding: 3px 6px;
  font-size: 9px;
  flex-shrink: 0;
}


.chats-page .appbar-title {
  flex: 0 0 auto;
}

.chats-page .section-header .appbar {
}
.chats-page .section-header .appbar > .icon-button {
  flex-basis: 32px;
}
.chats-page .section-header .appbar > .icon-button .icon {
  width: 23px;
  height: 23px;
}

.hub-tab-surface .hub-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  gap: 0;
  padding: 0 8px;
}
.hub-tab-surface .hub-tabs .tab {
  min-width: 0;
  padding: 10px 1px 12px;
  font-size: 10px;
  flex-shrink: 1;
}
.hub-tab-surface .tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.access-options {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.access-options legend {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.access-options .list-row {
  min-height: 42px;
  font-size: 13px;
  padding: 8px 0;
}
.access-role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 8px 0 4px 24px;
}
.access-options:has(input[name="audience"][value="all"]:checked)
  .access-role-options {
  display: none;
}
.access-options input {
  accent-color: var(--accent);
}
@media (max-width: 359px) {
  .hub-tab-surface .hub-tabs {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    gap: 5px;
  }
  .hub-tab-surface .hub-tabs .tab {
    flex: 0 0 59px;
  }



}

.brand-mark {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}
.brand-mark img {
  height: 100%;
  object-fit: contain;
}
.section-header .main-tab-surface {
  border-radius: 0;
  background: transparent;
}
.section-header .main-tab-surface .hub-tabs {
  border-bottom: 0;
}
.section-header .main-tab-surface .tab {
}
.section-header .main-tab-surface .tab[aria-selected="true"]::after {
  border-radius: 3px;
}

.bottom-nav {
}
@media (min-width: 600px) {
  :root {
    --gutter: clamp(22px, calc(var(--app-vw, 1vw) * 3), 44px);
  }

  .space-card .space-logo {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .section-header .appbar {
    min-height: 74px;
  }
  .section-header .main-tab-surface .hub-tabs {
    grid-template-columns: repeat(5, minmax(90px, 150px));
    justify-content: start;
  }
  .section-header .main-tab-surface .tab {
    font-size: 12px;
  }
  .bottom-nav {
    width: min(660px, 90%);
  }
  .message-input {
    max-width: 1060px;
  }
  .chat-messages {
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
  }
  .room-message {
    max-width: 800px;
    width: 100%;
  }
  .room-message.own {
    align-self: flex-end;
  }
  .bubble {
    max-width: min(80%, 680px);
  }
  .profile-identity,
  .profile-bio,
  .profile-actions,
  .profile-meta {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
  }
  #profile-content {
    max-width: 1120px;
    margin: 0 auto;
  }

  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hub-tab-surface .hub-tabs {
    grid-template-columns: repeat(6, minmax(80px, 160px));
    justify-content: center;
  }
}
@media (max-width: 359px) {
  .space-card {
    padding: 10px;
  }
  .space-card .space-logo {
  }
}

#dashboard-content {
  background: var(--bg);
}
.nav-item[aria-current="page"] > .icon {
}

/* One neutral chrome for the app; only a chat persona or an opened space sets a tint. */
.settings-content {
  padding-top: 18px;
}
.page:not(.hub-context) .badge-icon {
}

/* Shared finish: graphite surfaces, clear type, one restrained accent. */
.section-header,
:root[data-theme="light"] .section-header {
  background: var(--section-background, var(--bg));
  border-bottom: 1px solid var(--line);
}
.section-header .appbar-title {
  font-weight: 750;
}
.section-header .appbar > .icon-button {
  flex-basis: 36px;
}
.section-header .appbar > .icon-button:last-child {
  margin-left: 0;
}
.section-header .main-tab-surface .hub-tabs {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.section-header .main-tab-surface .tab {
  flex: 0 0 auto;
  flex-direction: row;
  border-radius: 0;
  font-size: 11px;
  gap: 6px;
}
.section-header .main-tab-surface .tab .icon {
  width: 19px;
  height: 19px;
}
.section-header .main-tab-surface .tab[aria-selected="true"],
:root[data-theme="light"]
  .section-header
  .main-tab-surface
  .tab[aria-selected="true"] {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}
.section-header .main-tab-surface .tab[aria-selected="true"]::after {
  left: 7px;
  right: 7px;
  height: 2px;
  width: auto;
  background: var(--accent);
  box-shadow: none;
}
.card,
.post,
.subprofile-card,
.card.space-card,
.hub-context .card:not(.feature-card) {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 3px 14px #0000000a;
}
.page:not(.hub-context) .badge-icon {
  background: var(--surface-raised);
  color: var(--muted);
  box-shadow: none;
}
.sheet {
  background: var(--surface);
  box-shadow: 0 14px 50px #0005;
}
.input {
  background: var(--surface-raised);
}
.button-primary,
.floating-action {
}
.hub-context .button-primary,
.hub-context .floating-action {
  background: var(--accent-strong);
  color: #fff;
}
.bubble {
  background: var(--surface);
  border: 1px solid var(--line);
}
.bubble.own {
  background: color-mix(in srgb, var(--accent-strong) 24%, var(--surface));
}
.bottom-nav,
:root[data-theme="light"] .bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr)) 25px;
  padding-right: 3px;
  border-color: var(--line);
}
.nav-item {
  position: relative;
}
.nav-item[aria-current="page"] {
}
.nav-item[aria-current="page"] > .icon {
  filter: none;
}
.nav-item[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: none;
}
.nav-shorts > .icon {
  width: 28px;
  height: 28px;
  padding: 2px;
  color: inherit;
  background: transparent;
  box-shadow: none;
}
.nav-overflow {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.nav-overflow .icon {
  width: 20px;
  height: 20px;
}
.nav-overflow[aria-current="page"] {
}

.metrics .metric {
  padding: 12px 5px;
}
.metrics .metric small {
  font-size: clamp(8px, calc(var(--app-vw, 1vw) * 2.3), 10px);
  letter-spacing: -0.15px;
  white-space: nowrap;
  overflow-wrap: normal;
}

/* A short is one continuous cover, with text and actions inside its safe bounds. */
.shorts-page {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(99px + var(--safe-bottom));
}
.shorts-page > .section-header {
  flex-shrink: 0;
  padding-bottom: 8px;
}
.shorts-page #dashboard-content {
  flex: 1;
  display: flex;
  min-height: 0;
  padding: 0;
  border: 0;
}
.short-feed {
  position: relative;
  flex: 1;
  min-height: 0;
  width: calc(100% - 28px);
  max-width: 620px;
  margin: 12px 12px 0 16px;
  padding: 0 5px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.short-feed::-webkit-scrollbar {
  display: none;
}
.short-card {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 0;
  margin-bottom: 20px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: 24px;
  color: #edf1f3;
  --short-accent: #a9d8e4;
  touch-action: pan-y pinch-zoom;
}
.short-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12px -4px 12px 10px;
  border: 1px solid #ffffff12;
  border-radius: inherit;
  background: #25292d;
}
.short-paper {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  border-radius: inherit;
  overflow: hidden;
  background: #111315;
  border: 1px solid #ffffff1c;
}
.short-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.short-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}
.short-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #0006 0%,
    #00000008 25%,
    #0003 40%,
    #000b 65%,
    #0b0e10eb 90%,
    #0b0e10f5
  );
}
.short-card[data-opening="false"] .short-art {
  opacity: 0.3;
}
.short-source {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  flex-shrink: 0;
  padding: 13px 15px 7px;
  text-shadow: 0 1px 8px #0008;
}
.short-source .card-link {
  flex: 1;
  min-width: 0;
  gap: 9px;
}
.short-source .card-link:hover {
  background: none;
}
.short-source .space-logo,
.short-source .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.short-source strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.short-source small {
  display: block;
  font-size: 9px;
  color: #c3cbce;
  margin-top: 2px;
}
.short-source > .icon-button {
  color: #edf1f3;
}
.short-stage {
  flex: 1;
  min-height: 0;
  padding: 14px 72px 24px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
  touch-action: pan-y;
}
.short-step-content {
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 16px;
  animation: short-arrive 0.2s ease-out;
}
.short-format {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 5px 9px;
  margin-bottom: 11px;
  border-radius: 20px;
  border: 1px solid #ffffff20;
  background: #11131580;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e1e8eb;
  font-size: 10px;
  line-height: 1.3;
}
.short-format .icon {
  width: 13px;
  height: 13px;
}
.short-format > span {
  opacity: 0.7;
}
.short-step-content h2 {
  font-family: Manrope, sans-serif;
  font-size: var(--short-title-size);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: #f1f3f2;
  text-wrap: pretty;
}
.short-prose {
  font-family: Manrope, sans-serif;
  font-size: var(--short-body-size);
  line-height: 1.6;
  color: #d0d6d8;
  margin-top: 12px;
  white-space: pre-line;
}
.short-step-content blockquote {
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--short-accent);
  color: #dce8eb;
  font-family: Lora, Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
}

.short-chapters {
  display: flex;
  gap: 7px;
  max-width: 100%;
  margin-top: 16px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x pinch-zoom;
}
.short-chapters > button {
  position: relative;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #ffffff2b;
  opacity: 0.6;
}
.short-chapters > button[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--short-accent);
}
.short-chapters img {
  height: 100%;
}
.short-chapters span {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 9px 3px 4px;
  background: linear-gradient(transparent, #111315ee);
  color: #e1e8eb;
  font-size: 8px;
  text-align: center;
}

.short-choices {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.short-choices > button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid #ffffff1c;
  border-radius: 12px;
  background: #171b1fbc;
  padding: 12px 11px;
  min-height: 44px;
  font-size: 12px;
  color: #e6ecee;
}
.short-choices strong {
  font-weight: 550;
}
.short-card[data-format="poll"] .short-choices > button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: var(--vote, 0%);
  background: #a9d8e424;
  border-radius: 11px;
  transition: width 0.3s;
}
.short-choices > button[aria-pressed="true"] {
  border-color: #a9d8e499;
}
.short-card[data-format="poll"]
  .short-choices
  > button[aria-pressed="true"]::before {
  background: #71b2c260;
}
.vote-count {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: #c7d2d6;
  font-size: 11px;
}
.vote-count .icon {
  width: 12px;
  height: 12px;
}

.short-points {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.short-points > div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.short-points .icon {
  width: 20px;
  height: 20px;
  color: var(--short-accent);
  margin-top: 2px;
}
.short-points p {
  font-size: 12px;
  line-height: 1.55;
  color: #cdd5d8;
}
.short-points b {
  font-weight: 650;
  color: #e6ecee;
}

.short-card[data-format="breakdown"] .short-points > div {
  padding: 9px 0;
  border-bottom: 1px solid #ffffff1c;
}
.short-card[data-format="breakdown"] .short-points {
  gap: 0;
}

.short-books {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}
.short-books > button {
  width: 100%;
  border-bottom: 1px solid #ffffff20;
}
.short-books img {
  width: 36px;
  height: 49px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 2px 3px 8px #0005;
}
.short-books strong {
  display: block;
  font-weight: 600;
}
.short-books small {
  display: block;
  margin-top: 4px;
}

.short-dialogue {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 15px;
}
.short-dialogue p {
  background: #ffffff0d;
  border-radius: 13px;
  padding: 11px;
  font-size: 12px;
  line-height: 1.5;
}
.short-dialogue p > span {
  display: block;
  color: var(--short-accent);
  font-size: 10px;
  margin-bottom: 4px;
}
.short-actions {
  position: absolute;
  z-index: 3;
  right: 11px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  width: 44px;
}
.short-actions > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 44px;
  min-height: 44px;
  color: #edf1f3;
  text-shadow: 0 1px 4px #000b;
}
.short-actions > button > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #11131566;
  border: 1px solid #ffffff22;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.short-actions .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.7;
}
.short-actions small {
  font-size: 10px;
  line-height: 1.2;
  color: inherit;
}
.short-actions [aria-pressed="true"] {
  color: var(--short-accent);
}
.short-actions [aria-pressed="true"] > span > .icon {
  fill: #a9d8e433;
}
.short-footer {
  flex-shrink: 0;
  padding: 12px 72px 18px 20px;
}
.short-footer .short-chapters {
  margin-top: 0;
  padding: 0;
}
.short-chapters > button {
}
.short-chapters > button > i {
  display: grid;
  place-items: center;
  height: 100%;
  background: #1c2429;
  color: #a9d8e4;
  font-style: normal;
}
.short-chapters > button > i > .icon {
  width: 22px;
  height: 22px;
  margin-top: -8px;
}
.short-voters {
  font-size: 11px;
  color: #bdc9ce;
  margin-top: 15px;
}
.short-card:focus-visible {
  outline: 2px solid var(--short-accent);
  outline-offset: -3px;
}

/* The update uses the same source, reactions and chapter controls as every short. */

.short-update[data-opening="false"] .short-art {
}
.short-source .publisher-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.update-publisher strong {
  display: flex;
  align-items: center;
  gap: 5px;
}
.update-publisher strong .icon {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  padding: 2px;
  background: var(--short-accent);
  color: #18313b;
}

/* The opening slide is one poster; its lettering is part of the artwork. */
.short-update[data-poster="true"] .short-paper {
}

.update-poster {
  width: 100%;
  height: 100%;
  object-position: center;
}

/* Reading fills the available app viewport, without changing Telegram's launch size. */
.shorts-page.is-immersive {
  padding-bottom: var(--safe-bottom);
}
.short-immersive {
  overflow: hidden;
}
.is-immersive .short-feed {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.is-immersive .short-card {
  height: 100%;
  margin: 0;
  border-radius: 0;
}
.is-immersive .short-card::before {
  display: none;
}
.is-immersive .short-paper {
  border: 0;
  border-radius: 0;
}
.short-exit.icon-button {
  position: absolute;
  z-index: 15;
  left: 13px;
  top: 14px;
  width: 36px;
  height: 36px;
  color: #edf1f3;
}
.is-immersive .short-source {
  padding-left: 60px;
  padding-top: 14px;
}

/* Creation and full text reuse the shared kit. */

.short-compose label:not(.button) {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}

.short-reader > img {
  height: 240px;
  border-radius: 18px;
  object-position: 50% 35%;
}
.short-reader-meta {
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
}
.short-reader > section {
  margin: 25px 0;
  font-family: Lora, Georgia, serif;
}
.short-reader h3 {
  font-size: 24px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 14px;
}
.short-reader p,
.short-reader li {
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
}
.short-reader blockquote {
  margin: 18px 0;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  color: var(--accent);
  font-style: italic;
}
@keyframes short-arrive {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@media (min-width: 600px) {
  .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) 33px;
  }
  .nav-item {
    font-size: 11px;
  }
  .short-feed {
    flex: 0 1 620px;
    margin: 14px auto 0;
  }
  .short-stage {
    padding-left: 30px;
    padding-right: 90px;
  }
  .short-source {
    padding: 18px 25px 8px;
    min-height: 74px;
  }
  .short-source strong {
    font-size: 14px;
  }
  .short-source small {
    font-size: 11px;
  }
  .short-source .space-logo,
  .short-source .avatar {
    width: 40px;
    height: 40px;
  }

  .short-choices > button {
    font-size: 14px;
    padding: 14px;
  }
  .short-points p {
    font-size: 14px;
  }
  .short-books strong {
    font-size: 14px;
  }
  .short-books small {
    font-size: 12px;
  }
  .short-footer {
    padding: 14px 90px 22px 30px;
  }
  .short-actions {
    right: 23px;
    bottom: 24px;
    gap: 16px;
  }

  .is-immersive .short-stage,
  .is-immersive .short-source,
  .is-immersive .short-footer {
    width: min(760px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
  .is-immersive .short-actions {
    right: max(23px, calc((100% - 760px) / 2 + 23px));
  }
}
@media (max-height: 740px) {
  .shorts-page .section-header {
    padding-top: 4px;
  }
  .shorts-page .section-header .appbar {
    min-height: 52px;
  }
  .short-source {
    padding-top: 9px;
    min-height: 53px;
  }
  .short-stage {
    padding-top: 8px;
  }

  .short-choices {
    gap: 6px;
    margin-top: 12px;
  }
  .short-choices > button {
    padding: 10px;
    font-size: 11px;
    min-height: 39px;
  }
  .short-footer {
    padding-top: 8px;
    padding-bottom: 13px;
  }
  .short-actions {
    gap: 10px;
  }
  .short-actions > button > span {
    width: 38px;
    height: 38px;
  }
  .short-points {
    gap: 10px;
    margin-top: 12px;
  }
  .short-chapters > button {
  }
}
@media (max-width: 359px) {
  .short-stage {
    padding-left: 16px;
    padding-right: 66px;
  }
  .short-footer {
    padding-left: 16px;
    padding-right: 66px;
  }
  .short-source {
    padding-left: 12px;
  }
  .short-actions {
    right: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .short-feed {
    scroll-behavior: auto;
  }
  .short-step-content {
    animation: none;
  }
}

.is-immersive .short-source {
  min-height: 64px;
}

/* Space identity follows its palette from directory to conversation. */
.card.space-card[data-space-card] {
  min-height: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--space-tint) 36%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--space-tint) 13%, var(--surface)),
    var(--surface) 85%
  );
  box-shadow: inset 3px 0 color-mix(in srgb, var(--space-tint) 70%, transparent);
}

.space-card .space-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 3px 12px #0002;
}
.space-card .space-monogram {
  background: color-mix(in srgb, var(--space-tint) 24%, var(--surface-raised));
  color: var(--space-tint);
}

.hub-header {
  background: var(--hub-backdrop);
  color: var(--hub-ink);
}
.hub-header::after {
  display: none;
}
.hub-vector {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--accent);
  opacity: 0.23;
  mask: url("assets/space-contours.svg") center/cover;
  -webkit-mask: url("assets/space-contours.svg") center/cover;
}
.hub-header .hub-header-body {
  position: relative;
  z-index: 1;
}
.hub-context .hub-surface {
  background: var(--bg);
}
/* A shared four-colour field shows through the pattern; the ground stays nearly black.
   Static approximation of Telegram's freeform / inverted-pattern wallpaper. */
.chat-screen {
  --message-font-size: 22px;
  --conversation-title-size: 23px;
  --conversation-meta-size: 16px;
  --conversation-header-height: 84px;
  --wallpaper-top-left: #f7c65b;
  --wallpaper-top-right: #e8aaa9;
  --wallpaper-bottom-left: #b487cd;
  --wallpaper-bottom-right: #7475ee;
  --wallpaper-field:
    radial-gradient(
      ellipse at top left,
      var(--wallpaper-top-left),
      transparent 72%
    ),
    radial-gradient(
      ellipse at bottom right,
      var(--wallpaper-bottom-right),
      transparent 72%
    ),
    linear-gradient(
      225deg,
      var(--wallpaper-top-right),
      var(--wallpaper-bottom-left)
    );
  /* Stronger, cleaner corners fade before the centre, which stays subdued. */
  --wallpaper-pattern-field:
    radial-gradient(
      ellipse at top left,
      var(--wallpaper-top-left),
      transparent 48%
    ),
    radial-gradient(
      ellipse at top right,
      var(--wallpaper-top-right),
      transparent 48%
    ),
    radial-gradient(
      ellipse at bottom left,
      var(--wallpaper-bottom-left),
      transparent 48%
    ),
    radial-gradient(
      ellipse at bottom right,
      var(--wallpaper-bottom-right),
      transparent 48%
    ),
    radial-gradient(
      ellipse at top left,
      color-mix(in srgb, var(--wallpaper-top-left) 82%, transparent),
      transparent 72%
    ),
    radial-gradient(
      ellipse at bottom right,
      color-mix(in srgb, var(--wallpaper-bottom-right) 82%, transparent),
      transparent 72%
    ),
    linear-gradient(
      225deg,
      color-mix(in srgb, var(--wallpaper-top-right) 82%, transparent),
      color-mix(in srgb, var(--wallpaper-bottom-left) 82%, transparent)
    );
  --wallpaper-pattern-strength: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.52),
    rgba(0, 0, 0, 0.36) 22%,
    rgba(0, 0, 0, 0.36) 78%,
    rgba(0, 0, 0, 0.52)
  );
  --message-own-top: #a24b97;
  --message-own-bottom: #6c51be;
  --message-own-background: linear-gradient(
    to bottom,
    var(--message-own-top),
    var(--message-own-bottom)
  );
}
[data-hub-palette="ice"] .chat-screen {
  --wallpaper-top-left: #74dfd2;
  --wallpaper-top-right: #a1d8f2;
  --wallpaper-bottom-left: #a29ddb;
  --wallpaper-bottom-right: #648ae8;
  --message-own-top: #3675aa;
  --message-own-bottom: #685cc1;
}
[data-hub-palette="ocean"] .chat-screen {
  --wallpaper-top-left: #67c8ed;
  --wallpaper-top-right: #a7baf5;
  --wallpaper-bottom-left: #7abacb;
  --wallpaper-bottom-right: #737de7;
  --message-own-top: #416fb7;
  --message-own-bottom: #6c58bc;
}
[data-hub-palette="lavender"] .chat-screen {
  --wallpaper-top-left: #d0a4f4;
  --wallpaper-top-right: #e8b2d0;
  --wallpaper-bottom-left: #a9a1de;
  --wallpaper-bottom-right: #7b83ed;
  --message-own-top: #9e4ea9;
  --message-own-bottom: #6f5dc1;
}
[data-hub-palette="sage"] .chat-screen {
  --wallpaper-top-left: #c5db86;
  --wallpaper-top-right: #9cd9b8;
  --wallpaper-bottom-left: #8fb7c0;
  --wallpaper-bottom-right: #54b9a9;
  --message-own-top: #2b7262;
  --message-own-bottom: #2e7486;
}
[data-hub-palette="dawn"] .chat-screen {
  --wallpaper-top-left: #f3bb8c;
  --wallpaper-top-right: #efacba;
  --wallpaper-bottom-left: #c692c7;
  --wallpaper-bottom-right: #9985df;
  --message-own-top: #b1527d;
  --message-own-bottom: #8154b7;
}
[data-hub-palette="sand"] .chat-screen {
  --wallpaper-top-left: #f7c65b;
  --wallpaper-top-right: #e8aaa9;
  --wallpaper-bottom-left: #b487cd;
  --wallpaper-bottom-right: #7475ee;
  --message-own-top: #a24b97;
  --message-own-bottom: #6c51be;
}
.chat-screen,
.space-conversation {
  position: relative;
  isolation: isolate;
  min-height: var(--chat-layout-height, calc(var(--app-dvh, 1dvh) * 100));
  background: #050608;
}
.chat-screen::before,
.chat-screen::after {
  content: "";
  position: fixed;
  top: var(--chat-top, 0px);
  left: 0;
  right: 0;
  height: var(--chat-height, calc(var(--app-dvh, 1dvh) * 100));
  pointer-events: none;
  background: var(--wallpaper-field);
}
.chat-screen::before {
  z-index: -1;
  background: var(--wallpaper-pattern-field);
  mask:
    url("assets/harry-potter-pattern.svg?v=10") 0 0/660px auto repeat,
    var(--wallpaper-pattern-strength) 0 0/100% 100% no-repeat;
  -webkit-mask:
    url("assets/harry-potter-pattern.svg?v=10") 0 0/660px auto repeat,
    var(--wallpaper-pattern-strength) 0 0/100% 100% no-repeat;
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  mask-mode: alpha;
}
.chat-screen::after {
  z-index: -2;
  opacity: 0.015;
}
:root[data-theme="light"] .chat-screen {
  --wallpaper-pattern-strength: linear-gradient(#000, #000);
  background: var(--bg);
}
:root[data-theme="light"] .chat-screen::before {
  background: var(--accent);
  opacity: 0.12;
}
:root[data-theme="light"] .chat-screen::after {
  display: none;
}
.chat-screen .bubble {
  --bubble-background: color-mix(in srgb, var(--surface) 94%, transparent);
  position: relative;
  isolation: isolate;
  border-radius: 18px 18px 18px 0;
  font-size: var(--message-font-size);
  font-weight: 400;
  line-height: 1.35;
  padding: 12px 14px 10px;
  background: none;
  border: 0;
  box-shadow: none;
}
.chat-screen .bubble small {
  font-size: 14px;
  line-height: 1.3;
}
.chat-screen .message-input input:not([type="file"]) {
  font-size: var(--message-font-size);
}
.chat-screen .bubble.own {
  --bubble-background: var(--message-own-background);
  background: none;
  border-radius: 18px 18px 0 18px;
  color: #fff;
  border: 0;
  box-shadow: none;
}
.chat-screen .bubble.own > small,
.chat-screen .bubble.own .forwarded-label {
  color: #fff;
}
/* Conversation type and controls share one scale; the rest of the app stays unchanged. */
.chat-screen {
  font-family: var(--conversation-font-family);
}
.chat-screen.space-conversation {
  --chrome-height: var(--conversation-header-height);
}
.chat-screen .conversation-header {
  min-height: var(--conversation-header-height);
  height: auto;
  gap: 8px;
  padding: 10px 12px;
}
.chat-screen .conversation-header > .icon-button {
  width: 60px;
  height: 64px;
  flex-basis: 60px;
}
.chat-screen .conversation-person {
  min-height: 64px;
  padding: 6px 12px 6px 6px;
  gap: 10px;
  border-radius: 34px;
}
.chat-screen .conversation-person > .avatar,
.chat-screen .conversation-person > .badge-icon {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}
.chat-screen .conversation-person > .grow {
  overflow: hidden;
}
.chat-screen .conversation-actions {
  padding: 2px;
  border-radius: 34px;
}
.chat-screen .conversation-actions .icon-button {
  width: 48px;
  height: 60px;
  flex-basis: 48px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-screen .conversation-header .icon {
  width: 26px;
  height: 26px;
}
.chat-screen .message-input {
  min-height: 64px;
}
.chat-screen .message-input .icon-button {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
.chat-screen .bubble[data-action="message-actions-menu"] {
  cursor: pointer;
}
.chat-screen .bubble[data-action="message-actions-menu"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.chat-screen .message-reactions:empty {
  display: none;
}
.chat-screen
  :is(
    .conversation-person,
    .conversation-actions,
    .conversation-header > .icon-button,
    .message-input
  ) {
  background: var(--floating-glass-background);
  border: 0.5px solid var(--floating-glass-edge);
  box-shadow: var(--floating-glass-shadow);
  backdrop-filter: blur(var(--floating-glass-blur)) saturate(125%);
  -webkit-backdrop-filter: blur(var(--floating-glass-blur)) saturate(125%);
}
/* Paint the rounded body and its tail once, through one continuous mask.
   This keeps the bottom edge level and the gradient/opacity seamless at the join. */
.chat-screen .bubble {
  --bubble-outline:
    linear-gradient(#000 0 0) left 18px top 0/calc(100% - 45px) 100% no-repeat,
    linear-gradient(#000 0 0) left 0 top 18px/calc(100% - 9px) calc(100% - 36px)
      no-repeat,
    radial-gradient(circle at bottom right, #000 17.5px, transparent 18px) left
      top/18px 18px no-repeat,
    radial-gradient(circle at bottom left, #000 17.5px, transparent 18px) right
      9px top 0/18px 18px no-repeat,
    radial-gradient(circle at top right, #000 17.5px, transparent 18px) left
      bottom/18px 18px no-repeat,
    linear-gradient(#000 0 0) right 9px bottom 0/18px 18px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='20' viewBox='0 0 9 20'%3E%3Cpath fill='white' d='M0 0C0 10 2.5 16 7.8 18Q8.8 18.4 8.5 19.1Q8.2 20 6.9 20H0Z'/%3E%3C/svg%3E")
      right bottom/9px 20px no-repeat;
}
.chat-screen .bubble::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 -9px;
  pointer-events: none;
  background: var(--bubble-background);
  -webkit-mask: var(--bubble-outline);
  mask: var(--bubble-outline);
  transform: scaleX(-1);
}
.chat-screen .bubble.own::before {
  inset: 0 -9px 0 0;
  transform: none;
}
.chat-screen
  :is(.conversation-person, .room-chat-title, .helper-chat-person)
  strong {
  font-size: var(--conversation-title-size);
  font-weight: 600;
  line-height: 1.2;
}
.chat-screen
  :is(.conversation-person, .room-chat-title, .helper-chat-person)
  small {
  font-size: var(--conversation-meta-size);
  line-height: 1.35;
}
.chats-page .chat-row[data-context]:not([data-context="personal"]),
.chats-page .chat-row[data-space]:not([data-space=""]) {
  border-left: 2px solid var(--chat-row-tint, var(--line));
  padding-left: 9px;
}
@media (min-width: 600px) {
}
@media (max-width: 359px) {
  .card.space-card[data-space-card] {
    padding: 10px;
  }
  .space-card .space-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}

/* Reader chrome belongs to the viewport, never to the scrolling publications. */
body.short-view .app-shell {
  min-height: 0;
}
.shorts-page {
}
.short-view .bottom-nav {
  bottom: calc(14px + var(--safe-bottom));
}
.shorts-page.is-immersive {
}
.short-reader-frame {
  --short-accent: #a9d8e4;
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid #ffffff1c;
  border-radius: 22px;
  isolation: isolate;
  background: #111315;
}
.is-immersive .short-paper {
  padding-top: 64px;
}
.short-fixed-source {
  position: absolute;
  z-index: 12;
  left: 0;
  width: 100%;
  background: linear-gradient(#111315b3, transparent);
}
.short-fixed-source .short-source {
  width: 100%;
  min-height: 64px;
  padding: 11px 16px 10px 58px;
}
.short-fixed-actions {
  position: absolute;
  z-index: 12;
  right: 11px;
}
.short-fixed-actions .short-actions {
  position: static;
  margin: 0;
}
.short-reader-frame > .short-exit {
  z-index: 16;
  left: 12px;
}
.is-immersive .short-stage {
  padding: 12px 72px 20px 20px;
}
.is-immersive .short-footer {
  padding: 8px 72px 16px 20px;
}
.is-immersive .short-source {
  margin: 0;
}

.short-chapters > button {
  width: 43px;
  height: 52px;
}
.short-books > button > .icon {
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: #a9d8e4;
}
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}
.publication-list > li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: #e0e7e9;
}
.list-mark {
  min-width: 21px;
  color: var(--short-accent);
  flex-shrink: 0;
  font-weight: 650;
}
.list-mark > .icon {
  width: 19px;
  height: 20px;
}
.comparison {
  margin-top: 20px;
}
.comparison-tabs {
  display: flex;
  border-bottom: 1px solid #ffffff25;
  margin-bottom: 15px;
  gap: 14px;
}
.comparison-tabs > button {
  flex: 1;
  min-height: 41px;
  text-align: center;
  padding: 9px 3px;
  color: #b3c3cb;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}
.comparison-tabs > [aria-selected="true"] {
  color: #ecf3f5;
  border-color: var(--short-accent);
}
.comparison-summary {
  font-family: Lora, Georgia, serif;
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 11px;
  color: #e1edf1;
}
.comparison-argument > p:not(.comparison-summary) {
  font-size: 13px;
  line-height: 1.65;
  color: #d0dce1;
}
.comparison-argument blockquote {
  font-family: Manrope, sans-serif;
  font-style: normal;
  font-size: 12px;
  line-height: 1.6;
}
.comparison-hint {
  margin-top: 16px;
  color: #a1b6c0;
  font-size: 10px;
  line-height: 1.5;
}
.comparison-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.comparison-fields legend {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  padding: 0 5px;
}
.short-compose .segments > button {
  font-size: 10px;
  padding: 9px 5px;
}
@media (min-width: 600px) {
  .shorts-page.is-immersive {
    padding: 16px 20px max(16px, var(--safe-bottom));
  }
  .short-fixed-source .short-source {
    max-width: 760px;
    margin: 0 auto;
  }
  .short-fixed-actions {
    right: max(16px, calc((100% - 760px) / 2 + 16px));
    bottom: 20px;
  }
  .short-reader-frame > .short-exit {
    left: max(12px, calc((100% - 760px) / 2 + 12px));
  }
  .is-immersive .short-stage {
    padding-left: 30px;
    padding-right: 90px;
  }
  .is-immersive .short-footer {
    padding-left: 30px;
    padding-right: 90px;
  }
}
@media (max-height: 740px) {
  .is-immersive .short-stage {
    padding-top: 8px;
    padding-bottom: 14px;
  }
  .short-chapters > button {
    width: 34px;
    height: 42px;
  }
  .publication-list {
    gap: 11px;
    margin-top: 15px;
  }
  .publication-list > li {
    font-size: 13px;
  }
  .comparison {
    margin-top: 14px;
  }
  .comparison-tabs {
    margin-bottom: 11px;
  }
  .comparison-argument > p:not(.comparison-summary) {
    font-size: 12px;
    line-height: 1.55;
  }
}
@media (max-width: 359px) {
  .shorts-page.is-immersive {
    padding-left: 7px;
    padding-right: 7px;
  }
  .is-immersive .short-stage {
    padding-left: 15px;
    padding-right: 65px;
  }
  .is-immersive .short-footer {
    padding-left: 15px;
    padding-right: 65px;
  }
  .short-fixed-actions {
    right: 7px;
  }
  .short-fixed-source .short-source {
    padding-left: 54px;
  }
  .short-reader-frame > .short-exit {
    left: 9px;
  }
}

/* Compact shared chrome and anchored contextual actions. */
.section-header,
.shorts-page > .section-header {
  padding: 4px var(--gutter) 8px;
  border-radius: 0;
  border-bottom: 0.5px solid var(--line);
  overflow: hidden;
}
.section-header .appbar,
.chats-page .section-header .appbar {
  min-height: 64px;
  height: 64px;
  padding: 3px 0;
  gap: 12px;
}
.section-header .appbar-title,
.chats-page .appbar-title {
  font-size: 24px;
  letter-spacing: -0.4px;
  gap: 2px;
}
.section-header .appbar-title small {
  font-size: 12px;
}
.brand-mark {
  width: 26px;
  height: 26px;
}
.section-header .appbar > .icon-button,
.chats-page .section-header .appbar > .icon-button {
  aspect-ratio: 1;
}
.section-header .appbar > .icon-button .icon {
  width: 23px;
  height: 23px;
}
.section-header .main-tab-surface {
  margin: 2px calc(-1 * var(--gutter)) -8px;
  padding-top: 0;
  overflow: hidden;
}
.section-header .main-tab-surface .hub-tabs {
  gap: 7px;
  padding: 0 var(--gutter) 9px;
  scroll-padding: 0 var(--gutter);
}
.section-header .main-tab-surface .tab {
  padding: 8px 6px;
}
.section-header .main-tab-surface .tab[aria-selected="true"]::after {
  bottom: -9px;
}
.bottom-nav,
:root[data-theme="light"] .bottom-nav {
  min-height: 76px;
  padding: 5px 7px;
  border-radius: 34px;
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  backdrop-filter: blur(10px) saturate(125%);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  border: 0.5px solid color-mix(in srgb, var(--text) 14%, transparent);
  box-shadow:
    inset 0 1px #ffffff15,
    0 5px 18px #0002;
}
.nav-item {
  min-height: 64px;
  gap: 5px;
  font-size: var(--nav-label-size);
  font-weight: 500;
  line-height: 1.25;
}
.nav-item[aria-current="page"],
.nav-overflow[aria-current="page"],
.nav-overflow[aria-expanded="true"] {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}
.nav-item[aria-current="page"]::after {
  display: none;
}
.nav-overflow {
  width: 25px;
  height: 40px;
  align-self: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.context-dismiss {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: transparent;
}
.context-menu {
  position: fixed;
  z-index: 51;
  width: 308px;
  max-width: calc(calc(var(--app-vw, 1vw) * 100) - 16px);
  max-height: calc(calc(var(--app-dvh, 1dvh) * 100) - 24px);
  overflow: auto;
  padding: 6px;
  border-radius: 20px;
  font-family: var(--conversation-font-family);
  background: var(--menu-glass-background);
  backdrop-filter: blur(var(--menu-glass-blur)) saturate(125%);
  -webkit-backdrop-filter: blur(var(--menu-glass-blur)) saturate(125%);
  border: 0.5px solid var(--floating-glass-edge);
  box-shadow: var(--floating-glass-shadow);
}
.context-menu .card,
.context-menu .stack {
  padding: 0;
  gap: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.context-menu .list-row {
  min-height: 52px;
  padding: 10px 12px;
  gap: 12px;
  border: 0;
  border-radius: 12px;
}
.context-menu .list-row:not(:disabled):hover,
.context-menu .list-row:focus-visible {
  background: var(--accent-soft);
}
.context-menu .list-row[aria-checked="true"] {
  color: var(--accent);
}
.context-menu .list-row:disabled {
  opacity: 0.32;
  color: var(--muted);
  cursor: default;
}
.context-menu .list-row:disabled .badge-icon {
  color: inherit;
}
.context-menu .list-row h3 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
}
.context-menu .list-row .muted {
  font-size: 16px;
}
.context-menu .list-row > .chevron {
  display: none;
}
.context-menu .badge-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  background: transparent;
  color: var(--accent);
  border: 0;
  box-shadow: none;
}
.context-menu .badge-icon .icon {
  width: 24px;
  height: 24px;
}
.context-menu h3:not(.list-row h3) {
  font-size: 16px;
  color: var(--muted);
  padding: 8px 12px 4px;
}
.icon-button[aria-expanded="true"] {
  color: var(--accent);
}

.saved-group > h3 {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}

.chats-page > .section-header {
  position: sticky;
  top: var(--safe-top);
  z-index: 30;
}

.chats-page.is-scrolled .appbar {
  height: 44px;
  min-height: 44px;
}
.chats-content {
  padding-top: 10px;
  gap: 9px;
}
.chats-content .filter-strip {
  gap: 5px;
}
.chats-content .pill {
  padding: 5px 8px;
  min-height: 30px;
  font-size: 11px;
}
.chats-content > .row > .icon-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: transparent;
}

/* Immersive means edge to edge; controls retain their own safe-area padding. */
body.short-immersive .app-shell {
  padding-top: 0;
}
.shorts-page.is-immersive {
  padding: 0;
  height: var(--short-viewport-height, calc(var(--app-dvh, 1dvh) * 100));
}
.is-immersive .short-reader-frame {
  border: 0;
  border-radius: 0;
  width: 100%;
}
.short-reader-frame .short-paper {
  border: 0;
  border-radius: 0;
}
.short-fixed-source {
  top: var(--safe-top);
}
.short-reader-frame > .short-exit {
  top: calc(12px + var(--safe-top));
}
.short-fixed-actions {
  bottom: calc(16px + var(--safe-bottom));
}
.is-immersive .short-footer {
  padding-bottom: calc(12px + var(--safe-bottom));
}

.short-update[data-poster="true"] .short-art {
  opacity: 1;
  filter: blur(12px);
  transform: scale(1.05);
}
.short-update[data-poster="true"] .short-paper {
  background: #1d2425;
}
.update-poster {
  object-fit: contain;
}
.short-update[data-opening="false"] .short-art {
  opacity: 1;
}
.short-update[data-opening="false"] .short-art::after {
  background: linear-gradient(
    180deg,
    #0003,
    transparent 30%,
    #101517bf 52%,
    #101517f2 75%
  );
}

.short-card[data-format="collection"] .short-art::after {
  background: linear-gradient(
    180deg,
    #0005,
    transparent 20%,
    #111719dc 48%,
    #111719fa 75%
  );
}
.short-card[data-format="collection"] .short-books {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 17px;
}
.short-books > button {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 0;
  min-height: 56px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  box-shadow: none;
}
.short-books > button > img {
  width: 43px;
  height: 56px;
  flex: 0 0 43px;
  object-fit: cover;
  border-radius: 6px;
  opacity: 1;
}
.short-books > button > span {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 0;
}
.short-books strong {
  font-family: Manrope, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}
.short-books small {
  font-family: Manrope, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  color: #bbc6cb;
}
.collection-return {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 0;
  color: var(--short-accent);
  font-size: 12px;
  margin-top: 15px;
  background: transparent;
}
.collection-return .icon {
  width: 16px;
  height: 16px;
}
.guide-outline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
}
.guide-outline > button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  text-align: left;
  background: transparent;
  font-size: 13px;
}
.guide-outline b {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  height: 29px;
  border-radius: 50%;
  background: #a9d8e420;
  color: var(--short-accent);
}
.guide-outline > button:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  width: 1px;
  height: 25px;
  top: 41px;
  background: #a9d8e43a;
}
@media (max-width: 359px) {
  .section-header .appbar,
  .chats-page .section-header .appbar {
    gap: 6px;
  }
  .chats-page .appbar-title {
    font-size: 17px;
  }
}

/* Event metadata belongs to the publication, including its reader view. */
.event-compose-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.event-compose-fields > label {
  min-width: 0;
}
.event-compose-fields .input {
  width: 100%;
  min-width: 0;
}
.event-details {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--accent-soft);
}
.event-details > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.event-details > div > .icon {
  width: 18px;
  height: 20px;
  flex: 0 0 18px;
  color: var(--accent);
}
.event-timezone {
  color: var(--muted);
  font-size: 10px;
  padding-left: 27px;
  margin-top: -6px;
}
.event-details a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.event-rsvp {
  align-self: flex-start;
  min-height: 32px;
  padding: 5px 0;
  font-size: 12px;
}
.short-card[data-format="event"] .event-details,
.short-reader .event-details {
  border-color: #ffffff25;
  background: #ffffff0a;
  color: #edf2f4;
}
.short-card[data-format="event"] .event-details .icon,
.short-card[data-format="event"] .event-rsvp {
  color: var(--short-accent);
}
.short-card[data-format="event"] .event-timezone {
  color: #afc1c8;
}

.collection-item-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.collection-item-fields legend {
  padding: 0 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

/* CSS caps layout immediately while mobile resize events catch up. */
body.short-view .app-shell {
  height: min(
    var(--short-viewport-height, var(--app-height)),
    calc(var(--app-dvh, 1dvh) * 100)
  );
}
.shorts-page {
  height: calc(
    min(
        var(--short-viewport-height, var(--app-height)),
        calc(var(--app-dvh, 1dvh) * 100)
      ) -
      var(--safe-top)
  );
}

/* Raster campaign artwork fills the first short; all copy is real overlaid text. */
.short-update.poster-update > .short-paper {
  padding: 0;
  background: #0a1b2c;
  container-type: size;
}
.poster-update .update-poster-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.poster-update .update-poster-art > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  filter: brightness(0.85);
}
.poster-update .update-poster-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      #06121a26,
      transparent 32%,
      #06121a12 51%,
      #06121a99 69%,
      #06121aeb 100%
    ),
    radial-gradient(ellipse at 50% 33%, transparent 30%, #06121a35 100%);
}
.poster-update .update-poster-copy {
  position: absolute;
  z-index: 1;
  left: 23px;
  right: 73px;
  bottom: calc(84px + var(--safe-bottom));
  text-shadow: 0 2px 16px #0006;
}
.poster-update .poster-update-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9bd9ff;
  font-size: clamp(9px, 1.7cqh, 11px);
  font-weight: 650;
  letter-spacing: 0.25px;
}
.poster-update .poster-update-kicker > .icon {
  width: 14px;
  height: 14px;
}
.short-update.poster-update .update-poster-copy h2 {
  font-family: Manrope, sans-serif;
  font-size: clamp(23px, 4.5cqh, 35px);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -0.8px;
  margin: 10px 0 11px;
  color: #f6fbff;
  text-wrap: balance;
}
.poster-update .update-poster-copy h2 > strong {
  color: #9edcff;
  font-weight: inherit;
}
.poster-update .update-poster-copy > p {
  font-size: clamp(11px, 2.05cqh, 14px);
  line-height: 1.55;
  color: #e4eef6;
  margin: 0;
}
.poster-update .update-poster-copy > small {
  display: block;
  font-size: clamp(10px, 1.85cqh, 12px);
  line-height: 1.5;
  color: #acc9dd;
  margin-top: 10px;
}
.poster-update > .short-paper > .short-source {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
}
.poster-update > .short-paper > .short-footer {
  position: absolute;
  z-index: 3;
  bottom: calc(9px + var(--safe-bottom));
  left: 22px;
  right: 73px;
  padding: 0;
}
.poster-update .tutorial-chapters {
  margin: 0;
  padding: 2px 0;
  gap: 6px;
}
.poster-update .tutorial-chapters > button {
  width: 36px;
  height: 46px;
  flex: 0 0 36px;
  border-radius: 8px;
  background: #15364f;
}
.poster-update .tutorial-chapters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.chats-page > .chats-content {
  margin-top: 0;
  border-top: 0;
  border-radius: 0;
  padding-top: 8px;
}
.chats-page .story-strip {
  padding-top: 8px;
  padding-bottom: 8px;
}

/* One glass surface shared by main-page controls and conversation chrome. */
.appbar .icon-button,
.hub-header .icon-button,
.conversation-header .icon-button,
.short-exit.icon-button,
.short-source > .icon-button,
.section-header .appbar > .icon-button,
.chats-page .section-header .appbar > .icon-button {
  border-radius: 50%;
  border: 0.5px solid var(--floating-glass-edge);
  background: var(--floating-glass-background);
  backdrop-filter: blur(var(--floating-glass-blur)) saturate(125%);
  -webkit-backdrop-filter: blur(var(--floating-glass-blur)) saturate(125%);
  box-shadow: var(--floating-glass-shadow);
}
.section-header .appbar > .icon-button,
.chats-page .section-header .appbar > .icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.conversation-header > .icon-button {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}
.short-source > .icon-button {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

/* Fixed publication templates: one type scale, with a deliberate quote preset. */
.short-card {
  --short-title-size: clamp(25px, calc(var(--app-dvh, 1dvh) * 3.8), 32px);
  --short-body-size: 14px;
}
.short-card .publication-list,
.short-card .comparison-argument {
  font-family: Manrope, sans-serif;
  font-size: var(--short-body-size);
}
.short-card:is([data-format="thought"], [data-presentation="quote"])
  .short-stage {
  padding-bottom: clamp(30px, calc(var(--app-dvh, 1dvh) * 5), 48px);
}
.short-card:is([data-format="thought"], [data-presentation="quote"])
  .thought-content {
  margin: auto 0 0;
  padding-top: 0;
  text-align: center;
}
.thought-content > .short-format {
  margin-bottom: 14px;
}
.thought-quote {
  margin: 0;
}
.short-step-content.thought-content blockquote {
  border: 0;
  padding: 0;
  margin: 0;
}
.short-card:is([data-format="thought"], [data-presentation="quote"])
  .thought-quote
  h2 {
  color: #e6d0aa;
  font-family: Caveat, cursive;
  font-style: normal;
  font-size: clamp(37px, calc(var(--app-dvh, 1dvh) * 5.8), 48px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0;
  white-space: pre-line;
  text-wrap: balance;
}
.thought-quote .short-prose,
.thought-afterword {
  max-width: 30ch;
  margin: 22px auto 0;
  color: #d3dcdb;
  font:
    500 clamp(25px, calc(var(--app-dvh, 1dvh) * 3.7), 31px)/1.2 Caveat,
    cursive;
}
.short-card:is([data-format="thought"], [data-presentation="quote"])
  .short-art::after {
  background:
    linear-gradient(
      180deg,
      #0005,
      transparent 22%,
      #0b111470 46%,
      #0b1114e0 85%
    ),
    radial-gradient(ellipse at center, transparent 20%, #0006);
}
.short-card[data-format="event"] {
  --event-accent: #e7be8d;
}
.short-card[data-format="event"] .short-art::after {
  background: linear-gradient(
    180deg,
    #050b0e55,
    transparent 25%,
    #080d1040 42%,
    #080d10d9 65%,
    #080d10f2 100%
  );
}
.event-poster-content {
  padding-bottom: 18px;
  container-type: inline-size;
}
.event-poster-content > .short-format {
  color: var(--event-accent);
  border-color: #e7be8d40;
}
.event-poster-content h2 {
  white-space: normal;
  text-wrap: balance;
  font-size: clamp(18px, 7.8cqw, 27px);
}
.event-lineup {
  margin-top: 10px;
  color: var(--event-accent);
  font:
    14px/1.5 Manrope,
    sans-serif;
}
.event-when {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 26px;
  padding: 0;
  margin: 18px 0 15px;
}
.event-when > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.event-when strong {
  font:
    700 20px/1.3 Manrope,
    sans-serif;
  color: #f8f3ec;
}
.event-when small {
  font:
    11px/1.4 Manrope,
    sans-serif;
  color: #a8b4b9;
}
.event-place {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f1e3d3;
  font:
    600 13px/1.5 Manrope,
    sans-serif;
}
.event-place > .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--event-accent);
}
.event-place a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.event-poster-content .short-prose {
  margin-top: 10px;
  color: #c5cdcf;
}
.event-ticket {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  margin-top: 17px;
  border: 0.5px solid #e7be8d65;
  border-radius: 20px;
  background: #e7be8d15;
  color: #f2d4af;
  font:
    650 12px/1.4 Manrope,
    sans-serif;
  backdrop-filter: blur(9px);
}
.event-ticket > .icon {
  width: 15px;
  height: 15px;
}
.event-ticket[aria-pressed="true"] {
  background: #e7be8d2a;
}

/* Shared publication editor and compact projections of the same content. */

.publication-media-editor {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.publication-media-editor:empty {
  display: none;
}
.publication-media-editor > div {
  position: relative;
  flex: 0 0 90px;
  height: 98px;
}
.publication-media-editor img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.publication-media-editor .icon-button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 25px;
  height: 25px;
  min-height: 25px;
  background: #111c;
  color: #fff;
  border-radius: 50%;
}
.publication-media-editor .icon {
  width: 13px;
  height: 13px;
}
.publication-upload {
  align-self: flex-start;
  font-size: 12px;
}
.publication-compose label.publication-recommendations {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
}
.publication-recommendations input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.publication-recommendations small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.publication-recommendations:has(input:disabled) {
  opacity: 0.5;
}
.post {
  --short-title-size: 21px;
  --short-body-size: 14px;
}
.post-publication {
  margin-top: 15px;
  cursor: pointer;
}
.post-publication .short-step-content {
  margin: 0;
  padding-top: 0;
  animation: none;
}
.post-publication .short-format {
  color: var(--muted);
  background: var(--accent-soft);
  border-color: var(--line);
  backdrop-filter: none;
}
.post-publication h2 {
  color: var(--text);
  font-size: var(--short-title-size);
}
.post-publication .short-prose {
  color: var(--text);
  font-size: 18px;
  line-height: 1.55;
}
.publication-title {
  display: block;
  padding: 0;
  width: 100%;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  white-space: inherit;
}
.record-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
}
.record-open .icon {
  width: 13px;
  height: 13px;
}
.post-publication .record-content > .short-prose {
  margin-top: 9px;
}
.publication-cover {
  width: 100%;
  height: 175px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 15px;
}
.publication-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}
.post-publication .short-step-content blockquote {
  color: var(--text);
  border-color: var(--accent);
}
.post-publication .thought-content {
  text-align: center;
  padding: 13px 0 22px;
}
.post-publication .thought-quote h2 {
  font-family: Caveat, cursive;
  font-size: 32px;
  font-style: normal;
  line-height: 1.2;
  font-weight: 500;
  text-wrap: balance;
}
.post-publication .thought-content blockquote {
  border: 0;
  padding: 0;
}
.post-publication .thought-afterword,
.post-publication .thought-quote .short-prose {
  color: var(--muted);
}
.post-publication .comparison-summary,
.post-publication .comparison-argument p,
.post-publication .short-books small,
.post-publication .short-voters,
.post-publication .comparison-hint {
  color: var(--muted);
}
.post-publication .comparison-tabs > button {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-raised);
}
.post-publication .comparison-tabs > button[aria-selected="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.post-publication .short-choices > button {
  color: var(--text);
  background: var(--surface-raised);
}
.post-publication .short-choices > button::before {
  background: var(--accent-soft);
}
.post-publication .short-books strong {
  color: var(--text);
}
.post-publication .publication-list {
  color: var(--text);
  font-size: 14px;
}
.post-publication .list-mark,
.post-publication .guide-outline b,
.post-publication .collection-return {
  color: var(--accent);
}
.post-publication .event-poster-content {
  --event-accent: var(--accent);
  padding-bottom: 0;
}
.post-publication .event-when strong,
.post-publication .event-place {
  color: var(--text);
}
.post-publication .event-when small,
.post-publication .event-poster-content .short-prose {
  color: var(--muted);
}
.post-publication .event-ticket {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--line);
}
.short-card[data-format="record"] .short-paper {
  background: radial-gradient(ellipse at 20% 0%, #263832 0%, #141d20 60%);
}
.record-attachments {
  display: flex;
  gap: 7px;
  margin-top: 15px;
}
.record-attachments > button {
  width: 49px;
  height: 60px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #ffffff30;
}
.record-attachments img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 380px) {
}

.publication-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-soft);
  color: var(--accent);
}
.publication-placeholder .icon {
  width: 20px;
  height: 20px;
}
.short-books > button > .publication-placeholder {
  width: 43px;
  height: 56px;
  flex: 0 0 43px;
  border-radius: 6px;
}

/* Contacts share the flat header; the list starts below it, without an overlap. */
.contacts-page > .contacts-content {
  margin-top: 0;
  border-radius: 0;
  border-top: 0;
  box-shadow: none;
  padding-top: 14px;
}
.contacts-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.contacts-toolbar .search-field {
  flex: 1;
  min-width: 0;
}
.contacts-toolbar .search-field input {
  min-width: 0;
}
.contacts-toolbar .contact-tool {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  min-height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  border: 0.5px solid var(--line);
}
.contacts-toolbar .contact-tool > .icon {
  width: 23px;
  height: 23px;
}
.contacts-toolbar .contact-tool[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
}
.contact-filter-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.contact-filter-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0 3px;
}
.contact-filter-strip .chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  font-size: var(--list-label-size);
}
.contact-filter-strip .chip > .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

/* Clear status indicators and page artwork without a blanket dimming layer. */

.chat-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
}
.short-card:is(
    [data-format="guide"],
    [data-format="serial"]
  )[data-opening="false"]
  .short-art {
  opacity: 1;
}
.short-card:is([data-format="guide"], [data-format="serial"])
  .short-art::after {
  background: linear-gradient(
    180deg,
    #0005,
    transparent 22%,
    transparent 43%,
    #080d1080 68%,
    #080d10df 100%
  );
}

/* Assistants — task catalogue and context connections. Shared kit extension. */
/* Assistant surfaces extend the shared Telegram kit and inherit space themes. */
.asst-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.asst-section :is(h2, h3, p, small, strong, span) {
  overflow-wrap: anywhere;
}
.asst-section .button-ghost {
  min-height: 40px;
}
.asst-intro {
  display: block;
  padding: 1px 0 0;
}
.asst-intro > :not(.asst-mark) {
  min-width: 0;
}
.asst-intro h2 {
  margin-bottom: 5px;
  font-size: 19px;
  letter-spacing: -0.4px;
}
.asst-intro p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.asst-intro > .asst-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 13px;
}
.asst-intro > .asst-mark .icon {
  width: 21px;
  height: 21px;
}
.asst-intro:has(> .asst-mark) {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
}
.asst-intro:has(> .asst-mark) > .asst-mark {
  grid-column: 1;
  grid-row: 1 / 3;
}
.asst-intro:has(> .asst-mark) > :not(.asst-mark) {
  grid-column: 2;
}
.asst-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  align-self: flex-start;
  max-width: 100%;
}
.asst-tabs > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.asst-tabs > button:is([aria-selected="true"], [aria-pressed="true"]) {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow:
    0 1px 4px #00000010,
    inset 0 1px color-mix(in srgb, var(--text) 4%, transparent);
}
.asst-tabs > button > .asst-count {
  padding: 1px 5px;
  min-width: 18px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}
.asst-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.asst-search > .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.asst-search > input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}
.asst-search > input::placeholder {
  color: var(--subtle);
  opacity: 1;
}
.asst-search:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}
.asst-search > input:focus-visible {
  outline: none;
}
.asst-categories {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 5px;
  scrollbar-width: none;
  scroll-padding-inline: 1px;
}
.asst-categories::-webkit-scrollbar {
  display: none;
}
.asst-categories > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.asst-categories > button > .icon {
  width: 15px;
  height: 15px;
}
.asst-categories > button:is([aria-pressed="true"], [aria-selected="true"]) {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 27%, transparent);
  background: var(--accent-soft);
}
.asst-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin-bottom: 11px;
}
.asst-result-heading h3 {
  font-size: 14px;
  letter-spacing: -0.15px;
}
.asst-result-heading > :is(small, span) {
  color: var(--subtle);
  font-size: 11px;
}
.asst-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}
.asst-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.asst-card-open {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 15px 14px 12px;
  text-align: left;
  background: transparent;
}
.asst-card-open > :not(.asst-mark):not(.icon) {
  flex: 1;
  min-width: 0;
}
.asst-card-open > .icon {
  width: 15px;
  height: 15px;
  margin-top: 16px;
  color: var(--subtle);
}
.asst-card-open h3 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.25px;
}
.asst-card-open :is(p, small) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.asst-card-open small {
  display: block;
}
.asst-card-open:focus-visible {
  outline-offset: -3px;
  border-radius: 16px;
}
.asst-card-title {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.25px;
}
.asst-card-description {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.asst-mark {
  --asst-tint: var(--accent);
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--asst-tint) 22%, var(--line));
  border-radius: 15px;
  color: var(--asst-tint);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--asst-tint) 21%, var(--surface)),
    color-mix(in srgb, var(--asst-tint) 6%, var(--surface))
  );
  box-shadow: inset 0 1px color-mix(in srgb, var(--asst-tint) 12%, transparent);
}
.asst-mark > .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}
.asst-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.asst-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
}
.asst-tag > .icon {
  width: 11px;
  height: 11px;
}
.asst-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.asst-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.asst-meta .icon {
  width: 12px;
  height: 12px;
}
.asst-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: auto 14px 0;
  padding: 9px 0 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.asst-card-footer > :not(.button) {
  min-width: 0;
}
.asst-card-footer > .asst-meta {
  margin-top: 0;
  text-align: right;
}
.asst-card-footer .button {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
  font-size: 11px;
}
.asst-card-footer .button > .icon {
  width: 14px;
  height: 14px;
}

.asst-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 12px;
  text-align: center;
}
.asst-empty > .icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}
.asst-empty h3 {
  font-size: 16px;
}
.asst-empty p {
  max-width: 35ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.asst-empty .button {
  margin-top: 3px;
}

/* Store detail stays a readable sheet with open sections, rather than nested tiles. */
.asst-detail-header {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 2px 0 18px;
  overflow-wrap: anywhere;
}
.asst-detail-header > :not(.asst-mark) {
  min-width: 0;
}
.asst-detail-header h2 {
  margin: 0 0 5px;
  font-size: 23px;
  letter-spacing: -0.7px;
}
.asst-detail-header p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.asst-detail-mark {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  border-radius: 21px;
}
.asst-detail-mark > .icon {
  width: 35px;
  height: 35px;
}
.asst-detail-header .asst-meta {
  margin-top: 8px;
}
.asst-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.asst-fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 0 11px;
  text-align: center;
}
.asst-fact + .asst-fact {
  border-left: 1px solid var(--line);
}
.asst-fact:first-child {
  padding-left: 0;
}
.asst-fact:last-child {
  padding-right: 0;
}
.asst-fact strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.asst-fact small {
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.4;
}
.asst-fact > .icon {
  align-self: center;
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.asst-example {
  position: relative;
  padding: 13px 15px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 0 12px 12px 0;
  color: var(--text);
  background: var(--accent-soft);
  font-size: 12px;
  line-height: 1.65;
}
.asst-example :is(p, small) {
  line-height: 1.65;
}
.asst-example > p + p {
  margin-top: 12px;
}
.asst-example small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.asst-detail-section {
  padding: 2px 0;
  min-width: 0;
}
.asst-detail-section h3 {
  margin: 0 0 9px;
  font-size: 14px;
}
.asst-detail-section > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.asst-detail-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.asst-facts,
.asst-example,
.asst-detail-section {
  overflow-wrap: anywhere;
}

/* A connection is the assistant plus its exact place, mode, and current state. */
.asst-connected-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}
.asst-connected-card {
  padding: 0 14px;
  background: var(--surface);
  border-radius: 17px;
}
.asst-connected-card > .row {
  gap: 7px;
}
.asst-connected-card > .row > .asst-card-open {
  padding: 14px 0;
}
.asst-connected-card > .asst-connection {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.asst-connected-card > .asst-help {
  padding: 0 0 14px;
}
.asst-connection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.asst-connection:first-child {
  padding-top: 0;
}
.asst-connection-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}
.asst-connection-head > :not(.asst-mark):not(.asst-status):not(.icon-button) {
  flex: 1;
  min-width: 0;
}
.asst-connection-head .asst-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 13px;
}
.asst-connection-head .asst-mark > .icon {
  width: 22px;
  height: 22px;
}
.asst-connection-head h3 {
  font-size: 14px;
}
.asst-connection-head :is(small, p) {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.asst-connection-place {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.asst-connection-place > :is(span, button) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.asst-connection-place > span {
  display: block;
  flex: 1;
  min-width: 0;
}
.asst-connection-place strong {
  font-size: 12px;
  font-weight: 600;
}
.asst-connection-place small {
  display: block;
  margin-top: 3px;
}
.asst-connection-place > button {
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  background: var(--surface);
}
.asst-connection-place .icon {
  width: 13px;
  height: 13px;
}

.asst-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  color: var(--subtle);
  font-size: 9px;
  line-height: 1.4;
}
.asst-status::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--subtle);
}
.asst-status[data-enabled="true"] {
  color: color-mix(in srgb, var(--success) 65%, var(--text));
}
.asst-status[data-enabled="true"]::before {
  background: var(--success);
  box-shadow: 0 0 7px color-mix(in srgb, var(--success) 22%, transparent);
}
.asst-connection-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.asst-connection-actions .button {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 11px;
}
.asst-connection-actions .button .icon {
  width: 15px;
  height: 15px;
}
.asst-connection-actions > :is(small, span) {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.asst-connection-actions > .asst-meta:first-child {
  flex: 1;
  margin: 0;
}
.asst-connection-head > .asst-status {
  margin-top: 3px;
}

/* Context and activation are separate choices in the common editor sheet. */
.asst-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.asst-fieldset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.asst-fieldset > legend {
  float: none;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
.asst-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.asst-field > :is(label, h3, strong, span) {
  font-size: 13px;
  font-weight: 600;
}
.asst-field :is(input, select, textarea) {
  max-width: 100%;
  min-width: 0;
}
.asst-context-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.asst-context-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}
.asst-context-option > .icon {
  width: 17px;
  height: 17px;
}
.asst-context-option[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
}
.asst-mode-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}
.asst-mode {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 55px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-align: left;
}
.asst-mode > :not(.icon) {
  min-width: 0;
}
.asst-mode > .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--muted);
}
.asst-mode strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.asst-mode small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.asst-mode[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
}
.asst-mode[aria-pressed="true"] > .icon {
  color: var(--accent);
}
.asst-mode-indicator {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 2px;
  border: 1px solid var(--subtle);
  border-radius: 50%;
}
.asst-mode[aria-pressed="true"] > .asst-mode-indicator {
  border-color: var(--accent);
}
.asst-mode[aria-pressed="true"] > .asst-mode-indicator::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.asst-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 9px 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}
.asst-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.asst-check > :not(input) {
  min-width: 0;
}
.asst-check small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.asst-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.asst-help > .icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 3px;
  vertical-align: -2px;
  color: var(--accent);
}
.asst-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.asst-summary > .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--accent);
}
.asst-summary > :not(.icon) {
  min-width: 0;
}
.asst-summary strong {
  color: var(--text);
  font-weight: 600;
}
.asst-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.asst-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.asst-sheet-actions > .button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
  font-size: 12px;
}
.asst-danger {
  color: var(--danger);
}
.asst-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.asst-picker-list > button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 57px;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.asst-picker-list > button > :not(.icon):not(.asst-mark):not(input) {
  flex: 1;
  min-width: 0;
}
.asst-picker-list strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.asst-picker-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.asst-picker-list > button > .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.asst-picker-list > button[aria-pressed="true"] > .icon {
  color: var(--accent);
}

:root[data-theme="light"] .asst-mark {
  color: color-mix(in srgb, var(--asst-tint) 40%, var(--text));
}

@media (hover: hover) {
  .asst-card-open:hover {
    background: color-mix(in srgb, var(--surface-raised) 35%, transparent);
  }
  .asst-categories > button:hover,
  .asst-context-option:hover,
  .asst-mode:hover,
  .asst-picker-list > button:hover {
    background: var(--accent-soft);
  }
  .asst-card-footer .button:hover {
    background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  }
}
@media (min-width: 620px) {
  .asst-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .asst-section {
    gap: 20px;
  }
  .asst-search {
    max-width: 560px;
  }
  .asst-intro p {
    font-size: 13px;
  }
  .asst-categories {
    flex-wrap: wrap;
    overflow: visible;
  }
}
@media (min-width: 1100px) {
  .asst-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 359px) {
  .asst-section {
    gap: 15px;
  }
  .asst-tabs {
    align-self: stretch;
  }
  .asst-tabs > button {
    flex: 1;
    padding-inline: 8px;
    font-size: 11px;
  }
  .asst-card-open {
    gap: 10px;
    padding: 13px 11px 10px;
  }
  .asst-card-footer {
    margin-inline: 11px;
    gap: 8px;
  }
  .asst-card-footer .button {
    padding-inline: 9px;
  }
  .asst-mark {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    border-radius: 13px;
  }
  .asst-detail-header {
    gap: 12px;
  }
  .asst-detail-header h2 {
    font-size: 21px;
  }
  .asst-detail-mark {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
  }
  .asst-fact {
    padding-inline: 7px;
  }
  .asst-fact strong {
    font-size: 11px;
  }
  .asst-fact small {
    font-size: 9px;
  }
  .asst-context-option {
    padding: 9px 8px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(.asst-section, .asst-form) *,
  .asst-card,
  .asst-connection {
    scroll-behavior: auto;
    animation: none;
    transition: none;
  }
}

/* Unified tools marketplace: shared graphite / light glass kit. */
.market {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.market-kind-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}
.market-kind-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 650;
}
.market-kind-tabs button .icon {
}
.market-kind-tabs [aria-selected="true"] {
  border: 1px solid var(--line);
}
.market-sort {
  display: flex;
  align-items: center;
  color: var(--muted);
  padding: 4px;
}
.market-sort .icon {
  height: 17px;
  width: 17px;
}
.market-sort .icon:last-child {
  height: 13px;
  width: 13px;
}
.market-search {
  margin: 0;
}
.market-search .icon-button {
  width: 28px;
  height: 30px;
  flex: 0 0 28px;
}
.market-search .icon-button .icon {
  width: 16px;
  height: 16px;
}
.market-task-tags {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 0 3px;
}
.market-task-tags button {
  white-space: nowrap;
  border: 1px solid var(--line);
  color: var(--muted);
}
.market-task-tags [aria-pressed="true"] {
}
.market-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border-radius: 17px;
  border: 1px solid color-mix(in srgb, var(--market-tint) 29%, transparent);
  color: var(--market-tint);
  background:
    radial-gradient(
      ellipse at 25% 0%,
      color-mix(in srgb, var(--market-tint) 30%, transparent),
      transparent 82%
    ),
    color-mix(in srgb, var(--surface-raised) 92%, var(--market-tint));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}
.market-icon > .icon {
  height: 29px;
  width: 29px;
  stroke-width: 1.5;
}
.market-icon > b {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
}
.market-result-heading {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
}
.market-result-heading h3 {
  font-weight: 700;
}
.market-result-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.market-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.market-product {
  width: 100%;
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.market-product:first-child {
}
.market-product-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.market-product-copy > strong {
  letter-spacing: -0.2px;
  font-weight: 700;
}
.market-product-tagline {
  color: var(--muted);
}
.market-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
}
.market-rating .icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
  stroke: 0;
}
.market-installed {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}
.market-installed > .icon {
  width: 15px;
  height: 15px;
}
.market-card-chevron {
  width: 16px !important;
  height: 16px !important;
  color: var(--subtle);
}
.market-empty {
  padding: 25px 16px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}
.market-empty > .icon {
  width: 34px;
  height: 34px;
  color: var(--subtle);
}
.market-empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 340px;
  line-height: 1.6;
}
.market-sort-options {
  display: flex;
  flex-direction: column;
}
.market-sort-options button {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 4px;
  gap: 15px;
}
.market-sort-options button:last-child {
  border-bottom: 0;
}
.market-sort-options .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.market-detail-appbar {
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.market-detail-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}
.market-icon-large {
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.12);
}
.market-icon-large > .icon {
  width: 43px;
  height: 43px;
}
.market-icon-large > b {
  font-size: 42px;
}
.market-detail-section {
  border-top: 1px solid var(--line);
}
.market-detail-section > h2,
.market-section-title h2 {
  margin-bottom: 13px;
  font-weight: 700;
}
.market-body-copy {
  color: var(--muted);
}
.market-capabilities {
  flex-direction: column;
}
.market-capabilities > div {
  display: flex;
}
.market-capabilities .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  margin-top: 2px;
}
.market-review-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 15px;
}
.market-review-summary > strong {
  font-size: 44px;
  letter-spacing: -2px;
  line-height: 1;
  font-weight: 750;
}
.market-review-summary > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.market-review-summary small {
  font-size: 9px;
  color: var(--muted);
}
.market-review-stars {
  color: var(--accent);
  font-size: 17px;
  letter-spacing: 1px;
}
.market-rating-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  width: 66px;
}
.market-rating-bars > i {
  height: 3px;
  border-radius: 4px;
  position: relative;
  background: var(--line);
}
.market-rating-bars > i:before {
  content: "";
  height: 100%;
  width: var(--rating-width);
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  border-radius: 4px;
}
.market-review {
  padding: 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-raised) 60%, transparent);
  border: 1px solid var(--line);
  margin-top: 13px;
}
.market-review > div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.market-review strong {
  font-size: 12px;
}
.market-review > div > span {
  font-size: 10px;
  color: var(--accent);
  white-space: nowrap;
}
.market-review p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 8px;
}
.market-review > small {
  font-size: 10px;
  color: var(--subtle);
  display: block;
  margin-top: 9px;
}
.market-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.market-section-title > span {
  font-size: 12px;
  color: var(--muted);
}
.market-connections {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 0 13px;
  background: var(--surface);
}
.market-connections > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.market-connections > button:last-child {
  border: 0;
}
.market-connections > button > .icon {
  width: 19px;
  height: 19px;
  color: var(--accent);
}
.market-connections > button > .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.market-connections > button > span {
  flex: 1;
  min-width: 0;
}
.market-connections strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
.market-connections small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  display: block;
}
.market-connection-status {
  font-style: normal;
  font-size: 9px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, transparent);
  border-radius: 8px;
  padding: 4px 6px;
}
.market-connection-status.is-paused {
  color: var(--muted);
  background: var(--surface-raised);
}
:root[data-theme="light"] .market-icon {
  color: color-mix(in srgb, var(--market-tint) 66%, #18232e);
  background:
    radial-gradient(
      ellipse at 20% 0%,
      color-mix(in srgb, var(--market-tint) 27%, transparent),
      transparent 85%
    ),
    var(--surface);
}
@media (min-width: 650px) {
  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .market-product:nth-child(2) {
    padding-top: 2px;
  }
  .market-detail-content {
    padding-left: 28px;
    padding-right: 28px;
  }
  .market-detail-section {
    max-width: 900px;
  }
}
@media (max-width: 360px) {
  .market-kind-tabs button {
    gap: 4px;
    font-size: 11px;
  }
  .market-kind-tabs button .icon {
    width: 16px;
    height: 16px;
  }
  .market-sort {
    font-size: 10px;
  }
  .market-sort .icon {
    width: 15px;
    height: 15px;
  }
  .market-product {
    gap: 10px;
  }
  .market-product > .market-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }
  .market-icon-large {
    width: 72px;
    height: 72px;
    border-radius: 21px;
  }
}

/* Private Saved library: collections are destinations, material type is a filter. */
.saved-library {
  padding-bottom: 42px;
}
.library-search {
  width: 100%;
}
.library-search input {
  width: 100%;
  min-width: 0;
}
.library-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.library-section-heading h2 {
  font-size: 16px;
}
.library-section-heading > span {
  color: var(--muted);
  font-size: 12px;
}
.library-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.library-collection {
  position: relative;
  min-width: 0;
  min-height: 128px;
  padding: 15px;
  border-radius: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--accent-strong) 45%, var(--surface)),
    var(--surface-raised)
  );
  border: 1px solid var(--line);
  box-shadow: inset 0 1px #ffffff08;
}
.library-collection.has-cover {
  background: #20282b;
}
.library-collection-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  z-index: -2;
  transition: transform 0.2s ease;
}
.library-collection.has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #10191e20, #10191e9c 55%, #10191eed);
  z-index: -1;
}
.library-collection.has-cover .library-collection-caption {
  color: #f3f7f8;
}
.library-collection.has-cover .library-collection-caption small {
  color: #d3dce1;
}
.library-collection.has-cover .library-collection-art {
  color: #eff6f8;
  background: #1a242a55;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.library-collection-art {
  width: 34px;
  height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.library-collection-art .icon {
  width: 20px;
  height: 20px;
}
.library-collection-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  max-width: 100%;
}
.library-collection-caption strong {
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.library-collection-caption small {
  color: var(--muted);
  font-size: 11px;
}
.library-collection[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    inset 0 1px #ffffff20;
}
.library-collection-selected {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
}
.library-collection-selected .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}
.library-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.library-type-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 13px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  font-size: 13px;
}
.library-type-control > .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.library-type-control > .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.library-display {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: color-mix(in srgb, var(--surface-raised) 65%, transparent);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.library-display button {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 11px;
  color: var(--muted);
}
.library-display button .icon {
  width: 16px;
  height: 16px;
}
.library-display [aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent);
}
.library-result-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.library-result-heading h2 {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.library-result-heading > span {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.library-entries {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.library-note {
  padding: 0;
  overflow: hidden;
}
.library-note-cover {
  display: block;
  position: relative;
  width: 100%;
}
.library-note-cover img {
  height: 165px;
  width: 100%;
  object-fit: cover;
}
.library-note-cover > span {
  position: absolute;
  bottom: 9px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 8px;
  color: #fff;
  background: #10191eaa;
  font-size: 12px;
}
.library-note-cover > span .icon {
  width: 14px;
  height: 14px;
}
.library-note-open {
  display: block;
  text-align: left;
  width: 100%;
  padding: 16px 16px 10px;
}
.library-note-open h3 {
  margin-top: 5px;
  font-size: 16px;
}
.library-note-open > p {
  margin-top: 8px;
  white-space: pre-line;
  line-height: 1.55;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.library-entry-kicker {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--muted);
}
.library-entry-kicker .icon {
  width: 13px;
  height: 13px;
}
.library-memberships {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 11px;
  margin-top: 10px;
}
.library-memberships button {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 10px;
  text-align: left;
}
.library-memberships .icon {
  width: 12px;
  height: 12px;
}
.library-note > .library-memberships,
.library-note > .library-source {
  margin: 0 16px 10px;
}
.library-date {
  display: block;
  color: var(--subtle);
  font-size: 10px;
  margin-top: 10px;
}
.library-note > .library-date {
  margin: 0 16px 15px;
}
.library-source {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.library-source > .icon {
  width: 13px;
  height: 13px;
}
.library-source a {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.library-source a .icon {
  width: 11px;
  height: 11px;
}
.library-checklist-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  justify-content: space-between;
}
.library-checklist-head h3 {
  margin-top: 5px;
}
.library-checklist-head > .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin: -5px -5px 0 0;
}
.library-checklist-head > .icon-button .icon {
  width: 18px;
  height: 18px;
}
.library-progress {
  height: 3px;
  margin-top: 15px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.library-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.library-checklist-count {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 7px;
}
.library-checklist-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-height: 38px;
  padding: 9px 0;
  font-size: 13px;
  line-height: 1.4;
}
.library-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid color-mix(in srgb, var(--muted) 65%, transparent);
  border-radius: 6px;
}
.library-checkbox .icon {
  width: 13px;
  height: 13px;
}
.library-checklist-item[aria-checked="true"] {
  color: var(--muted);
}
.library-checklist-item[aria-checked="true"] .library-checkbox {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.library-checklist-item[aria-checked="true"] > span:last-child {
  text-decoration: line-through;
  text-decoration-color: var(--subtle);
}
.library-post > .library-memberships {
  margin: 0 0 7px 4px;
}
.library-entry-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.library-entry-label > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}
.library-entry-label .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.library-entry-label > small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.library-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  overflow: hidden;
  border-radius: 12px;
}
.library-media-grid > button {
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-raised);
}
.library-media-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.library-media-grid > button:only-child {
  grid-column: 1 / -1;
  aspect-ratio: 1.7;
}
.library-media-card > .library-source {
  margin-top: 12px;
}
.library-file {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.library-file-icon,
.library-link-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 49px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}
.library-file strong,
.library-file small {
  display: block;
}
.library-file strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.library-file small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.library-file > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.library-file-card > .library-source {
  margin-top: 12px;
}
.library-link-card > h3 {
  margin: 6px 0 4px;
  font-size: 14px;
}
.library-links > a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 0;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.library-links > a:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.library-link-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.library-link-mark .icon {
  width: 19px;
  height: 19px;
}
.library-links strong {
  display: block;
  font-size: 12px;
}
.library-links small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  margin-top: 3px;
  color: var(--muted);
}
.library-links > a > .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.library-group {
  margin: 0 0 23px;
}
.library-group-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 18px 0 11px;
}
.library-group-heading > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.library-group-heading .icon {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.library-group-heading h3 {
  font-size: 14px;
}
.library-group-heading > small {
  color: var(--muted);
  font-size: 11px;
}
.library-view-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: -4px 0 14px;
}
.library-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 14px;
  gap: 10px;
  color: var(--muted);
}
.library-empty > .icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  color: var(--accent);
}
.library-empty h3 {
  color: var(--text);
  font-size: 16px;
}
.library-empty p {
  max-width: 290px;
  font-size: 13px;
  line-height: 1.5;
}
.saved-library-fab {
  z-index: 23;
  background: var(--accent-strong);
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow:
    0 6px 22px #0004,
    inset 0 1px #ffffff20;
}
@media (min-width: 680px) {
  .library-collection-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .library-collection {
    min-height: 140px;
  }
  .library-controls {
    justify-content: space-between;
  }
  .library-display button {
    font-size: 12px;
    padding: 7px 12px;
  }
  .saved-library-fab {
    right: max(
      var(--gutter),
      calc((calc(var(--app-vw, 1vw) * 100) - 1000px) / 2)
    );
  }
}
@media (max-width: 359px) {
  .library-collection {
    padding: 12px;
    min-height: 119px;
    border-radius: 17px;
  }
  .library-collection-caption strong {
    font-size: 12px;
  }
  .library-collection-caption small {
    font-size: 10px;
  }
  .library-display {
    width: 100%;
  }
  .library-display button {
    flex: 1;
    font-size: 10px;
  }
  .library-result-heading h2 {
    font-size: 15px;
  }
}

/* Publication editor uses the shared app tokens inside the independent editor. */
.editor-panel .publication-compose {
  gap: 0;
  padding: 0;
}
.pub-topline {
  display: flex;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.pub-picker {
  position: relative;
  min-width: 0;
}

.pub-picker summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-raised) 70%, transparent);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.pub-picker summary::-webkit-details-marker {
  display: none;
}
.pub-picker summary::marker {
  display: none;
  content: "";
}
.pub-picker summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.pub-picker summary > span {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.pub-picker summary small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}
.pub-picker summary strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pub-picker summary > .icon:not(.pub-picker-chevron) {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  color: var(--accent);
}
.pub-picker summary .avatar,
.pub-picker summary .space-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 12px;
}
.pub-picker-chevron {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}
.pub-picker[open] {
  z-index: 6;
}
.pub-picker[open] summary {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--accent-soft);
}
.pub-picker[open] .pub-picker-chevron {
  transform: rotate(-90deg);
}
.pub-picker-menu {
  position: absolute;
  z-index: 7;
  top: calc(100% + 7px);
  left: 0;
  width: min(330px, calc(calc(var(--app-vw, 1vw) * 100) - 52px));
  max-height: min(400px, calc(var(--app-dvh, 1dvh) * 50));
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
  border-radius: 17px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow:
    0 14px 48px #0007,
    inset 0 1px 0 #fff08;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.pub-choice-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  text-align: left;
}
.pub-choice-option:hover,
.pub-choice-option:focus-visible {
  background: var(--accent-soft);
}
.pub-choice-option[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.pub-choice-option > span {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}
.pub-choice-option strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.pub-choice-option small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.pub-choice-option .avatar,
.pub-choice-option .space-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.pub-choice-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pub-choice-icon > .icon {
  width: 20px;
  height: 20px;
}
.pub-choice-check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--accent);
}
.pub-writing {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 22px 0;
}
.editor-panel .publication-compose .pub-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.pub-field > span {
  padding-left: 2px;
}
.editor-panel .publication-compose .pub-field .input {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-raised) 65%, transparent);
  border-radius: 13px;
  font-size: 14px;
  padding: 12px 13px;
}
.editor-panel .publication-compose .pub-field .input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.editor-panel .publication-compose .pub-field textarea {
  line-height: 1.65;
  resize: vertical;
  min-height: 105px;
}
.editor-panel .publication-compose .pub-field-body textarea {
  min-height: 180px;
}
.editor-panel .publication-compose .pub-record .pub-field-title .input {
  font-size: 18px;
  font-weight: 600;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.editor-panel .publication-compose .pub-record .pub-field-title .input:focus {
  box-shadow: none;
  border-color: var(--accent);
}
.editor-panel .publication-compose .pub-record .pub-field-title > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.editor-panel .publication-compose .pub-record .pub-field-body textarea {
  min-height: 190px;
  background: transparent;
  font-size: 15px;
}
.pub-format-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.pub-format-hint > .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--accent);
}
.pub-style-options,
.pub-presentation {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.pub-style-options > button,
.pub-presentation > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 37px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
}
.pub-style-options > button[aria-pressed="true"],
.pub-presentation > button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.pub-style-options .icon,
.pub-presentation .icon {
  width: 16px;
  height: 16px;
}
.pub-style-options b {
  font-size: 13px;
  line-height: 16px;
  min-width: 16px;
}
.pub-perspectives {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.editor-panel .comparison-fields,
.editor-panel .collection-item-fields {
  gap: 13px;
  border-radius: 15px;
  padding: 16px 13px 13px;
  background: color-mix(in srgb, var(--surface-raised) 25%, transparent);
}
.editor-panel .collection-fields-list {
  gap: 17px;
}
.editor-panel .publication-compose .pub-add-item {
  align-self: flex-start;
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  font-size: 12px;
}
.pub-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0 0 21px;
}
.pub-media .publication-media-editor {
  max-width: 100%;
  padding: 1px;
}
.editor-panel .publication-compose .pub-upload {
  min-height: 41px;
  margin: 0;
  padding: 10px 13px;
  border-radius: 12px;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  background: var(--accent-soft);
  font-size: 12px;
}
.pub-helper {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.pub-publishing {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
}

.editor-panel .publication-compose label.pub-recommendations {
  flex: 1;
  margin: 0;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}
.editor-panel .publication-compose label.pub-recommendations input {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  margin: 0;
}
.pub-recommendations small {
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}
.pub-submit {
  padding-top: 1px;
}
.pub-submit .form-error:empty {
  display: none;
}
.pub-submit .form-error:not(:empty) {
  margin: 0 0 12px;
  font-size: 12px;
}
.editor-panel .publication-compose .pub-publish {
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 650;
  color: #ecf5f9;
  border: 1px solid #ffffff15;
  background: color-mix(in srgb, var(--accent-strong) 88%, #23475d);
  box-shadow:
    inset 0 1px 0 #ffffff14,
    0 5px 20px #0002;
}
.editor-panel .publication-compose .pub-publish:hover {
  filter: brightness(1.08);
}
.editor-panel .publication-compose .pub-publish .icon {
  width: 19px;
  height: 19px;
}
@media (max-width: 600px) {
  .pub-topline {
    gap: 8px;
    padding-bottom: 17px;
  }
  .pub-picker summary {
    gap: 7px;
    padding: 8px 9px;
    min-height: 55px;
    border-radius: 13px;
  }
  .pub-picker summary .avatar,
  .pub-picker summary .space-logo {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .pub-picker summary strong {
    font-size: 11px;
  }
  .pub-picker summary small {
    font-size: 9px;
  }
  .pub-writing {
    gap: 16px;
    padding-top: 19px;
  }
  .pub-perspectives {
    grid-template-columns: minmax(0, 1fr);
  }
  .pub-publishing {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .editor-panel .publication-compose label.pub-recommendations {
    padding: 0 2px;
  }
  .editor-panel .publication-compose .pub-field .input {
    font-size: 16px;
  }
  .editor-panel .publication-compose .pub-field-body textarea {
    min-height: 160px;
  }
  .pub-style-options {
    gap: 6px;
  }
  .pub-style-options > button {
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pub-picker-chevron {
    transition: none;
  }
}

/* Shared glass actions, private editors and message quick tools. */
.button-primary,
.floating-action {
  color: #f2f8fa;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent-strong) 84%, var(--accent)),
    var(--accent-strong)
  );
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow:
    inset 0 1px 0 #ffffff20,
    0 5px 20px color-mix(in srgb, var(--accent-strong) 18%, transparent);
}
.profile-edit {
  background: linear-gradient(
    130deg,
    var(--accent-soft),
    color-mix(in srgb, var(--glass) 80%, transparent)
  );
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  box-shadow:
    inset 0 1px #ffffff13,
    0 4px 18px #00000013;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
:is(.card, .gift-shelf).glass-panel {
  background: var(--panel-glass);
  border: 1px solid var(--panel-glass-edge);
  box-shadow: var(--panel-glass-shadow);
  backdrop-filter: blur(var(--panel-glass-blur)) saturate(1.18);
  -webkit-backdrop-filter: blur(var(--panel-glass-blur)) saturate(1.18);
}
.profile-page .wall-composer {
  padding: 15px;
}
.profile-page .post-footer > .icon-button {
  width: 30px;
  height: 32px;
  flex-basis: 30px;
  color: var(--muted);
}
.profile-page .post-footer > .icon-button > .icon {
  width: 18px;
  height: 18px;
}
.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #00000075;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.editor-panel {
  width: min(720px, 100%);
  max-height: calc(calc(var(--app-dvh, 1dvh) * 100) - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow:
    0 24px 80px #0007,
    inset 0 1px #ffffff13;
}
.editor-header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.editor-header h2 {
  font-size: 17px;
}
.editor-header .icon-button {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 50%;
}
.editor-body {
  padding: 22px;
}
.editor-body .input {
  background: color-mix(in srgb, var(--surface-raised) 75%, transparent);
  border-color: var(--line);
}
.editor-body .field {
  gap: 8px;
}
.editor-body textarea {
  resize: vertical;
}
.saved-note-source {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.saved-note-source > span {
  flex: 1;
}
.saved-note-source > .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.saved-note-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.saved-note-images img {
  height: 110px;
  border-radius: 12px;
}
.note-destination-picker {
  padding: 0;
}
.note-destination-picker > p {
  padding: 8px 12px;
  font-size: 16px;
}
.note-list-create {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  font-size: 18px;
}
.note-list-create .input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--floating-glass-edge);
  border-radius: 0;
  padding: 10px 4px;
  font-size: 18px;
}
.note-list-create .button {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  border: 0;
  box-shadow: none;
  font-size: 18px;
}
.note-list-create .form-error {
  font-size: 16px;
}
.direct-message {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  max-width: 87%;
  gap: 2px;
}
.direct-message.own {
  align-self: flex-end;
}
.direct-message > .bubble {
  max-width: 100%;
}
.forwarded-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 10px;
  margin-bottom: 5px;
}
.forwarded-label > .icon {
  width: 13px;
  height: 13px;
}
@media (max-width: 599px) {
  .editor-overlay {
    padding: 0;
  }
  .editor-panel {
    width: 100%;
    height: calc(var(--app-dvh, 1dvh) * 100);
    max-height: calc(var(--app-dvh, 1dvh) * 100);
    border: 0;
    border-radius: 0;
  }
  .editor-header {
    min-height: calc(62px + var(--safe-top));
    padding: calc(10px + var(--safe-top)) 16px 10px;
  }
  .editor-body {
    padding: 18px 16px calc(24px + var(--safe-bottom));
  }
  .profile-actions {
    gap: 7px;
  }
  .profile-actions > .icon-button {
    width: 40px;
    height: 42px;
    flex-basis: 40px;
  }
}

/* Main sections use the full width of the existing header. */
.dashboard-page > .section-header .main-tab-surface .hub-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  padding: 0 var(--gutter) 9px;
  overflow: visible;
}
.dashboard-page > .section-header .main-tab-surface .tab {
  min-width: 0;
  justify-content: center;
  gap: 6px;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 600;
}
.dashboard-page
  > .section-header
  .main-tab-surface
  .tab[aria-selected="true"]::after {
  left: 12px;
  right: 12px;
}
@media (max-width: 540px) {
  .dashboard-page > .section-header .main-tab-surface .hub-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 10px;
    padding-right: 10px;
  }
  .dashboard-page > .section-header .main-tab-surface .tab {
    font-size: clamp(13px, calc(var(--app-vw, 1vw) * 3.3), 16px);
    padding-left: 2px;
    padding-right: 2px;
  }
  .dashboard-page > .section-header .main-tab-surface .tab .icon {
    display: none;
  }
}

/* Cocoon concept uses the shared surfaces and buttons. */

@media (min-width: 700px) {
  .cocoon-nodes {
    grid-column: 1/-1;
  }
}
@media (max-width: 420px) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (hover: hover) {
}

/* Extensions: discovery, source-aware details and local prototype reviews. */
.market {
  gap: 17px;
}
.market-kind-tabs {
  gap: 5px;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--glass) 78%, transparent);
  border-color: color-mix(in srgb, var(--text) 13%, transparent);
  box-shadow:
    inset 0 1px #ffffff0a,
    0 5px 20px #0000000a;
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}
.market-kind-tabs button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 8px;
  font-size: 12px;
}
.market-kind-tabs button .icon {
  width: 17px;
  height: 17px;
}
.market-kind-tabs [aria-selected="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 75%, var(--glass));
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  box-shadow:
    inset 0 1px #ffffff12,
    0 2px 10px #0000000e;
}
.market-search {
  border-radius: 17px;
  min-height: 48px;
}
.market-search input {
  font-size: 14px;
}
.market-search .market-clear-search[hidden] {
  display: none;
}

.market-sort {
  gap: 6px;
  min-height: 40px;
  font-size: 11px;
}
.market-task-tags {
  gap: 8px;
  margin-top: -3px;
  padding-bottom: 5px;
}
.market-task-tags button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 13px;
  font-size: 11px;
  background: color-mix(in srgb, var(--glass) 68%, transparent);
  border-color: color-mix(in srgb, var(--text) 10%, transparent);
}
.market-task-tags button > .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.market-task-tags [aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.market-task-tags .market-official-filter {
  border-radius: 999px;
}
.market-installed-section {
  margin-bottom: 23px;
}
.market-result-heading {
}
.market-result-heading h3 {
  letter-spacing: -0.25px;
}
.market-text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 12px;
  min-height: 30px;
}
.market-text-action .icon {
  width: 14px;
  height: 14px;
}
.market-installed-strip {
  display: flex;
  gap: 19px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 1px 5px;
}
.market-installed-strip > button {
  flex: 0 0 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.market-installed-strip .market-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
}
.market-installed-strip > button > span:last-child {
  font-size: 10px;
  line-height: 1.4;
  width: 76px;
  overflow-wrap: anywhere;
}
.market-product {
  padding: 15px 0;
  gap: 13px;
  min-height: 91px;
}
.market-product:first-child {
  padding-top: 3px;
}
.market-product-copy {
}
.market-product-copy > strong {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  line-height: 1.3;
}
.market-product-tagline {
  font-size: 12px;
  line-height: 1.45;
}
.market-product-source {
  line-height: 1.5;
  color: var(--subtle);
}
.market-telegram-mark {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #f4faff;
  vertical-align: middle;
}
.market-telegram-mark > .icon {
  width: 10px;
  height: 10px;
  stroke-width: 3;
}
.market-cocoon-feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 194px;
  margin: 0 0 26px;
  border: 1px solid color-mix(in srgb, #a994e8 27%, var(--line));
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 90% 35%, #8e65d94d, transparent 57%),
    linear-gradient(
      118deg,
      var(--surface),
      color-mix(in srgb, #6653a5 18%, var(--surface-raised))
    );
  box-shadow: inset 0 1px #ffffff0a;
}
.market-cocoon-feature > button {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  min-height: 194px;
  padding: 21px 20px 17px;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
}
.market-feature-kicker {
  font-size: 12px;
  font-weight: 650;
  color: color-mix(in srgb, #b9a2f0 62%, var(--text));
}
.market-cocoon-feature strong {
  max-width: 68%;
  margin-top: 8px;
  font-size: 23px;
  line-height: 1.16;
  letter-spacing: -0.55px;
}
.market-feature-description {
  margin-top: 8px;
  max-width: 65%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.market-feature-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 10px;
  color: color-mix(in srgb, #c0adee 70%, var(--text));
}
.market-feature-caption > .icon {
  width: 13px;
  height: 13px;
}
.market-server-art {
  position: absolute;
  z-index: 0;
  right: 25px;
  top: 38px;
  width: 95px;
  height: 122px;
  transform: rotate(-10deg);
  pointer-events: none;
}
.market-server-art > i {
  position: absolute;
  left: 0;
  top: 0;
  width: 90px;
  height: 46px;
  border-radius: 13px;
  transform: skewY(-10deg);
  background: linear-gradient(145deg, #c1a6fa, #7954c8 45%, #35245a);
  border: 1px solid #dbc9ff7a;
  box-shadow:
    inset 0 3px 9px #fff3,
    0 11px 20px #15092d55;
}
.market-server-art > i:nth-child(1) {
  z-index: 3;
}
.market-server-art > i:nth-child(2) {
  z-index: 2;
  top: 30px;
  filter: brightness(0.86);
}
.market-server-art > i:nth-child(3) {
  z-index: 1;
  top: 60px;
  filter: brightness(0.7);
}
.market-server-art > i:after {
  content: "";
  position: absolute;
  left: 13px;
  top: 25px;
  width: 29px;
  height: 4px;
  border-radius: 4px;
  background: #d4b9ff;
  box-shadow: 39px 0 0 -1px #dbd1ff;
}
.market-server-art > span {
  position: absolute;
  z-index: 4;
  right: -12px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #bb9eff, #6a4cab);
  border: 1px solid #e9dbff5c;
  border-radius: 16px;
  color: #eee5ff;
  box-shadow:
    0 5px 17px #28104a55,
    inset 0 1px #fff4;
}
.market-server-art > span > .icon {
  width: 28px;
  height: 28px;
}

.market-detail-appbar .icon-button.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.market-icon-large {
  width: 74px;
  height: 74px;
  border-radius: 21px;
}

.market-detail-section {
  margin-top: 23px;
  padding-top: 23px;
}

.market-detail-section > h2,
.market-section-title h2 {
  font-size: 19px;
  letter-spacing: -0.35px;
}
.market-body-copy {
  font-size: 13px;
  line-height: 1.7;
}
.market-capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}
.market-capabilities > div {
  align-items: center;
  gap: 9px;
  padding: 12px 10px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--glass) 62%, transparent);
  font-size: 11px;
  line-height: 1.5;
}
.market-capability-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.market-capability-icon > .icon {
  width: 16px;
  height: 16px;
  margin: 0;
}

.market-reviews .market-section-title {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.market-reviews .market-section-title h2 {
  margin-bottom: 0;
}
.market-reviews .market-section-title .button {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 12px;
  font-size: 11px;
}
.market-reviews .market-section-title .button > .icon {
  width: 15px;
  height: 15px;
}
.market-review-form {
  padding: 0 4px 5px;
}
.market-review-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.market-review-form legend {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
}
.market-review-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.market-review-form .input {
  font-size: 14px;
  color: var(--text);
}
.market-review-rating {
  display: flex;
  gap: 7px;
}
.market-review-rating label {
  flex: 1;
  min-width: 0;
  position: relative;
}
.market-review-rating input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.market-review-rating span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 43px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 13px;
}
.market-review-rating .icon {
  width: 15px;
  height: 15px;
}
.market-review-rating input:checked + span {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
}
.market-review-rating input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:root[data-theme="light"] .market-cocoon-feature {
  background:
    radial-gradient(ellipse at 90% 35%, #b79ae65c, transparent 60%),
    linear-gradient(118deg, var(--surface), #e4dcf0);
}
:root[data-theme="light"] .market-feature-kicker,
:root[data-theme="light"] .market-feature-caption {
  color: #6d5399;
}

@media (min-width: 650px) {
  .market-kind-tabs {
    padding: 6px;
  }
  .market-kind-tabs button {
    min-height: 49px;
    font-size: 13px;
  }
  .market-task-tags {
    flex-wrap: wrap;
    overflow: visible;
  }
  .market-product-grid {
    gap: 0 27px;
  }
  .market-cocoon-feature {
    min-height: 200px;
    max-width: none;
  }
  .market-cocoon-feature > button {
    min-height: 200px;
    padding: 24px 25px;
  }
  .market-cocoon-feature strong {
    font-size: 28px;
  }
  .market-feature-description {
    font-size: 13px;
  }
  .market-server-art {
    right: 13%;
    top: 28px;
    transform: scale(1.25) rotate(-10deg);
    transform-origin: top right;
  }

  .market-icon-large {
    width: 88px;
    height: 88px;
    border-radius: 25px;
  }

  .market-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .market-capabilities > div {
    font-size: 12px;
    padding: 14px;
  }
}
@media (max-width: 400px) {
  .market-kind-tabs button {
    gap: 0;
    padding: 9px 5px;
  }
  .market-kind-tabs button > .icon {
    display: none;
  }
  .market-sort {
    font-size: 10px;
  }

  .market-icon-large {
    width: 65px;
    height: 65px;
    border-radius: 20px;
  }

  .market-capabilities {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-cocoon-feature strong {
    font-size: 21px;
  }
  .market-server-art {
    right: 13px;
    top: 45px;
    transform: scale(0.88) rotate(-10deg);
    transform-origin: top right;
  }
}

/* Profile: soft background tint and shared glass controls. */
.profile-page {
  background: var(--bg);
}
.profile-page > .profile-header {
  position: relative;
  isolation: isolate;
  background: #101417;
  padding-top: 6px;
  padding-bottom: 18px;
  --profile-control-glass: linear-gradient(
    145deg,
    rgba(208, 237, 255, 0.12),
    rgba(11, 24, 34, 0.32)
  );
  --profile-control-edge: rgba(207, 236, 251, 0.23);
}
.profile-page > .profile-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(153, 214, 232, 0.13),
    transparent 75%
  );
}
.profile-page > .profile-header .profile-identity h1 {
  color: #edf5f8;
  text-shadow: 0 1px 12px #07131acc;
}
.profile-header .profile-bio,
.profile-header .profile-identity .caption.muted,
.profile-header .profile-meta {
  color: #b7c9d4;
}
.profile-header .premium {
  color: #99d6e8;
}
.profile-page .profile-identity {
  align-items: center;
  margin-top: 0;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 4px;
  min-height: 100px;
}
.profile-page .profile-identity > .avatar-lg {
  width: 82px;
  height: 82px;
  margin-top: 0;
  border: 2px solid var(--line);
  box-shadow: none;
}
.profile-page .profile-identity > .grow {
  min-width: 0;
  padding-bottom: 0;
}
.profile-page .profile-identity h1 {
  font-size: 23px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  margin: 0 0 4px;
}
/* The same frosted material is used for profile utilities and the library card. */
.profile-header .icon-button.glass,
.profile-shortcut.glass {
  background: var(
    --profile-control-glass,
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--text) 9%, transparent),
      color-mix(in srgb, var(--surface) 32%, transparent)
    )
  );
  border: 1px solid
    var(
      --profile-control-edge,
      color-mix(in srgb, var(--text) 18%, transparent)
    );
  box-shadow:
    inset 0 1px 0 #e8f7ff20,
    inset 0 -1px 0 #0000001a,
    0 6px 20px #00000018;
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}
.profile-header .profile-utility {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  align-self: flex-start;
  margin-top: 3px;
  color: #b9e4f3;
}
.profile-header .profile-utility > .icon {
  width: 21px;
  height: 21px;
}
.profile-header .profile-actions > .icon-button.glass {
  color: #b9e4f3;
  border-radius: 15px;
}
.profile-page .profile-bio {
  padding-top: 12px;
}
.profile-page .profile-actions {
  padding-top: 16px;
}
.profile-page .profile-actions > .profile-edit {
  min-height: 44px;
}
.profile-page .profile-actions > .icon-button {
  width: 48px;
  height: 44px;
  flex-basis: 48px;
}
.profile-page .profile-tabs {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  overflow-x: auto;
}
.profile-page .profile-tabs .tab {
  text-align: center;
}
.profile-page .post-footer > .pill {
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 65%, transparent);
}
.profile-page .post-footer > .pill[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Cocoon: one dashboard and full-page setup, using the shared kit. */
.co-appbar {
  min-height: 62px;
  height: 62px;
  gap: 10px;
  max-width: 720px;
  margin: auto;
  padding: 8px var(--gutter);
}
.co-header-back {
  flex: 0 0 64px;
  color: var(--accent);
  font-size: 13px;
  text-align: left;
  min-height: 40px;
}
.co-header-back > .icon {
  width: 24px;
  height: 24px;
}
.co-appbar > span:not(.co-header-end) {
  min-width: 0;
  flex: 1;
  text-align: center;
}
.co-appbar strong {
  font-size: 18px;
  font-weight: 700;
}
.co-header-end {
  flex: 0 0 64px;
  text-align: right;
}
.co-header-end .icon-button {
  margin-left: auto;
}
.co-content {
  max-width: 720px;
  margin: auto;
  padding-top: 10px;
  padding-bottom: 110px;
}
.co-dashboard {
  display: grid;
  gap: 16px;
}
.co-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--panel-top), var(--panel-bottom));
  overflow: hidden;
  box-shadow: inset 0 1px #ffffff08;
  padding: 18px;
}

.co-growth {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  border-radius: 20px;
  padding: 5px 8px;
}
.co-growth > .icon {
  width: 13px;
  height: 13px;
}

.co-line {
  width: 100%;
  min-height: 73px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 13px 0;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.co-line:last-child {
  border-bottom: 0;
}
.co-line > .grow {
  min-width: 0;
}
.co-line strong {
  font-size: 13px;
  display: block;
  font-weight: 650;
}
.co-line small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}
.co-line > .icon:last-child {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  color: var(--subtle);
}
.co-line-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 36px;
  flex: 0 0 33px;
  color: var(--muted);
}
.co-line-icon > .icon {
  width: 23px;
  height: 23px;
}

.co-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.co-section-heading h2 {
  font-size: 20px;
}
.co-section-heading .button {
  font-size: 12px;
  min-height: 36px;
}
.co-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px;
}
.co-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.co-status-dot.is-paused {
  background: var(--subtle);
}
.co-node-heading {
  display: flex;
  gap: 14px;
  align-items: center;
}
.co-node-heading > .co-line-icon {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.co-node-heading h2 {
  font-size: 20px;
}
.co-node-state {
  display: inline-flex;
  color: var(--success);
  font-size: 11px;
  margin-top: 5px;
}
.co-node-state.is-paused {
  color: var(--muted);
}
.co-facts {
  margin-top: 18px;
}
.co-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.co-facts > div > span {
  color: var(--muted);
}
.co-facts > div > strong {
  text-align: right;
  font-weight: 550;
}
.co-wallet-heading {
  display: flex;
  gap: 12px;
  align-items: center;
}
.co-wallet-heading img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.co-wallet-heading h2 {
  flex: 1;
  font-size: 20px;
}
.co-wallet-heading .grow > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.co-wallet-heading > .icon {
  color: var(--success);
}
.co-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin: 16px 0;
}
.co-page-intro {
  padding: 12px 2px 2px;
}
.co-page-intro h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}
.co-page-intro p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin-top: 9px;
}
.co-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  margin-bottom: 15px;
}
.co-worker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.co-worker-list li {
  display: flex;
  gap: 12px;
  padding: 13px 0;
}
.co-worker-list li > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}
.co-worker-list strong {
  font-size: 14px;
}
.co-worker-list p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}
.co-requirements > div {
  display: flex;
  gap: 11px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.co-requirements > div:last-child {
  border: 0;
}
.co-requirements .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.co-requirements strong {
  display: block;
  font-size: 14px;
}
.co-requirements small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}
.co-setup-progress {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 0;
}
.co-setup-progress > span {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--subtle);
}
.co-setup-progress i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-style: normal;
}
.co-setup-progress .is-current {
  color: var(--text);
}
.co-setup-progress .is-current i {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.co-setup-progress .is-done i {
  color: var(--success);
}
.co-setup-progress .icon {
  width: 16px;
  height: 16px;
}
.co-hardware-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 16px;
}
.co-hardware-tag > .icon {
  width: 18px;
  height: 18px;
}
.co-setup-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 5px;
}
.co-setup-summary > .icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
}
.co-setup-summary > small {
  color: var(--muted);
  font-size: 12px;
}
.co-success {
  display: flex;
  align-items: center;
  text-align: center;
  flex-direction: column;
  gap: 18px;
  padding: 52px 16px 20px;
}
.co-success > span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
}
.co-success > span > .icon {
  width: 40px;
  height: 40px;
}
.co-success h2 {
  font-size: 25px;
}
.co-success p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.co-success .button {
  width: 100%;
  max-width: 310px;
}
.co-menu .co-line {
  min-height: 48px;
  padding: 7px 0;
}
@media (max-width: 359px) {
  .co-setup-progress {
    gap: 5px;
  }
  .co-setup-progress > span {
    font-size: 10px;
    gap: 4px;
  }
}

/* Store layout: uniform rows and controls placed beside the catalogue title. */
.market .market-search {
  min-height: 44px;
  border-radius: 15px;
}
.market .market-search input {
  font-size: 13px;
}
.market-heading-controls {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.market-result-heading {
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.market-result-heading h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 17px;
}
.market-heading-controls .market-sort {
  min-height: 34px;
  font-size: 10px;
  gap: 4px;
  padding: 0;
}
.market-heading-controls .market-sort .icon {
  width: 15px;
  height: 15px;
}
.market-heading-controls .market-sort .icon:last-child {
  width: 11px;
  height: 11px;
}
.market-catalog-back.icon-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: var(--muted);
}
.market-catalog-back > .icon {
  width: 17px;
  height: 17px;
}
.market-icon.has-logo {
  padding: 0;
  overflow: hidden;
  background: var(--surface-raised);
  box-shadow: none;
  border: 1px solid var(--line);
}
.market-icon.has-logo > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-product-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.market-product-metrics > span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.market-product-metrics .icon {
  width: 12px;
  height: 12px;
}
.market-product-metrics > span:first-child > .icon {
  fill: #e8bd61;
  stroke: #e8bd61;
  width: 11px;
  height: 11px;
}
.market-product-copy {
  gap: 3px;
}
.market-product-source {
  font-size: 10px;
}
.market-store-identity {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 2px 0 23px;
}
.market-store-identity .grow {
  min-width: 0;
}
.market-store-identity h1 {
  font-size: 25px;
  letter-spacing: -0.6px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.market-store-identity p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.market-store-identity small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.market-store-identity .market-open {
  flex: 0 0 auto;
  min-height: 37px;
  padding: 8px 15px;
  min-width: 85px;
  border-radius: 999px;
  font-size: 12px;
}
.market-store-identity .market-open:disabled {
  opacity: 0.4;
}
.market-store-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.market-store-facts > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-right: 1px solid var(--line);
  min-width: 0;
  text-align: center;
}
.market-store-facts > div:last-child {
  border: 0;
}
.market-store-facts strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
}
.market-store-facts strong .icon {
  width: 15px;
  height: 15px;
}
.market-store-facts > div:first-child strong > .icon {
  fill: #e8bd61;
  stroke: #e8bd61;
}
.market-store-facts small {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
.market-screen-gallery {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 24px 0 7px;
  scrollbar-width: none;
}
.market-screen-shot {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 250px;
  width: 250px;
  min-height: 355px;
  padding: 20px 16px;
  border-radius: 22px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  background:
    radial-gradient(
      ellipse at 100% 0%,
      color-mix(in srgb, var(--market-tint, #b5a0df) 24%, transparent),
      transparent 75%
    ),
    var(--surface-raised);
}
.market-screen-shot > h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 17px;
}
.market-screen-shot > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: -7px 0 20px;
}
.store-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding-bottom: 15px;
}
.store-preview-top > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.store-preview-top .market-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
}
.store-preview-top strong {
  flex: 1;
}
.store-preview-top .market-icon > .icon {
  width: 17px;
  height: 17px;
}
.co-shot {
  background: linear-gradient(150deg, var(--surface-raised), var(--surface));
  padding: 17px 14px;
}
.store-preview-income {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  padding: 17px 12px;
  background:
    radial-gradient(ellipse at 120% 0%, #a687ea88, transparent 70%),
    linear-gradient(120deg, #242637, #372850);
  border-radius: 15px;
  color: #f0ecfa;
  overflow: hidden;
}
.store-preview-income > small {
  font-size: 10px;
  color: #ded9ea;
}
.store-preview-income > strong {
  font-size: 23px;
  letter-spacing: -0.6px;
}
.store-preview-income > span {
  font-size: 8px;
  color: #8eddab;
}
.store-preview-bars {
  display: flex;
  position: absolute;
  right: 11px;
  bottom: 16px;
  gap: 4px;
  align-items: flex-end;
  transform: skewY(-9deg);
  opacity: 0.65;
}
.store-preview-bars i {
  width: 8px;
  border-radius: 3px;
  background: linear-gradient(#c6a7ff, #8160c1);
}
.store-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px 0;
  gap: 7px;
}
.store-preview-metrics > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  font-size: 8px;
  color: var(--muted);
}
.store-preview-metrics b {
  font-size: 12px;
  color: var(--text);
}
.store-preview-connect {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px;
  background: color-mix(in srgb, var(--surface-raised) 75%, #7355a7);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.store-preview-connect strong {
  font-size: 13px;
}
.store-preview-connect small {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.store-preview-connect > span {
  margin-top: 3px;
  display: block;
  padding: 7px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-size: 9px;
  text-align: center;
}
.store-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 3px 0;
  font-size: 10px;
  color: var(--muted);
}
.store-preview-row .icon {
  width: 16px;
  height: 16px;
}
.store-preview-row .icon:last-child {
  color: var(--success);
  margin-left: auto;
}
.store-node-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 12px;
}
.store-node-preview > .icon {
  width: 21px;
  height: 21px;
  color: var(--accent);
}
.store-node-preview b {
  font-size: 11px;
  display: block;
}
.store-node-preview small {
  display: block;
  color: var(--success);
  font-size: 8px;
  margin-top: 4px;
}
.store-chat-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 10px;
  background: var(--surface);
  margin-top: auto;
  min-height: 220px;
}
.store-chat-user {
  margin: 7px 0 13px 22px;
  padding: 11px;
  border-radius: 13px 13px 3px 13px;
  font-size: 11px;
  line-height: 1.6;
  background: var(--accent-soft);
}
.store-chat-answer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.6;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.store-chat-answer > .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--accent);
  margin-top: 1px;
}
.store-chat-option {
  font-size: 10px;
  text-align: center;
  color: var(--accent);
  margin-top: 13px;
  padding: 9px 5px;
  border-radius: 9px;
  background: var(--accent-soft);
}
.market-description {
  margin-top: 17px;
}
.market-description .market-capabilities {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.market-description .market-capabilities > div {
  padding: 8px 0;
  border: 0;
  background: none;
  font-size: 12px;
}
.market-description .market-capability-icon {
  background: none;
  width: 24px;
  flex-basis: 24px;
}
.market-reviews-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 5px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.market-reviews-list .market-review {
  flex: 0 0 min(300px, 85%);
  min-width: 0;
  margin-top: 13px;
  scroll-snap-align: start;
}
.market-reviews-list .market-review > div > small {
  font-size: 10px;
  color: var(--muted);
}
.market-reviews-list .market-review > .market-review-stars {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #e8bd61;
}
.market-review-summary .market-review-stars {
  color: #e8bd61;
}
@media (min-width: 750px) {
  .market-store-identity h1 {
    font-size: 30px;
  }
  .market-store-identity .market-icon-large {
    width: 88px;
    height: 88px;
    flex-basis: 88px;
  }
  .market-store-identity .market-open {
    min-width: 120px;
  }
  .market-store-facts {
    max-width: 750px;
  }
  .market-screen-shot {
    flex-basis: 280px;
    min-height: 380px;
  }
  .market-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .market-screen-gallery {
    gap: 17px;
  }
}
@media (max-width: 359px) {
  .market-result-heading h3 {
    font-size: 15px;
  }
  .market-heading-controls {
    gap: 8px;
  }
  .market-heading-controls .market-sort {
    font-size: 9px;
  }
  .market-store-identity {
    gap: 10px;
  }
  .market-store-identity .market-icon-large {
    width: 59px;
    height: 59px;
    border-radius: 17px;
  }
  .market-store-identity h1 {
    font-size: 21px;
  }
  .market-store-identity p {
    font-size: 11px;
  }
  .market-store-identity .market-open {
    padding: 8px 11px;
    min-width: 70px;
    font-size: 11px;
  }
  .market-store-facts strong {
    font-size: 12px;
  }
  .market-store-facts small {
    font-size: 9px;
  }
}

.co-screen .co-content {
  padding-bottom: calc(26px + var(--safe-bottom, 0px));
}

.store-preview-income > strong,
.store-preview-income > small,
.store-preview-income > span {
  position: relative;
  z-index: 1;
}

/* Cocoon: centred welcome from reference 1, earnings dashboard from reference 2. */
.co-screen {
  padding-bottom: 0;
  min-height: var(--app-height, calc(var(--app-dvh, 1dvh) * 100));
  --co-brand: #b49aff;
}
.co-screen .co-appbar {
  height: 70px;
  min-height: 70px;
}
.co-app-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.co-screen .co-content {
  max-width: 600px;
}
.co-screen.has-app-nav .co-content {
  padding-bottom: calc(106px + var(--safe-bottom));
}
.co-screen .button-primary,
.co-brand-button {
  color: #fff;
  background: linear-gradient(125deg, #b18af7, #7750e5 85%);
  border: 1px solid #ceb8ff38;
  box-shadow:
    inset 0 1px #ffffff32,
    0 5px 20px #6543b51f;
}
.co-brand-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 54px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 650;
  width: 100%;
}
.co-brand-button > .icon {
  width: 20px;
  height: 20px;
}
.co-screen.is-intro {
  background:
    radial-gradient(ellipse at 50% 180px, #7955cc0f, transparent 330px),
    var(--bg);
}
.co-screen.is-intro .co-content {
  max-width: 480px;
  padding-top: 10px;
}
.co-welcome {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: calc(var(--app-height, calc(var(--app-dvh, 1dvh) * 100)) - 122px);
  padding: 12px 4px 0;
}
.co-welcome-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.co-welcome-mark {
  position: relative;
  isolation: isolate;
  width: 108px;
  height: 112px;
  margin: 10px 0 17px;
}
.co-welcome-mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -24px;
  background: radial-gradient(ellipse, #7f61d92e, transparent 70%);
}
.co-welcome-mark .co-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  margin: 0;
}
.co-welcome-identity h1 {
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -1.3px;
  margin: 0 0 12px;
  font-weight: 750;
}
.co-welcome-identity p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.co-welcome-benefits {
  list-style: none;
  padding: 0 3px;
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.co-welcome-benefits > li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
}
.co-welcome-benefits > li > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 15px;
  color: #d3c6fb;
  border: 1px solid #baa5f21a;
  background: linear-gradient(145deg, #9b79dd24, #7251b20d);
  box-shadow: inset 0 1px #f3e9ff0c;
}
.co-welcome-benefits .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.65;
}
.co-welcome-benefits strong {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.1px;
}
.co-welcome-benefits small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.co-welcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 7px;
}
.co-how-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  min-height: 42px;
  color: var(--co-brand);
  font-size: 13px;
}
.co-how-link > .icon {
  width: 20px;
  height: 20px;
}
.co-existing-link {
  color: var(--muted);
  font-size: 11px;
  padding: 6px 12px;
  min-height: 30px;
}
.co-landing {
  gap: 21px;
  padding-top: 12px;
}
.co-landing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.co-landing-heading h1 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.65px;
  margin: 0;
}
.co-active-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 65%, transparent);
  font-size: 11px;
  white-space: nowrap;
}
.co-active-pill > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px color-mix(in srgb, var(--success) 20%, transparent);
}
.co-earnings {
  padding: 21px 19px 19px;
  border-radius: 24px;
  border-color: color-mix(in srgb, #af94ec 14%, var(--line));
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--surface-raised) 86%, #5f4584),
    var(--surface)
  );
  box-shadow: inset 0 1px #e2d5ff08;
}
.co-earnings-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.co-earnings-top > div:first-child {
  min-width: 0;
}
.co-earnings-top > div:first-child > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.co-earnings-top > div:first-child > strong {
  display: block;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.9px;
  margin-top: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.co-earnings-top > div:first-child > strong > span {
  font-size: inherit;
}
.co-earnings-period {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex-shrink: 0;
}
.co-earnings-period .co-growth {
  padding: 6px 9px;
  font-size: 12px;
  gap: 5px;
}
.co-earnings-period .co-growth .icon {
  width: 15px;
  height: 15px;
}
.co-earnings-period small {
  font-size: 10px;
  color: var(--muted);
}
.co-earnings-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 108px;
  padding-top: 5px;
  margin-top: 20px;
}
.co-earnings-chart > i {
  display: block;
  flex: 1;
  min-width: 3px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, #b294f3, #7350c0);
  box-shadow:
    inset 1px 0 #e2caff21,
    0 2px 6px #6347ae10;
}
.co-dashboard-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.co-dashboard-links > .co-line {
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 17px 16px;
  min-height: 85px;
  gap: 13px;
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--surface-raised) 87%, #40334f),
    var(--surface)
  );
  box-shadow: inset 0 1px #ffffff05;
}
.co-dashboard-links .co-line-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 14px;
  color: color-mix(in srgb, var(--text) 80%, #bcaff2);
  background: color-mix(in srgb, #aa8af0 7%, transparent);
}
.co-dashboard-links .co-line-icon > .icon {
  width: 25px;
  height: 25px;
}
.co-dashboard-links .co-line strong {
  font-size: 15px;
}
.co-dashboard-links .co-line small {
  font-size: 11px;
}
.co-app-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--viewport-offset, 0px) + 12px + var(--safe-bottom));
  width: min(568px, calc(100% - 26px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}
.co-app-nav > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 49px;
  font-size: 10px;
  color: var(--muted);
  border-radius: 20px;
}
.co-app-nav .icon {
  width: 23px;
  height: 23px;
}
.co-app-nav [aria-current="page"] {
  color: var(--co-brand);
  background: color-mix(in srgb, #ad8dea 8%, transparent);
}
.co-app-nav [aria-current="page"] > .icon {
  filter: drop-shadow(0 0 7px #a688df2b);
}
.co-payout-summary {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 3px 0;
}
.co-payout-summary > span {
  font-size: 12px;
  color: var(--muted);
}
.co-payout-summary > strong {
  font-size: 30px;
  letter-spacing: -0.8px;
}
.co-payout-summary > small {
  color: var(--muted);
  font-size: 11px;
}
.co-payout-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.co-payout-row:last-child {
  border: 0;
}
.co-payout-row strong {
  display: block;
  font-size: 12px;
}
.co-payout-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.co-payout-row > b {
  color: var(--success);
  font-size: 13px;
  white-space: nowrap;
}
.co-switch {
  width: 34px;
  height: 21px;
  flex: 0 0 34px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  padding: 2px;
}
.co-switch > i {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
}
.co-switch.is-on {
  background: var(--co-brand);
}
.co-switch.is-on > i {
  margin-left: auto;
  background: #fff;
}
@media (max-width: 359px) {
  .co-welcome {
    gap: 23px;
  }
  .co-welcome-mark {
    width: 95px;
    height: 100px;
    margin-bottom: 14px;
  }
  .co-welcome-identity h1 {
    font-size: 37px;
  }
  .co-welcome-identity p {
    font-size: 12px;
  }
  .co-welcome-benefits {
    gap: 16px;
    padding: 0;
  }
  .co-welcome-benefits > li {
    gap: 11px;
  }
  .co-welcome-benefits > li > span {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .co-welcome-benefits strong {
    font-size: 14px;
  }
  .co-welcome-benefits small {
    font-size: 11px;
  }
  .co-landing-heading h1 {
    font-size: 23px;
  }
  .co-active-pill {
    padding: 7px 9px;
    font-size: 10px;
  }
  .co-earnings {
    padding: 18px 15px;
  }
  .co-earnings-top > div:first-child > strong {
    font-size: 28px;
  }
  .co-earnings-period .co-growth {
    font-size: 11px;
    padding: 5px 7px;
  }
  .co-earnings-chart {
    gap: 3px;
    height: 95px;
  }
  .co-dashboard-links > .co-line {
    padding: 14px 12px;
    gap: 10px;
  }
  .co-dashboard-links .co-line strong {
    font-size: 14px;
  }
}
@media (min-width: 750px) {
  .co-welcome {
    padding-top: 22px;
    gap: 34px;
  }
  .co-welcome-mark {
    width: 122px;
    height: 126px;
  }
  .co-welcome-identity h1 {
    font-size: 46px;
  }
  .co-welcome-benefits {
    max-width: 375px;
  }
  .co-earnings {
    padding: 25px;
  }
  .co-earnings-top > div:first-child > strong {
    font-size: 37px;
  }
  .co-earnings-chart {
    height: 130px;
    margin-top: 24px;
  }
}

/* Friendly profile: centred identity, three shortcuts and four clear tabs. */
.profile-page > .profile-centered {
  padding-top: 6px;
  padding-bottom: 14px;
}
.profile-page > .profile-centered::before {
  opacity: 0.6;
}
.profile-page .profile-centered .profile-identity {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  margin: 0 auto;
  padding: 15px var(--gutter) 0;
  min-height: 0;
}
.profile-page .profile-centered .profile-identity > .avatar-lg {
  width: 88px;
  height: 88px;
  margin: 0;
  border: 2px solid #b5dceb35;
  box-shadow: 0 4px 20px #00000026;
}
.profile-page .profile-centered .profile-identity > .grow {
  flex: 0 1 auto;
  width: 100%;
  padding: 0;
}
.profile-page .profile-centered .profile-identity h1 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  margin: 0 0 4px;
}
.profile-centered .profile-identity .caption {
  font-size: 12px;
  line-height: 1.5;
}
.profile-header.profile-centered .profile-utility {
  position: absolute;
  top: 13px;
  right: var(--gutter);
  width: 40px;
  height: 40px;
  margin: 0;
}
.profile-page .profile-centered .profile-bio {
  max-width: 540px;
  text-align: center;
  margin: 0 auto;
  padding-top: 11px;
  font-size: 13px;
  line-height: 1.55;
}
.profile-page .profile-centered .profile-actions {
  max-width: 570px;
  margin: 0 auto;
  padding-top: 13px;
  gap: 10px;
}
.profile-page .profile-centered .profile-actions > .icon-button {
  width: 46px;
  flex-basis: 46px;
  height: 44px;
}
.profile-centered .profile-meta {
  justify-content: center;
}
.profile-shortcuts {
  display: grid;
  grid-template-columns: repeat(
    var(--profile-shortcut-count, 3),
    minmax(0, 1fr)
  );
  gap: 10px;
  max-width: 570px;
  margin: 12px auto 0;
  padding: 0 var(--gutter);
}
.profile-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 74px;
  padding: 9px 5px;
  border-radius: 18px;
  color: var(--text);
}
.profile-shortcut-art {
  position: relative;
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.profile-shortcut-art > .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}
.profile-shortcut-art > small {
  position: absolute;
  top: -3px;
  left: 24px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 16px;
  padding: 1px 5px;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--text);
  font-size: 9px;
  line-height: 1;
  box-shadow: 0 1px 4px #0001;
}
.profile-shortcut > strong {
  font-size: clamp(10.5px, calc(var(--app-vw, 1vw) * 3), 12px);
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
}
.profile-shortcut[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: linear-gradient(
    145deg,
    var(--accent-soft),
    color-mix(in srgb, var(--surface) 60%, transparent)
  );
}
.profile-page .profile-tabs.profile-tabs-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: visible;
  margin-top: 12px;
  margin-bottom: 16px;
  padding: 0 var(--gutter);
}
.profile-page .profile-tabs.profile-tabs-compact.has-more {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.profile-page .profile-tabs.profile-tabs-compact > .tab {
  min-width: 0;
  padding: 15px 2px 13px;
  font-size: clamp(11.5px, calc(var(--app-vw, 1vw) * 3.4), 13px);
  font-weight: 500;
}
.profile-page .profile-tabs.profile-tabs-compact > .tab[aria-selected="true"] {
  font-weight: 650;
}
.profile-page .profile-tabs.profile-tabs-compact > .tab::after {
  left: 11px;
  right: 11px;
  height: 2px;
  box-shadow: none;
}
.profile-more-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.profile-more-tab > .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: var(--muted);
}
.profile-more-tab > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-page .wall-composer {
  margin-bottom: 16px;
}
@media (max-width: 359px) {
  :root {
    --nav-label-size: 12px;
  }
  .profile-page .profile-centered .profile-identity h1 {
    font-size: 23px;
  }
  .profile-shortcuts {
    gap: 8px;
  }
  .profile-shortcut {
    min-height: 70px;
    border-radius: 16px;
  }
  .profile-page .profile-centered .profile-identity > .avatar-lg {
    width: 84px;
    height: 84px;
  }
}
@media (min-width: 750px) {
  .profile-page .profile-centered .profile-identity > .avatar-lg {
    width: 108px;
    height: 108px;
  }
  .profile-page .profile-centered .profile-identity h1 {
    font-size: 28px;
  }
  .profile-page .profile-tabs.profile-tabs-compact {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Space landing: centred identity, three shortcuts and three content tabs. */
.hub-header-friendly {
  padding-bottom: 0;
}
.hub-header-friendly .hub-header-body {
  padding: 16px var(--gutter) 28px;
}
.hub-friendly-controls {
  position: absolute;
  z-index: 3;
  top: 13px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.hub-friendly-controls > .icon-button {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  pointer-events: auto;
}
.hub-header-friendly .hub-identity {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.hub-header-friendly .hub-identity > .space-logo,
.hub-header-friendly .hub-identity > .badge-icon {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 21px;
}
.hub-header-friendly .hub-identity > .badge-icon > .icon {
  width: 32px;
  height: 32px;
}
.hub-header-friendly .hub-identity > .grow {
  flex: none;
  width: 100%;
  max-width: 540px;
}
.hub-header-friendly .hub-identity h1 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}
.hub-header-friendly .hub-identity p {
  font-size: 12px;
  line-height: 1.5;
  margin: 6px 0 0;
  opacity: 0.78;
}
.hub-friendly-role {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 10px auto 0;
  font-size: 11px;
  line-height: 1.5;
}
.hub-friendly-role > span + span::before {
  content: "·";
  margin-right: 10px;
  opacity: 0.6;
}
.hub-header-friendly .space-shortcuts {
  padding: 0;
  margin: 15px auto 0;
  max-width: 520px;
  gap: 10px;
}
.hub-header-friendly .space-shortcuts > .profile-shortcut {
  min-height: 76px;
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: inset 0 1px #ffffff04;
}
.hub-header-friendly .space-shortcuts > .profile-shortcut[aria-pressed="true"] {
  background: var(--surface-raised);
  border-color: color-mix(in srgb, var(--text) 24%, transparent);
}
.hub-friendly-tab-surface {
  margin-top: 0;
  padding-top: 0;
  border-radius: 0;
  background: var(--bg);
}
.hub-header-friendly .profile-shortcut-art {
  color: inherit;
}
.hub-friendly-tab-surface > .hub-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 0;
  overflow: visible;
}
.hub-friendly-tab-surface > .hub-tabs > .tab {
  min-width: 0;
  justify-content: center;
  padding: 13px 4px;
  gap: 6px;
  font-size: 13px;
}
.hub-friendly-tab-surface > .hub-tabs > .tab > .icon {
  width: 17px;
  height: 17px;
}
.hub-friendly-tab-surface > .hub-tabs > .tab::after {
  left: 18px;
  right: 18px;
}
/* Sections are destinations; search and presentation mode work within them. */
.space-room-sections {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 1px 5px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.space-room-section {
  display: flex;
  flex: 0 0 clamp(156px, 30%, 210px);
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 78px;
  padding: 12px;
  text-align: left;
  border-radius: 16px;
  scroll-snap-align: start;
}
.space-room-section > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: var(--accent);
}
.space-room-section > span > .icon {
  width: 22px;
  height: 22px;
}
.space-room-section > strong {
  font-size: 12px;
  font-weight: 550;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.space-room-section {
  background: var(--surface);
  box-shadow: none;
  border-color: var(--line);
}
.space-room-section[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
  background: var(--surface-raised);
}
.space-room-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.space-room-tools > .search-field {
  flex: 1;
  min-width: 0;
}
.space-room-tools > .icon-button {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 50%;
  color: var(--accent);
}
.space-room-pin {
  padding: 12px 14px;
}
.space-room-pin h3 {
  font-size: 13px;
}
.space-room-pin small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
}
.space-rooms-friendly #hub-room-results {
  gap: 14px;
}
.space-rooms-friendly .folder-group {
  padding: 5px 14px 10px;
  border-radius: 19px;
}
.space-rooms-friendly .folder-heading {
  min-height: 48px;
}
.space-rooms-friendly .folder-heading h3 {
  font-size: 14px;
}
.space-rooms-friendly .list-row {
  min-height: 64px;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.space-rooms-friendly .list-row h3 {
  font-size: 15px;
}
.space-rooms-friendly .list-row .caption {
  font-size: 12px;
  margin-top: 3px;
}
.space-rooms-friendly .list-row > .badge-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 13px;
}
.space-rooms-friendly .list-row small {
  font-size: 10px;
}
.space-recent-rooms {
  border-radius: 19px;
}
.folder-empty {
  padding: 5px 0 10px;
}
.unfiled-heading {
  font-size: 13px;
  color: var(--muted);
  padding: 13px 0 0;
}
/* Neutral surfaces separate navigation, pinned items and the conversation. */
.hub-context .card:not(.feature-card) {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 4px 18px #0000000c;
}
.hub-context .badge-icon {
  background: var(--surface-raised);
  color: var(--accent);
}
.hub-context .hub-vector {
  opacity: 0.045;
}
.hub-context .space-room-pin {
  background: var(--surface-raised);
}
.hub-context .space-room-tools > .icon-button {
  background: var(--surface);
  color: var(--text);
}
.hub-context .space-room-fab {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #0003;
}
.hub-context .space-room-fab:hover {
  filter: brightness(0.92);
}

.hub-context .room-navigation {
  background: var(--surface);
}

/* Overview: fixed destinations, recent activity and small direct actions. */
.dashboard-overview {
  gap: 28px !important;
  padding-bottom: 24px;
}
.dashboard-overview .section-heading {
  margin-bottom: 12px;
  gap: 12px;
}
.dashboard-overview .section-heading h2 {
  font-size: var(--section-heading-size);
  font-weight: 600;
}
.dashboard-overview .section-heading .button {
  font-size: var(--list-label-size);
}
.dashboard-overview .section-heading .button .icon {
  width: 20px;
  height: 20px;
}
.dashboard-quick-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 7px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.dashboard-quick-card {
  position: relative;
  flex: 0 0 clamp(136px, calc((100% - 36px) / 4), 152px);
  aspect-ratio: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 136px;
  padding: 12px 10px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: inset 0 1px #ffffff04;
  scroll-snap-align: start;
}
.dashboard-quick-art {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.dashboard-quick-art > .icon {
  width: 25px;
  height: 25px;
}
.dashboard-quick-art > img,
.dashboard-quick-art > .avatar,
.dashboard-quick-art > .space-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}
.dashboard-quick-art > .avatar {
  border-radius: 50%;
}
.dashboard-quick-badge {
  position: absolute;
  right: -7px;
  top: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 12px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
}
.dashboard-quick-card > strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.dashboard-quick-card > small {
  margin-top: auto;
  max-width: 100%;
  font-size: var(--list-meta-size);
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-add-shortcut {
  width: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--accent);
}
.dashboard-message-list {
  padding: 0 14px !important;
  overflow: hidden;
}
.dashboard-message-row {
  min-height: var(--list-row-height);
  gap: 14px;
  padding: 16px 0;
}
.dashboard-message-row > .avatar,
.dashboard-message-row > .badge-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
.dashboard-message-row > .grow {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dashboard-message-row h3 {
  font-size: 19px;
  font-weight: 600;
}
.dashboard-message-row .row {
  gap: 8px;
}
.dashboard-message-row .row > small {
  flex-shrink: 0;
  font-size: var(--list-meta-size);
}
.dashboard-message-row .caption {
  display: block;
  max-width: 100%;
  font-size: 16px;
}
.dashboard-message-context {
  font-size: var(--list-meta-size);
  line-height: 1.3;
  color: var(--subtle);
}
.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 100px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  text-align: left;
}
.dashboard-action-card > .badge-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 12px;
}
.dashboard-action-card > .badge-icon .icon {
  width: 26px;
  height: 26px;
}
.dashboard-action-card > span:not(.badge-icon) {
  min-width: 0;
  flex: 1;
}
.dashboard-action-card strong {
  display: block;
  font-size: var(--tile-title-size);
  line-height: 1.4;
  font-weight: 600;
}
.dashboard-action-card small {
  display: block;
  color: var(--muted);
  font-size: var(--list-label-size);
  line-height: 1.5;
  margin-top: 3px;
}
.dashboard-action-card > .chevron {
  width: 14px;
  height: 14px;
  color: var(--subtle);
}
.dashboard-empty {
  padding: 18px 5px;
  font-size: 13px;
  line-height: 1.5;
}
.dashboard-choice-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 13px;
  background: var(--surface);
}
.dashboard-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 11px 0;
  cursor: pointer;
}
.dashboard-choice + .dashboard-choice {
  border-top: 1px solid var(--line);
}
.dashboard-choice strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.dashboard-choice small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.dashboard-choice-art {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.dashboard-choice-art > img,
.dashboard-choice-art > .avatar,
.dashboard-choice-art > .space-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 11px;
}
.dashboard-choice input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: var(--accent-strong);
}
.dashboard-choice-details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  cursor: pointer;
  font-size: 14px;
}
.dashboard-choice-details > summary::-webkit-details-marker {
  display: none;
}
.dashboard-choice-details > summary .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.dashboard-choice-details[open] > summary .icon {
  transform: rotate(180deg);
}
.dashboard-section-options {
  margin: 0;
  padding: 0;
  border: 0;
}
.dashboard-section-options > legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}
.dashboard-new-label {
  border-radius: 8px;
  padding: 4px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}
@media (max-width: 359px) {
  .dashboard-action-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-overview .section-heading h2 {
    font-size: 20px;
  }
  .dashboard-overview .section-heading .button {
    font-size: 14px;
  }
}

/* One directory for the home tab and the owner's profile. */
.space-directory-friendly {
  gap: 28px;
  padding-bottom: 16px;
}
.space-directory-search {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding-right: 7px;
}
.space-directory-search > .search-field {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: inherit;
}
.space-directory-search > .icon-button {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  color: var(--muted);
}
.space-directory-search > .icon-button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.space-directory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.space-directory-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: var(--section-heading-size);
  font-weight: 600;
}
.space-directory-heading h2 > .icon {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  color: var(--muted);
}
.space-directory-heading > .button {
  font-size: var(--list-label-size);
  gap: 5px;
}
.space-directory-heading > .button .icon {
  width: 15px;
  height: 15px;
}
.space-directory-sort {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--list-meta-size);
  color: var(--muted);
}
.space-directory-sort > .icon {
  width: 13px;
  height: 13px;
}
.space-directory-pins {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 1px 0 6px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.space-directory-pin {
  position: relative;
  flex: 0 0 clamp(230px, calc((100% - 24px) / 3), 290px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  scroll-snap-align: start;
}
.space-directory-pin-open {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 100px;
  padding: 16px 14px;
  text-align: left;
}
.space-directory-pin .space-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 13px;
}
.space-directory-pin-open strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--tile-title-size);
  line-height: 1.35;
  font-weight: 600;
}
.space-directory-pin-open .space-directory-role {
  display: inline-block;
  max-width: 100%;
  margin-top: 6px;
  padding-right: 25px;
}
.space-directory-pin-open .context-tag {
  display: inline-flex;
  max-width: 100%;
}
.space-directory-unpin {
  position: absolute;
  bottom: 9px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}
.space-directory-unpin .icon {
  width: 14px;
  height: 14px;
}
.space-directory-pin-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 15px;
  text-align: left;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}
.space-directory-pin-empty > span {
  flex: 1;
  font-size: 13px;
}
.space-directory-pin-empty small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--subtle);
}
.space-directory-pin-empty > .icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}
.space-directory-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.space-directory-row {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 92px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: inset 0 1px #ffffff03;
}
.space-directory-open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 14px;
  text-align: left;
}
.space-directory-open .space-logo {
  width: var(--list-avatar-size);
  height: var(--list-avatar-size);
  flex-shrink: 0;
  border-radius: 13px;
}
.space-directory-open strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--list-title-size);
  line-height: 1.4;
  font-weight: 600;
}
.space-directory-open small {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
}
.space-directory-role {
  flex-shrink: 0;
}
.space-directory-role {
  --role-tint: var(--muted);
}
.space-directory-role .context-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--role-tint) 22%, transparent);
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.4;
  background: color-mix(in srgb, var(--role-tint) 10%, transparent);
  color: var(--role-tint);
}
.space-directory-role .context-tag .icon {
  width: 14px;
  height: 14px;
}
.space-directory-role.is-owner {
  --role-tint: color-mix(in srgb, #b39052 72%, var(--text));
}
.space-directory-role.is-admin {
  --role-tint: var(--accent);
}
.space-directory-members {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 32px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: var(--list-meta-size);
}
.space-directory-members > .icon {
  width: 18px;
  height: 18px;
}
.space-directory-row > .icon-button {
  width: 36px;
  height: 40px;
  flex-basis: 36px;
  color: var(--muted);
}
.space-directory-row > .icon-button > .icon {
  width: 22px;
  height: 22px;
}
.space-directory-active-filter {
  margin-top: -14px;
  margin-bottom: -8px;
}
.space-directory-active-filter .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.space-directory-active-filter .icon {
  width: 13px;
  height: 13px;
}
.space-directory-empty {
  padding: 18px 10px;
  text-align: center;
}
.space-directory-empty > .icon {
  width: 28px;
  height: 28px;
  color: var(--subtle);
  margin: 0 auto 12px;
}
.space-directory-empty h3 {
  font-size: 14px;
  color: var(--muted);
}
.space-directory-empty .button {
  margin-top: 10px;
}
@media (max-width: 359px) {
  .space-directory-row {
    gap: 6px;
    padding: 10px;
  }
  .space-directory-row > .space-directory-members {
    display: none;
  }
  .space-directory-open {
    gap: 8px;
  }
  .space-directory-open .space-logo {
    width: var(--list-avatar-size);
    height: var(--list-avatar-size);
  }
  .space-directory-open strong {
    font-size: 18px;
  }
  .space-directory-role .context-tag {
    font-size: 12px;
    padding: 4px 6px;
  }
  .space-directory-heading h2 {
    font-size: 20px;
  }
  .space-directory-sort {
    max-width: 160px;
    font-size: 12px;
  }
}

/* Give the chats listing a little more room without changing the app-wide scale. */
.chats-page {
  --chat-title-size: var(--list-title-size);
  --chat-preview-size: var(--list-preview-size);
}
.chats-page .chat-row {
  min-height: var(--list-row-height);
  padding-top: 14px;
  padding-bottom: 14px;
}
.chats-page .chat-row > .avatar,
.chats-page .chat-row > .badge-icon {
  width: var(--list-avatar-size);
  height: var(--list-avatar-size);
  flex-basis: var(--list-avatar-size);
}
.chats-page .chat-row h3 {
  font-size: var(--chat-title-size);
  font-weight: 600;
}
.chats-page .story-ring {
  width: 61px;
  height: 61px;
}
.chats-page .story > .story-ring > .avatar {
  width: 53px;
  height: 53px;
}
.chats-page .story > span:last-child {
  font-size: 11px;
}

.chats-page .chats-content .pill {
  min-height: 38px;
  padding: 8px 12px;
  font-size: var(--list-label-size);
  font-weight: 500;
}
.chats-page .search-field {
  min-height: 54px;
}
@media (max-width: 359px) {



  .chats-page .chat-row h3 {
    font-size: 18px;
  }
}

/* Readable lists share a scale, without changing layout zoom or conversation artwork. */
.dashboard-page,
.contacts-page,
.chats-page,
.space-directory-friendly {
  font-family: var(--conversation-font-family);
  font-size: 17px;
}
.dashboard-page,
.contacts-page,
.chats-page {
  --gutter: 22px;
}
.contacts-page .contact-row > .avatar {
  width: var(--list-avatar-size);
  height: var(--list-avatar-size);
  flex-basis: var(--list-avatar-size);
}
.contacts-page .contact-row .caption {
  font-size: var(--list-preview-size);
  line-height: 1.4;
}
.contacts-page .directory-contact > .icon-button > .icon {
  width: 24px;
  height: 24px;
}
.contacts-page .search-field,
.dashboard-page .search-field,
.space-directory-friendly .search-field {
  min-height: 54px;
}
.contacts-page .search-field input,
.chats-page .search-field input,
.dashboard-page .search-field input,
.space-directory-friendly .search-field input {
  font-size: var(--list-preview-size);
}
.chats-page .chat-time,
.chats-page .chat-origin {
  font-size: var(--list-meta-size);
}
.dashboard-page .section-heading h2 {
  font-size: var(--section-heading-size);
}
.dashboard-page .list-row h3 {
  font-size: 19px;
  font-weight: 600;
}
@media (max-width: 540px) {
  .space-directory-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }
  .space-directory-row > .space-directory-open {
    grid-column: 1;
    grid-row: 1;
  }
  .space-directory-row > .icon-button {
    grid-column: 2;
    grid-row: 1;
  }
  .space-directory-row > .space-directory-role {
    grid-column: 1;
    grid-row: 2;
    padding-left: calc(var(--list-avatar-size) + 14px);
  }
  .space-directory-row > .space-directory-members {
    grid-column: 2;
    grid-row: 2;
  }
}

.dashboard-page .market-product-copy h3 {
  font-size: var(--list-title-size);
  font-weight: 600;
}
.dashboard-page .market-product-tagline {
  font-size: 16px;
  line-height: 1.4;
}
.dashboard-page .market-product-source,
.dashboard-page .market-product-metrics {
  font-size: var(--list-meta-size);
}
@media (max-width: 359px) {
  .space-directory-friendly {
    --list-avatar-size: 44px;
  }
}

/* Available helpers: people first, connection controls second. */
.helper-directory {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.helper-directory-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.helper-directory-heading > div {
  flex: 1;
  min-width: 0;
}
.helper-directory-heading h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.helper-directory-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.helper-directory-heading > .icon-button {
  flex: 0 0 42px;
}
.helper-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.helper-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 #ffffff04;
}
.helper-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.helper-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  min-width: 0;
  flex: 1;
}
.helper-identity > span:last-child {
  min-width: 0;
}
.helper-identity strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.helper-identity small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.helper-avatar.asst-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
}
.helper-avatar.asst-mark > .icon {
  width: 27px;
  height: 27px;
}
.helper-config.icon-button {
  color: var(--muted);
  background: transparent;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-color: transparent;
}
.helper-summary {
  margin: 15px 0 17px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.helper-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.helper-question {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-raised) 35%, var(--surface));
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  min-height: 44px;
}
.helper-question > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.helper-question > .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
}
.helper-question:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.helper-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}
.helper-card-foot > .button {
  min-height: 42px;
  padding: 10px 19px;
  border-radius: 23px;
  font-size: 13px;
}
.helper-availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.helper-availability > .icon {
  width: 14px;
  height: 14px;
}
.helper-availability.is-paused {
  color: var(--muted);
}
.helper-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px var(--gutter);
  min-height: 68px;
}
.helper-page-header > span {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}
.helper-profile-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.helper-profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 5px 8px;
  text-align: center;
}
.helper-avatar-large.asst-mark {
  width: 86px;
  height: 86px;
  flex-basis: 86px;
}
.helper-avatar-large.asst-mark > .icon {
  width: 42px;
  height: 42px;
}
.helper-profile-identity h1 {
  margin-top: 3px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.6px;
}
.helper-profile-identity > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 34ch;
}
.helper-context {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}
.helper-context > .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}
.helper-profile-identity > .button {
  margin-top: 8px;
  max-width: 420px;
}
.helper-profile-section {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
}
.helper-profile-section h2,
.helper-context-info h2 {
  font-size: 15px;
  margin-bottom: 12px;
}
.helper-profile-section p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.helper-context-info {
  padding: 4px 10px 12px;
}
.helper-context-info p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 7px;
}
.helper-chat-header {
  position: sticky;
  top: var(--safe-top);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.helper-chat-person {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  text-align: left;
  min-width: 0;
}
.helper-chat-person > span:last-child {
  min-width: 0;
}
.helper-chat-person strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.helper-chat-person small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.helper-chat-person .helper-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}
.helper-chat-person .helper-avatar > .icon {
  width: 23px;
  height: 23px;
}
.helper-conversation.chat-screen {
  padding-bottom: calc(104px + var(--safe-bottom));
}
.helper-dialog-note {
  align-self: center;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 8px;
}
.helper-greeting strong {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 13px;
}
.helper-messages > .bubble {
  font-size: var(--message-font-size, 17px);
  line-height: 1.5;
}
.helper-starters {
  align-self: flex-start;
  width: min(100%, 420px);
  margin-bottom: 10px;
}
.helper-conversation .helper-composer {
  bottom: calc(var(--chat-bottom, 0px) + 12px + var(--safe-bottom));
}
.helper-composer input {
  padding: 4px 8px;
  font-size: 15px;
}
.helper-answer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  white-space: normal;
}
.helper-answer-links button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-top: 1px solid var(--line);
  padding: 9px 0 0;
  text-align: left;
  font-size: 12px;
  color: var(--accent);
}
.helper-answer-links .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.helper-answer-links .icon:last-child {
  margin-left: auto;
}
@media (min-width: 760px) {
  .helper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .helper-profile-content {
    max-width: 720px;
    margin-inline: auto;
  }
}
@media (max-width: 359px) {
  .helper-card {
    padding: 15px;
  }
  .helper-card-foot {
    gap: 8px;
  }
  .helper-identity strong {
    font-size: 15px;
  }
}

/* A small social showcase, with a dedicated collection beyond the wall. */
.gift-shelf {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 14px;
  padding: 8px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.hub-content .gift-shelf {
  margin-bottom: 0;
}
.gift-shelf-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.gift-section-link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 30px;
  text-align: left;
}
.gift-section-link h2 {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}
.gift-section-link > .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
  flex: 0 0 17px;
}
.gift-section-link > .icon:last-child {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}
.gift-give-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 12px;
  min-height: 30px;
  white-space: nowrap;
}
.gift-give-link > .icon {
  width: 15px;
  height: 15px;
}
.gift-shelf-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.gift-shelf-track::-webkit-scrollbar {
  display: none;
}
.gift-shelf-item {
  flex: 0 0 78px;
  width: 78px;
  display: block;
  scroll-snap-align: start;
}
.gift-art {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface-raised);
  aspect-ratio: 1;
}
.gift-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gift-shelf-item > .gift-art {
  width: 78px;
  border-radius: 14px;
  border: 1px solid #ffffff0a;
}
.gift-shelf-item > .gift-art img {
  transform: scale(1.22);
}
.gift-shelf.is-empty {
  gap: 2px;
}
.gift-shelf-empty-caption {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.gift-about-entry {
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 16px;
  background: var(--surface);
}
.gift-about-entry > .icon:first-child {
  color: var(--accent);
}
.gift-about-entry strong,
.gift-about-entry small {
  display: block;
}
.gift-about-entry small {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.gift-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px var(--gutter);
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}
.gift-page-header > div {
  min-width: 0;
  flex: 1;
}
.gift-page-header h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}
.gift-page-header small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gift-page-header > .button {
  min-height: 39px;
  padding: 9px 13px;
  border-radius: 23px;
  font-size: 12px;
}
.gift-page-content {
  display: flex;
  flex-direction: column;
  gap: 23px;
}
.gift-collection-intro {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.gift-collection-intro > p,
.gift-collection-caption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 13px;
}
.gift-grid-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  text-align: left;
  min-width: 0;
}
.gift-grid-item > .gift-art {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 23px;
}
.gift-grid-item > strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding-inline: 3px;
  overflow-wrap: anywhere;
}
.gift-grid-item > small {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1.4;
  padding-inline: 3px;
}
.gift-grid-item > small > .icon {
  width: 12px;
  height: 12px;
}
.gift-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 15px;
  padding: 25px;
  text-align: center;
}
.gift-empty > span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 24px;
}
.gift-empty > span > .icon {
  width: 31px;
  height: 31px;
}
.gift-empty h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
}
.gift-empty p {
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}
.gift-detail-content,
.gift-compose-content,
.gift-preview-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 600px;
  margin-inline: auto;
}
.gift-detail-art {
  padding: 0 30px;
}
.gift-detail-art > .gift-art {
  max-width: 250px;
  margin-inline: auto;
  border-radius: 29px;
  border: 1px solid var(--line);
}
.gift-detail-title {
  text-align: center;
}
.gift-detail-title h2,
.gift-compose-hero h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.gift-detail-title p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}
.gift-letter {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 21px;
  padding: 19px;
}
.gift-letter-icon {
  display: grid;
  place-items: center;
  height: 35px;
  width: 35px;
  flex: 0 0 35px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.gift-letter-icon > .icon {
  width: 17px;
  height: 17px;
}
.gift-letter h3 {
  font-size: 13px;
  line-height: 1.5;
}
.gift-letter p {
  margin-top: 7px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.gift-display-settings {
  padding: 19px;
  border-radius: 21px;
  background: var(--surface);
}
.gift-display-settings h3 {
  font-size: 14px;
  margin-bottom: 6px;
}
.gift-setting-row {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 15px 0;
  width: 100%;
}
.gift-setting-row + .gift-setting-row {
  border-top: 1px solid var(--line);
  padding-bottom: 0;
}
.gift-setting-row > span:first-child {
  flex: 1;
  min-width: 0;
}
.gift-setting-row strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.gift-setting-row small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 5px;
}
.gift-switch {
  width: 39px;
  height: 23px;
  flex: 0 0 39px;
  border-radius: 20px;
  padding: 3px;
  background: var(--surface-raised);
  border: 1px solid var(--line);
}
.gift-switch > i {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
}
[aria-checked="true"] > .gift-switch {
  background: var(--accent-strong);
}
[aria-checked="true"] > .gift-switch > i {
  background: var(--text);
  transform: translateX(15px);
}
.gift-setting-row:disabled {
  opacity: 0.45;
}
.gift-catalog-intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 1px;
}
.gift-catalog-intro > span {
  color: var(--accent);
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--accent-soft);
}
.gift-catalog-intro h2 {
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}
.gift-catalog-intro p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 38ch;
}
.gift-compose-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.gift-compose-hero > .gift-art {
  width: 140px;
  border: 1px solid var(--line);
  border-radius: 25px;
}
.gift-compose-hero h2 {
  font-size: 22px;
}
.gift-recipient {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.gift-recipient > .icon {
  color: var(--accent);
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}
.gift-recipient small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}
.gift-recipient strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
}
.gift-anonymous {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}
.gift-anonymous > input {
  accent-color: var(--accent-strong);
  margin-top: 3px;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.gift-anonymous strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.gift-anonymous small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 5px;
}
.gift-compose-note {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}
.gift-preview-label {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.gift-preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border-radius: 25px;
  background: var(--surface);
  text-align: center;
}
.gift-preview-card > .gift-art {
  width: 170px;
  border-radius: 25px;
}
.gift-preview-card h2 {
  font-size: 22px;
}
.gift-preview-card > p {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.gift-preview-card > small {
  color: var(--muted);
  font-size: 11px;
}
.gift-checkout-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}
.gift-checkout-note > .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 2px;
}
.gift-checkout-note p {
  font-size: 12px;
  line-height: 1.6;
}
@media (min-width: 600px) {
  .gift-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 19px;
  }
  .gift-page-content {
    max-width: 920px;
    margin-inline: auto;
  }
  .gift-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 359px) {
  .gift-give-link {
    font-size: 11px;
  }
  .gift-page-header {
    gap: 7px;
  }
  .gift-page-header > .button {
    font-size: 11px;
    padding-inline: 10px;
  }
}

/* Membership is explicit in the space identity, with no extra navigation tab. */
.hub-friendly-role {
  opacity: 1;
}
.hub-friendly-role > span + span::before {
  display: none;
}
.hub-friendly-role > span:first-child {
  color: var(--muted);
}
.space-membership-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.space-membership-status > .icon {
  width: 13px;
  height: 13px;
}
.space-join.button {
  min-height: 32px;
  padding: 6px 13px;
  font-size: 12px;
  border-radius: 20px;
}
.space-join.button > .icon {
  width: 15px;
  height: 15px;
}

/* Assets use one icon component in a three-column launcher, without card surfaces. */
.dashboard-assets {
  padding: 8px 0 30px;
}
.dashboard-assets > h2 {
  margin: 0 0 44px;
  font-size: 26px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.3px;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 44px;
  align-items: start;
}
.asset-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 0;
  color: var(--text);
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.asset-symbol {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 24px;
  color: #fff;
}
.asset-symbol > .icon {
  width: 46px;
  height: 46px;
  stroke-width: 1.7;
}
.asset-symbol > .market-icon {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.asset-symbol > .market-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.asset-icon .asset-wallet-mark {
  background: linear-gradient(145deg, #00cbea, #0096d0);
}
.asset-stars-mark {
  color: #d9b979;
}
.asset-icon .asset-stars-mark {
  color: #fff;
  background: linear-gradient(145deg, #ffc347, #eaa026);
}
.asset-icon .asset-gifts-mark {
  background: linear-gradient(145deg, #e674a4, #c7477a);
}
.asset-premium-mark {
  color: #b7aad6;
}
.asset-icon .asset-premium-mark {
  color: #fff;
  background: linear-gradient(145deg, #a567f3, #6434d6);
}
.asset-icon .asset-fragment-mark {
  background: linear-gradient(145deg, #8dcdf1, #4eaaec);
}
.asset-fragment-mark > .icon {
  fill: currentColor;
  stroke: #72bce9;
  stroke-width: 0.8;
}
.asset-cocoon-mark {
  background: linear-gradient(145deg, #9e70e5, #6240a8);
}
.asset-cocoon-mark > .market-icon.has-logo {
  padding: 9px;
  border: 0;
  background: transparent;
}
.asset-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: 100%;
}
.asset-copy > strong {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.25;
}
.asset-copy > small {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}
.asset-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-top: -5px;
  padding: 4px 12px;
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.asset-info {
  padding: 10px;
}
.asset-info > .row {
  gap: 10px;
}
.asset-info > .row > .badge-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}
.asset-info > .row > strong {
  font-size: 19px;
  line-height: 1.3;
}
.asset-info > .row > .icon-button {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}
.asset-info > p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 400px) {
  .dashboard-assets > h2 {
    font-size: 23px;
    margin-bottom: 32px;
  }
  .asset-grid {
    column-gap: 10px;
    row-gap: 34px;
  }
  .asset-symbol {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-radius: 22px;
  }
  .asset-symbol > .icon {
    width: 42px;
    height: 42px;
  }
  .asset-copy > strong {
    font-size: 18px;
  }
  .asset-copy > small {
    font-size: 14px;
  }
  .asset-connect {
    font-size: 13px;
    padding-inline: 9px;
  }
}

/* One context marker is shared by the chat filter and both profile pickers. */
.context-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 3px;
  border-radius: 50%;
  border: 1.5px solid var(--context-tint, var(--accent));
  background: color-mix(
    in srgb,
    var(--context-tint, var(--accent)) 9%,
    transparent
  );
  color: var(--context-tint, var(--accent));
}
.context-mark > .avatar {
  width: 100%;
  height: 100%;
  flex-basis: auto;
  border: 0;
}
.context-mark > .icon {
  width: 25px;
  height: 25px;
}

.compact-picker .context-mark {
  margin-right: 3px;
}
.contact-context-help {
  padding: 8px 12px;
  line-height: 1.5;
}
.chats-page .story .space-logo,
.chats-page .story .badge-icon {
  width: 53px;
  height: 53px;
  border-radius: 50%;
}
.chats-page .story > span:last-child {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The shared Extensions control fits beside the shared brand and title. */
.chats-page .chat-kind-tabs {
  flex: 1;
  min-width: 0;
  grid-template-columns: auto auto;
  gap: 3px;
  padding: 4px;
}
.chats-page .chat-kind-tabs button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 5px;
  font-size: clamp(11.5px, 3.33vw, 14px);
  white-space: nowrap;
}
.chats-page .section-header .appbar,
.chats-page.is-scrolled .section-header .appbar {
  min-height: 64px;
  height: 64px;
  gap: 6px;
}
@media (max-width: 359px) {
  .chats-page > .section-header {
    padding-inline: 14px;
  }
  .chats-page .brand-mark {
    width: 24px;
    height: 24px;
  }
}
.chats-page .story-profile {
  width: 96px;
}
.chats-page .story-strip {
  align-items: flex-end;
}
.chats-page .story-profile > .story-label {
  max-width: 96px;
  font-size: 12px;
  font-weight: 500;
}
.story-profile-avatar {
  position: relative;
  display: flex;
}
.chats-page .story-profile .context-mark {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
  padding: 3px;
}
.story-profile-arrow {
  position: absolute;
  right: -3px;
  bottom: -1px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--text);
}
.story-profile-arrow > .icon {
  width: 14px;
  height: 14px;
}
.chats-page .story[data-publisher="space"] {
  width: 82px;
}
.chats-page .story[data-publisher="space"] > span:last-child {
  width: 100%;
}
