:root {
  --bg: #fff8fb;
  --surface: #ffffff;
  --surface-soft: #fff1f6;
  --surface-muted: #f7f3f7;
  --surface-raised: rgba(255, 255, 255, 0.92);
  --text: #261f2a;
  --text-soft: #655e69;
  --text-muted: #948c97;
  --line: #eee6ee;
  --line-strong: #dfd4df;
  --primary: #f45584;
  --primary-strong: #e43f72;
  --primary-soft: #ffe3ec;
  --secondary: #735ee9;
  --secondary-soft: #ece8ff;
  --success: #1da77b;
  --success-soft: #dcf7ee;
  --warning: #d98a2d;
  --danger: #da3d58;
  --danger-soft: #ffe5e9;
  --shadow-xs: 0 2px 10px rgba(48, 31, 45, 0.05);
  --shadow-sm: 0 8px 24px rgba(54, 32, 51, 0.08);
  --shadow-md: 0 18px 48px rgba(54, 32, 51, 0.14);
  --shadow-lg: 0 28px 80px rgba(54, 32, 51, 0.2);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --max-app-width: 480px;
  --top-safe: env(safe-area-inset-top, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .75, .25, 1);
  --nav-height: 70px;
  font-family: Inter, ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] {
  --bg: #151217;
  --surface: #201b22;
  --surface-soft: #2a2026;
  --surface-muted: #272229;
  --surface-raised: rgba(32, 27, 34, 0.94);
  --text: #f5eff6;
  --text-soft: #c7bdc9;
  --text-muted: #968c99;
  --line: #382f3a;
  --line-strong: #4a3e4b;
  --primary: #ff6d98;
  --primary-strong: #ff5788;
  --primary-soft: #4b2634;
  --secondary: #9b8aff;
  --secondary-soft: #332c58;
  --success: #51d2a7;
  --success-soft: #183b32;
  --warning: #efb163;
  --danger: #ff6d82;
  --danger-soft: #4c232b;
  --shadow-xs: 0 2px 10px rgba(0, 0, 0, 0.18);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: #ece7ed;
  scroll-behavior: smooth;
}

html.reduce-motion,
html.reduce-motion * {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 50% 0%, #faf6fa 0, #ece7ed 52%, #e4dfe6 100%);
  overscroll-behavior-y: none;
}

:root[data-theme="dark"] body {
  background: #0e0c10;
}

body.modal-open {
  overflow: hidden;
}

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

button,
a,
input,
textarea,
select {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

button {
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
dl,
dd,
dt {
  margin: 0;
}

input,
textarea,
select {
  min-width: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input[type="number"] {
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

select {
  appearance: none;
}

textarea {
  resize: none;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: #111;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  position: relative;
  width: min(100%, var(--max-app-width));
  min-height: 100dvh;
  margin: 0 auto;
  overflow: clip;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.app,
.page {
  min-height: 100dvh;
}

.page {
  background: var(--bg);
}

.page-main {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + var(--bottom-safe) + 24px);
}

.page--chat .page-main,
.page--user-detail .page-main,
.page--form .page-main,
.page--simple .page-main,
.page--settings .page-main,
.page--safety .page-main {
  padding-bottom: calc(24px + var(--bottom-safe));
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vertical-align: middle;
}

.boot-screen,
.fatal-error {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100dvh;
  gap: 14px;
  color: var(--text-soft);
}

.boot-screen img {
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.boot-screen p {
  font-size: 13px;
  letter-spacing: .08em;
}

.boot-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* Common controls */
.icon-button {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  transition: background .18s ease, transform .18s ease;
}

.icon-button:hover {
  background: var(--surface-muted);
}

.icon-button:active {
  transform: scale(.94);
}

.icon-button--small {
  width: 34px;
  height: 34px;
}

.icon-button--soft {
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.icon-button--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 7px 16px color-mix(in srgb, var(--primary) 25%, transparent);
}

.icon-button--glass {
  color: #fff;
  background: rgba(20, 16, 23, .28);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(16px);
}

.button-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.primary-button,
.secondary-button,
.outline-button,
.danger-button,
.danger-outline-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong) 55%, #ec4f8c);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 26%, transparent);
}

.primary-button:hover {
  box-shadow: 0 13px 26px color-mix(in srgb, var(--primary) 34%, transparent);
}

.primary-button:active,
.secondary-button:active,
.outline-button:active,
.danger-button:active,
.danger-outline-button:active {
  transform: scale(.975);
}

.primary-button--large {
  width: 100%;
  min-height: 54px;
  border-radius: 17px;
  font-size: 16px;
}

.primary-button--small {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 12px;
}

.primary-button.is-loading::after {
  width: 17px;
  height: 17px;
  content: "";
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

.secondary-button {
  color: var(--text);
  background: var(--surface-muted);
}

.outline-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--surface);
}

.outline-button--small {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 12px;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.danger-outline-button {
  width: calc(100% - 40px);
  margin: 16px 20px 0;
  color: var(--danger);
  background: var(--danger-soft);
}

.text-link,
.text-button {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.text-button--strong {
  font-size: 15px;
}

.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 650;
}

.tag-row--large .tag {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 46px 28px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state > .icon {
  color: var(--primary);
}

.empty-state h1,
.empty-state h2,
.empty-state h3 {
  color: var(--text);
}

.empty-state p {
  max-width: 290px;
  font-size: 13px;
  line-height: 1.7;
}

.empty-state--compact {
  padding: 32px 20px;
}

.empty-state--compact h3 {
  font-size: 15px;
}

.empty-state--page {
  min-height: 70dvh;
}

/* Top and bottom navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  min-height: calc(64px + var(--top-safe));
  align-items: end;
  padding: var(--top-safe) 12px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
}

.topbar--transparent {
  position: absolute;
  width: 100%;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.topbar-side {
  display: flex;
  align-items: center;
}

.topbar-title {
  align-self: center;
  text-align: center;
}

.topbar-title h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.topbar-title p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, var(--max-app-width));
  min-height: calc(var(--nav-height) + var(--bottom-safe));
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px var(--bottom-safe);
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: var(--surface-raised);
  box-shadow: 0 -10px 28px rgba(35, 22, 35, .06);
  backdrop-filter: blur(22px) saturate(1.35);
  transform: translateX(-50%);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.nav-item:active {
  transform: scale(.94);
}

.nav-item.is-active {
  color: var(--primary);
}

.nav-item.is-active::before {
  position: absolute;
  top: -8px;
  width: 24px;
  height: 3px;
  border-radius: 0 0 6px 6px;
  content: "";
  background: var(--primary);
}

.nav-icon-wrap {
  position: relative;
  display: grid;
  width: 30px;
  height: 28px;
  place-items: center;
}

.nav-badge {
  position: absolute;
  top: -3px;
  right: -6px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-size: 9px;
}

/* Auth */
.auth-page {
  position: relative;
  display: grid;
  min-height: 100dvh;
  align-content: center;
  overflow: hidden;
  padding: calc(34px + var(--top-safe)) 22px calc(24px + var(--bottom-safe));
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 127, 167, .26), transparent 32%),
    radial-gradient(circle at 94% 20%, rgba(131, 105, 242, .22), transparent 36%),
    linear-gradient(180deg, var(--bg), var(--surface-soft));
}

.auth-ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.auth-ambient--one {
  top: -86px;
  right: -90px;
  width: 230px;
  height: 230px;
  background: linear-gradient(135deg, rgba(255, 91, 141, .18), rgba(126, 94, 238, .12));
}

.auth-ambient--two {
  bottom: 4%;
  left: -110px;
  width: 260px;
  height: 260px;
  background: rgba(255, 190, 211, .18);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 28px 24px 24px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(22px);
}

:root[data-theme="dark"] .auth-card {
  border-color: rgba(255, 255, 255, .08);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.auth-brand img {
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(219, 58, 111, .22);
}

.auth-brand h1 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.auth-brand p,
.auth-heading p {
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.auth-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -8px -8px 24px;
}

.auth-heading h1 {
  font-size: 24px;
  letter-spacing: -.03em;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.field-label {
  padding-left: 2px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.field-control,
.textarea-control {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 49px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
  transition: border .18s ease, box-shadow .18s ease, background .18s ease;
}

.field-control:focus-within,
.textarea-control:focus-within {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 10%, transparent);
}

.field-control > .icon {
  color: var(--text-muted);
}

.field-control input,
.field-control select {
  flex: 1;
  height: 47px;
  font-size: 14px;
}

.field-control select + .icon {
  color: var(--text-muted);
}

.field-action,
.code-button {
  flex: 0 0 auto;
  min-width: 30px;
  min-height: 30px;
  color: var(--text-muted);
}

.code-button {
  padding: 0 8px;
  border-left: 1px solid var(--line);
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
}

.textarea-control {
  display: block;
  min-height: 110px;
  padding: 12px 14px 27px;
}

.textarea-control textarea {
  width: 100%;
  min-height: 82px;
  line-height: 1.65;
}

.textarea-control small {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: var(--text-muted);
  font-size: 10px;
}

.field-error {
  min-height: 0;
  color: var(--danger);
  font-size: 11px;
}

.field-error:not(:empty) {
  min-height: 14px;
}

[aria-invalid="true"] {
  color: var(--danger);
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-row--between {
  justify-content: space-between;
}

.form-field + .form-row {
  margin-top: -2px;
}

.check-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
}

.check-control input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.check-control input:checked {
  border-color: var(--primary);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat;
}

.check-control--legal {
  align-items: flex-start;
  line-height: 1.5;
}

.check-control--legal input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--text-muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  content: "";
  flex: 1;
  background: var(--line);
}

.auth-card > .outline-button {
  width: 100%;
}

.legal-copy {
  margin-top: 17px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

.auth-footer {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}

.field-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.field-grid > .form-field {
  min-width: 0;
}

/* Avatar */
.avatar {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  background: var(--surface-soft);
}

.avatar--xs { width: 34px; height: 34px; }
.avatar--sm { width: 46px; height: 46px; }
.avatar--md { width: 56px; height: 56px; }
.avatar--lg { width: 74px; height: 74px; }
.avatar--xl { width: 104px; height: 104px; }
.avatar--story { width: 54px; height: 54px; }
.avatar--match { width: 62px; height: 62px; }

.online-dot {
  position: absolute;
  right: 1px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #2fca8c;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 750;
}

.verified-badge--compact {
  gap: 0;
}

.verified-badge .icon {
  fill: color-mix(in srgb, var(--secondary) 14%, transparent);
}

/* Home */
.page--home .page-main {
  padding-top: calc(20px + var(--top-safe));
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 14px;
}

.home-header h1 {
  margin-top: 3px;
  font-size: 27px;
  letter-spacing: -.045em;
}

.story-strip {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  padding: 7px 20px 18px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.story-strip::-webkit-scrollbar {
  display: none;
}

.story {
  display: grid;
  min-width: 64px;
  justify-items: center;
  gap: 6px;
  scroll-snap-align: start;
  color: var(--text-soft);
  font-size: 10px;
}

.story-ring {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 50%;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, var(--primary), #ffabbe, var(--secondary)) border-box;
}

.story-ring .avatar {
  border: 2px solid var(--bg);
}

.story--self .story-ring {
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, var(--line-strong), var(--primary)) border-box;
}

.story-plus {
  position: absolute;
  right: -2px;
  bottom: -1px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}

.recommend-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 20px 8px;
}

.section-title {
  display: flex;
  align-items: end;
  gap: 10px;
}

.section-title h2 {
  margin-top: 2px;
  font-size: 21px;
  letter-spacing: -.03em;
}

.result-count {
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.filter-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-soft);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 700;
}

.active-filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 20px 12px;
  scrollbar-width: none;
}

.active-filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  min-height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 700;
}

.deck-section {
  padding: 0 18px;
}

.profile-deck {
  position: relative;
  height: min(112vw, 530px);
  max-height: 530px;
  min-height: 440px;
}

.deck-back {
  position: absolute;
  right: 50%;
  width: calc(100% - 34px);
  height: calc(100% - 22px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: translateX(50%);
}

.deck-back--one {
  top: 10px;
  width: calc(100% - 18px);
  opacity: .9;
}

.deck-back--two {
  top: 19px;
  opacity: .55;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.profile-card--deck {
  position: absolute;
  z-index: 3;
  inset: 0 0 20px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  touch-action: pan-y;
  will-change: transform;
}

.profile-card--deck.is-dragging {
  cursor: grabbing;
  transition: none;
}

.profile-media {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  text-align: left;
  background: var(--surface-soft);
}

.profile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.profile-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(22, 13, 23, .12) 70%, rgba(22, 13, 23, .72) 100%);
  pointer-events: none;
}

.profile-score {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  color: #fff;
  background: rgba(32, 20, 37, .34);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 750;
}

.swipe-stamp {
  position: absolute;
  top: 90px;
  padding: 7px 13px;
  border: 3px solid currentColor;
  border-radius: 9px;
  opacity: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: rotate(-12deg);
}

.swipe-stamp--like {
  left: 20px;
  color: #3ed39a;
}

.swipe-stamp--pass {
  right: 20px;
  color: #ff7188;
  transform: rotate(12deg);
}

.profile-card-content {
  padding: 17px 18px 18px;
}

.profile-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-card-title h2 {
  font-size: 24px;
  letter-spacing: -.035em;
}

.profile-card-title h2 span {
  font-weight: 600;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-bio {
  display: -webkit-box;
  margin-top: 9px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.profile-card-content .tag-row {
  margin-top: 12px;
}

.deck-actions {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin: -42px 0 8px;
}

.round-action {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}

.round-action:active { transform: scale(.91); }
.round-action--pass { color: var(--danger); }
.round-action--super { width: 48px; height: 48px; color: var(--secondary); }
.round-action--like { color: #fff; background: linear-gradient(135deg, var(--primary), #ff779e); box-shadow: 0 13px 25px rgba(235, 64, 119, .25); }

.swipe-hint {
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
}

.empty-state--deck {
  min-height: 430px;
  border: 1px dashed var(--line-strong);
  border-radius: 28px;
  background: var(--surface);
}

.content-section {
  padding: 27px 20px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-top: 2px;
  font-size: 19px;
  letter-spacing: -.025em;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 11px;
}

.section-heading > a {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.section-heading--compact {
  align-items: end;
}

.mini-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mini-profile {
  min-width: 0;
  padding: 0 0 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: left;
}

.mini-profile-media {
  position: relative;
  display: block;
  aspect-ratio: 1.12;
  overflow: hidden;
}

.mini-profile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-profile-media > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(30, 19, 31, .42);
  backdrop-filter: blur(8px);
  font-size: 9px;
}

.mini-profile strong,
.mini-profile small {
  display: block;
  overflow: hidden;
  padding: 0 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-profile strong {
  margin-top: 10px;
  font-size: 13px;
}

.mini-profile small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

/* Moments */
.page--moments .page-main,
.page--messages .page-main,
.page--matches .page-main,
.page--profile .page-main {
  background: var(--surface-muted);
}

.moment-composer {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 11px;
  margin: 12px 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.moment-composer > span:nth-child(2) {
  flex: 1;
  color: var(--text-muted);
  font-size: 13px;
}

.moment-feed {
  display: grid;
  gap: 10px;
  padding: 0 14px;
}

.moment-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  content-visibility: auto;
  contain-intrinsic-size: 520px;
}

.moment-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.author-button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.author-button > span:last-child {
  display: grid;
  gap: 3px;
}

.author-button strong {
  font-size: 13px;
}

.author-button small {
  color: var(--text-muted);
  font-size: 10px;
}

.moment-text {
  margin: 12px 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.75;
}

.moment-image {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  background: var(--surface-soft);
}

.moment-image img {
  width: 100%;
  aspect-ratio: 1.44;
  object-fit: cover;
}

.moment-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 11px;
  border-top: 1px solid var(--line);
}

.moment-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.moment-action.is-liked {
  color: var(--primary);
}

.moment-action.is-liked .icon {
  fill: currentColor;
}

.comment-preview {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.comment-preview strong {
  margin-right: 4px;
  color: var(--text);
}

.comment-preview button {
  justify-self: start;
  color: var(--text-muted);
  font-size: 10px;
}

/* Messages */
.search-box {
  padding: 10px 16px;
}

.search-box label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-muted);
  background: var(--surface);
}

.search-box input {
  flex: 1;
  height: 42px;
  font-size: 13px;
}

.search-clear {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--surface-muted);
}

.is-hidden { display: none !important; }

.match-strip-section,
.conversation-section {
  padding: 12px 16px 6px;
}

.match-strip-section {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.match-strip {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 2px 1px 13px;
  scrollbar-width: none;
}

.match-strip::-webkit-scrollbar { display: none; }

.match-bubble {
  display: grid;
  flex: 0 0 67px;
  justify-items: center;
  gap: 6px;
}

.match-bubble > span {
  position: relative;
}

.match-bubble .avatar {
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.match-bubble i {
  position: absolute;
  right: -2px;
  bottom: -1px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}

.match-bubble i .icon { fill: currentColor; }

.match-bubble strong {
  width: 100%;
  overflow: hidden;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-section {
  margin-top: 6px;
}

.conversation-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.conversation-item {
  position: relative;
  display: flex;
  min-height: 78px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.conversation-item:last-child { border-bottom: 0; }

.conversation-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 11px;
  padding: 11px 4px 11px 13px;
  text-align: left;
}

.conversation-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 6px;
}

.conversation-top,
.conversation-bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.conversation-top strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.conversation-top strong .icon { color: var(--primary); }

.conversation-top time {
  color: var(--text-muted);
  font-size: 9px;
}

.conversation-bottom > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-bottom b {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-size: 9px;
}

.conversation-item.has-unread .conversation-top strong {
  font-weight: 850;
}

.conversation-item.has-unread .conversation-bottom > span {
  color: var(--text-soft);
}

.conversation-menu-button {
  display: grid;
  width: 36px;
  height: 58px;
  place-items: center;
  color: var(--text-muted);
}

/* Matches */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: 12px 16px 16px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-muted);
}

.segmented-control button {
  min-height: 39px;
  border-radius: 11px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.segmented-control button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  margin-left: 3px;
  border-radius: 10px;
  background: var(--line);
  font-size: 9px;
}

.segmented-control button.is-active {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.segmented-control button.is-active span {
  color: #fff;
  background: var(--primary);
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.match-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.match-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: .88;
  overflow: hidden;
}

.match-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-online {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(26, 20, 28, .42);
  backdrop-filter: blur(8px);
  font-size: 8px;
}

.match-online.is-online {
  background: rgba(25, 158, 112, .78);
}

.match-card-copy {
  padding: 11px;
}

.match-card-copy h2 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.match-card-copy p {
  margin: 4px 0 10px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card-copy .primary-button { width: 100%; }

.match-card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.round-mini {
  display: grid;
  height: 38px;
  place-items: center;
  border-radius: 12px;
}

.round-mini--pass { color: var(--danger); background: var(--danger-soft); }
.round-mini--like { color: #fff; background: var(--primary); }
.round-mini--like .icon { fill: currentColor; }

.match-empty {
  grid-column: 1 / -1;
  margin-top: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
}

/* Profile */
.profile-hero-self {
  background: var(--surface);
}

.profile-cover-self {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.profile-cover-self > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 15, 23, .12), rgba(21, 15, 23, .08) 45%, rgba(21, 15, 23, .65));
}

.profile-settings-button {
  position: absolute;
  top: calc(12px + var(--top-safe));
  right: 14px;
  color: #fff;
  background: rgba(27, 20, 30, .32);
  backdrop-filter: blur(12px);
}

.profile-self-info {
  position: relative;
  padding: 0 20px 20px;
  text-align: center;
}

.profile-avatar-edit {
  position: relative;
  display: inline-block;
  margin-top: -54px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.profile-avatar-edit > i {
  position: absolute;
  right: 1px;
  bottom: 3px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid var(--surface);
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}

.profile-avatar-edit--large {
  margin: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.profile-self-info .profile-name-row {
  justify-content: center;
  margin-top: 10px;
}

.profile-name-row h1 {
  font-size: 24px;
  letter-spacing: -.035em;
}

.profile-self-info > p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 6px 0 13px;
  color: var(--text-muted);
  font-size: 11px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.profile-stats button {
  display: grid;
  gap: 3px;
  padding: 15px 5px;
  border-right: 1px solid var(--line);
}

.profile-stats button:last-child { border-right: 0; }

.profile-stats strong {
  font-size: 20px;
}

.profile-stats span {
  color: var(--text-muted);
  font-size: 10px;
}

.profile-completion-card {
  margin: 10px 14px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--secondary) 18%, var(--line));
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface), var(--secondary-soft));
}

.completion-copy {
  display: flex;
  align-items: center;
  gap: 11px;
}

.completion-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--secondary);
  background: var(--surface);
}

.completion-copy h2 {
  font-size: 13px;
}

.completion-copy p {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.5;
}

.progress-track {
  height: 7px;
  margin: 13px 0 9px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--secondary) 14%, var(--surface));
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.profile-completion-card > a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--secondary);
  font-size: 10px;
  font-weight: 750;
}

.menu-card {
  margin: 10px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.menu-row {
  display: flex;
  width: 100%;
  min-height: 67px;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.menu-row:last-child { border-bottom: 0; }

.menu-row-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.menu-row-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.menu-row-copy strong { font-size: 13px; }
.menu-row-copy small { color: var(--text-muted); font-size: 10px; }
.menu-row > .icon { color: var(--text-muted); }

.menu-badge {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-size: 9px;
}

.profile-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 11px 20px 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.6;
}

.profile-note .icon { color: var(--success); }

/* User detail */
.user-detail-hero {
  position: relative;
  height: min(114vw, 550px);
  min-height: 455px;
  overflow: hidden;
  background: var(--surface-soft);
}

.user-detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-detail-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 13, 20, .22), transparent 30%, rgba(18, 13, 20, .8));
}

.detail-floating-header {
  position: absolute;
  top: calc(12px + var(--top-safe));
  right: 14px;
  left: 14px;
  display: flex;
  justify-content: space-between;
}

.detail-hero-copy {
  position: absolute;
  right: 20px;
  bottom: 24px;
  left: 20px;
  color: #fff;
}

.detail-hero-copy h1 {
  font-size: 31px;
}

.detail-hero-copy .verified-badge { color: #fff; }

.detail-hero-copy > p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: rgba(255,255,255,.82);
  font-size: 11px;
}

.online-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42df9d;
}

.detail-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  margin-top: -12px;
  padding: 0 16px 108px;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
}

.compatibility-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: -25px;
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 17px;
  color: var(--secondary);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.compatibility-banner > div {
  display: grid;
  gap: 3px;
}

.compatibility-banner strong { font-size: 13px; }
.compatibility-banner span { color: var(--text-soft); font-size: 10px; }

.detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-facts span {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 10px;
}

.detail-facts .icon { color: var(--primary); }

.detail-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.detail-block h2 {
  margin-bottom: 10px;
  font-size: 15px;
}

.detail-block > p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.75;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 8px;
}

.detail-gallery img {
  width: 100%;
  height: 165px;
  border-radius: 13px;
  object-fit: cover;
}

.safety-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--success) 22%, var(--line));
  border-radius: 16px;
  background: var(--success-soft);
}

.safety-inline > .icon { color: var(--success); }
.safety-inline > div { flex: 1; }
.safety-inline strong { font-size: 11px; }
.safety-inline p { margin-top: 2px; color: var(--text-soft); font-size: 9px; }
.safety-inline a { color: var(--success); font-size: 10px; font-weight: 750; }

.detail-action-bar {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  display: flex;
  width: min(100%, var(--max-app-width));
  min-height: calc(79px + var(--bottom-safe));
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px var(--bottom-safe);
  border-top: 1px solid var(--line);
  background: var(--surface-raised);
  box-shadow: 0 -10px 28px rgba(35,22,35,.07);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.detail-action-bar .round-action {
  width: 51px;
  height: 51px;
  flex: 0 0 auto;
}

.detail-chat-button,
.detail-like-button {
  min-height: 51px;
  flex: 1;
  border-radius: 16px;
}

.detail-like-button.is-liked {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: none;
}

.detail-like-button.is-liked .icon { fill: currentColor; }

/* Chat */
.chat-layout {
  display: grid;
  height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  background: var(--surface-muted);
}

.chat-layout .topbar {
  position: relative;
}

.chat-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 15px 14px 20px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.chat-safety-tip {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  font-size: 9px;
}

.chat-date {
  align-self: center;
  color: var(--text-muted);
  font-size: 9px;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.chat-row--me {
  justify-content: flex-end;
}

.chat-bubble-wrap {
  display: grid;
  max-width: min(72%, 315px);
  gap: 4px;
}

.chat-row--me .chat-bubble-wrap { justify-items: end; }

.chat-bubble {
  padding: 10px 13px;
  border-radius: 16px 16px 16px 5px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-row--me .chat-bubble {
  border-radius: 16px 16px 5px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.chat-bubble-wrap time {
  color: var(--text-muted);
  font-size: 8px;
}

.chat-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: auto;
  padding: 30px;
  color: var(--text-muted);
  text-align: center;
}

.chat-empty h2 { color: var(--text); font-size: 17px; }
.chat-empty p { font-size: 11px; }

.quick-replies {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: none;
}

.quick-replies::-webkit-scrollbar { display: none; }

.quick-replies button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 10px;
}

.chat-composer {
  display: flex;
  min-height: calc(62px + var(--bottom-safe));
  align-items: flex-start;
  gap: 7px;
  padding: 8px 10px calc(8px + var(--bottom-safe));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chat-composer > .icon-button {
  width: 39px;
  height: 42px;
  color: var(--text-muted);
}

.chat-composer label {
  display: flex;
  min-height: 42px;
  flex: 1;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-muted);
}

.chat-composer textarea {
  width: 100%;
  min-height: 20px;
  max-height: 120px;
  line-height: 1.45;
}

.send-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 7px 15px color-mix(in srgb, var(--primary) 25%, transparent);
}

/* Notifications */
.notice-list {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
}

.notice-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: left;
}

.notice-item.is-unread {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  background: linear-gradient(135deg, var(--surface), var(--primary-soft));
}

.notice-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
}

.notice-icon--system { color: var(--secondary); background: var(--secondary-soft); }
.notice-icon--safety { color: var(--success); background: var(--success-soft); }

.notice-copy {
  display: grid;
  flex: 1;
  gap: 4px;
}

.notice-copy strong { font-size: 13px; }
.notice-copy p { color: var(--text-soft); font-size: 10px; line-height: 1.5; }
.notice-copy time { color: var(--text-muted); font-size: 9px; }
.notice-item > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--primary); }

/* Edit profile and settings */
.page--form .page-main,
.page--settings .page-main,
.page--safety .page-main,
.page--simple .page-main {
  background: var(--surface-muted);
}

.edit-profile-form {
  display: grid;
  gap: 11px;
  padding: 12px 14px 30px;
}

.edit-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
}

.edit-avatar-section h2 { font-size: 15px; }
.edit-avatar-section p { margin: 4px 0 8px; color: var(--text-muted); font-size: 10px; }

.form-card {
  display: grid;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
}

.card-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.card-heading h2 { font-size: 14px; }
.card-heading p { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.card-heading > span { color: var(--primary); font-size: 11px; font-weight: 750; }

.selectable-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selectable-tags label { cursor: pointer; }
.selectable-tags input { position: absolute; opacity: 0; pointer-events: none; }
.selectable-tags span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 650;
}

.selectable-tags input:checked + span {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  color: var(--primary);
  background: var(--primary-soft);
}

.switch-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.switch-row + .switch-row {
  border-top: 1px solid var(--line);
}

.switch-row > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.switch-row > span:has(b) {
  display: grid;
  flex: 1;
  gap: 3px;
}

.switch-row b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
}

.switch-row small {
  padding-left: 28px;
  color: var(--text-muted);
  font-size: 9px;
}

.switch-row input {
  position: absolute;
  opacity: 0;
}

.switch-row > i {
  position: relative;
  display: block;
  width: 43px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--line-strong);
  transition: background .2s ease;
}

.switch-row > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  content: "";
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transition: transform .2s var(--ease);
}

.switch-row input:checked + i {
  background: var(--primary);
}

.switch-row input:checked + i::after {
  transform: translateX(18px);
}

.settings-section {
  padding: 15px 14px 0;
}

.settings-section > h2 {
  margin: 0 5px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.settings-card {
  padding: 0 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.settings-card--buttons { padding: 0; }

.settings-button {
  display: flex;
  width: 100%;
  min-height: 57px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.settings-button:last-child { border-bottom: 0; }
.settings-button > span { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.settings-button > span .icon { color: var(--primary); }
.settings-button > .icon { color: var(--text-muted); }

.version-copy {
  padding: 18px 0 28px;
  color: var(--text-muted);
  font-size: 9px;
  text-align: center;
}

/* Safety */
.safety-hero {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 26px 24px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--success-soft), transparent);
}

.safety-hero > span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 23px;
  color: var(--success);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.safety-hero h1 { font-size: 22px; }
.safety-hero p { max-width: 320px; color: var(--text-soft); font-size: 11px; line-height: 1.6; }

.safety-tip-list {
  display: grid;
  gap: 9px;
  padding: 0 14px;
}

.safety-tip-list article {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.safety-tip-list article > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--success);
  background: var(--success-soft);
}

.safety-tip-list h2 { font-size: 13px; }
.safety-tip-list p { margin-top: 4px; color: var(--text-soft); font-size: 10px; line-height: 1.6; }

.safety-action-card,
.community-rules {
  margin: 10px 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.safety-action-card h2,
.community-rules h2 { font-size: 14px; }
.safety-action-card p,
.community-rules p { margin: 5px 0 12px; color: var(--text-soft); font-size: 10px; line-height: 1.65; }
.community-rules { margin-bottom: 28px; }
.community-rules p { margin-bottom: 0; }

/* Modal */
.modal-root {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.modal-root.is-open {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(18, 12, 20, .55);
  backdrop-filter: blur(4px);
  transition: opacity .22s ease;
}

.modal-root.is-open .modal-backdrop { opacity: 1; }

.modal {
  position: absolute;
  width: min(100%, var(--max-app-width));
  max-height: min(88dvh, 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: transform .24s var(--ease), opacity .2s ease;
}

.modal--sheet {
  bottom: 0;
  border-radius: 25px 25px 0 0;
  transform: translateY(105%);
}

.modal-root.is-open .modal--sheet { transform: translateY(0); }

.modal--center {
  top: 50%;
  width: min(calc(100% - 34px), 420px);
  border-radius: 24px;
  opacity: 0;
  transform: translateY(-47%) scale(.94);
}

.modal-root.is-open .modal--center {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.modal--full {
  inset: 0 auto;
  width: min(100%, var(--max-app-width));
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  opacity: 0;
}

.modal-root.is-open .modal--full { opacity: 1; }

.modal-handle {
  width: 42px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 999px;
  background: var(--line-strong);
}

.modal--center .modal-handle,
.modal--full .modal-handle { display: none; }

.modal-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px 7px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 { font-size: 17px; }

.modal-content {
  max-height: calc(88dvh - 65px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal--center .modal-content { max-height: 80dvh; }
.modal--full .modal-content { max-height: calc(100dvh - 58px); }

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

.filter-form,
.moment-form,
.report-form {
  padding: 16px 18px calc(18px + var(--bottom-safe));
}

.filter-group {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.filter-group:first-child { padding-top: 0; }
.filter-group:last-of-type { border-bottom: 0; }

.filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.filter-label strong { font-size: 13px; }
.filter-label span { color: var(--primary); font-size: 10px; }

.selectable-tags--filter span {
  min-height: 32px;
  padding: 0 11px;
  font-size: 10px;
}

.dual-range {
  display: grid;
  gap: 9px;
}

.dual-range label {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  color: var(--text-muted);
  font-size: 9px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary));
}

input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  appearance: none;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 7px rgba(0,0,0,.18);
}

.match-celebration,
.confirm-panel,
.info-panel,
.about-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px 24px 24px;
  text-align: center;
}

.match-celebration {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, var(--primary-soft), transparent 52%);
}

.match-avatar-pair {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.match-avatar-pair .avatar:first-child { transform: translateX(8px) rotate(-6deg); }
.match-avatar-pair .avatar:last-child { transform: translateX(-8px) rotate(6deg); }
.match-avatar-pair > span {
  z-index: 2;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 4px solid var(--surface);
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}
.match-avatar-pair > span .icon { fill: currentColor; }

.match-celebration h2,
.confirm-panel h2,
.info-panel h2,
.about-panel h2 { font-size: 20px; }
.match-celebration > p:not(.eyebrow),
.confirm-panel > p,
.info-panel > p,
.about-panel > p { color: var(--text-soft); font-size: 11px; line-height: 1.65; }

.match-modal-actions {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 8px;
}

.match-spark {
  position: absolute;
  color: var(--primary);
  font-size: 25px;
  animation: float 2.2s ease-in-out infinite;
}

.match-spark--one { top: 32px; left: 48px; }
.match-spark--two { top: 65px; right: 45px; animation-delay: -.8s; color: var(--secondary); }

@keyframes float {
  50% { transform: translateY(-8px) rotate(14deg); }
}

.action-list {
  display: grid;
  padding: 6px 14px calc(14px + var(--bottom-safe));
}

.action-list > button {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 11px;
  padding: 10px 3px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.action-list > button:last-child { border-bottom: 0; }
.action-list .action-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
}
.action-list button > span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
.action-list strong { font-size: 12px; }
.action-list small { color: var(--text-muted); font-size: 9px; }
.action-list > button > .icon { color: var(--text-muted); }
.action-list .danger-action .action-icon,
.action-list .danger-action strong { color: var(--danger); }
.action-list .danger-action .action-icon { background: var(--danger-soft); }

.radio-list {
  display: grid;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.radio-list label {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.radio-list label:last-child { border-bottom: 0; }
.radio-list input { position: absolute; opacity: 0; }
.radio-list span { flex: 1; font-size: 11px; }
.radio-list .icon { opacity: 0; color: var(--primary); }
.radio-list input:checked ~ .icon { opacity: 1; }

.image-picker { margin-top: 15px; }
.image-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.image-picker-grid label { position: relative; overflow: hidden; border-radius: 12px; cursor: pointer; }
.image-picker-grid input { position: absolute; opacity: 0; }
.image-picker-grid img { width: 100%; aspect-ratio: 1.2; object-fit: cover; }
.image-picker-grid i {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: none;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}
.image-picker-grid input:checked ~ i { display: grid; }
.image-picker-grid input:checked + img { outline: 3px solid var(--primary); outline-offset: -3px; }

.comments-panel { display: grid; min-height: 320px; grid-template-rows: minmax(0, 1fr) auto; }
.comments-list { display: grid; align-content: start; gap: 13px; max-height: 48dvh; overflow-y: auto; padding: 15px 18px; }
.comments-list article { display: flex; align-items: flex-start; gap: 9px; }
.comment-avatar { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--secondary); background: var(--secondary-soft); font-size: 12px; font-weight: 800; }
.comments-list article div { padding: 8px 11px; border-radius: 4px 13px 13px; background: var(--surface-muted); }
.comments-list strong { font-size: 10px; }
.comments-list p { margin-top: 3px; color: var(--text-soft); font-size: 11px; line-height: 1.5; }
.comment-composer { display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--bottom-safe)); border-top: 1px solid var(--line); }
.comment-composer input { flex: 1; min-height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-muted); }

.chat-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px 18px calc(24px + var(--bottom-safe));
}
.chat-tool-grid button { display: grid; justify-items: center; gap: 8px; color: var(--text-soft); font-size: 10px; }
.chat-tool-grid button .icon { display: grid; width: 50px; height: 50px; padding: 13px; border-radius: 16px; color: var(--primary); background: var(--primary-soft); }

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 17px 17px calc(22px + var(--bottom-safe));
}
.avatar-picker button { position: relative; overflow: hidden; border: 2px solid transparent; border-radius: 18px; }
.avatar-picker button.is-selected { border-color: var(--primary); }
.avatar-picker img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.avatar-picker button > .icon { position: absolute; right: 4px; bottom: 4px; padding: 3px; border-radius: 50%; color: #fff; background: var(--primary); }

.confirm-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  color: var(--primary);
  background: var(--primary-soft);
}

.confirm-panel .modal-actions { width: 100%; }
.info-panel > .icon { color: var(--primary); }
.info-panel .primary-button,
.about-panel .primary-button { width: 100%; margin-top: 7px; }
.about-panel img { border-radius: 22px; box-shadow: var(--shadow-sm); }
.about-panel dl { display: grid; width: 100%; gap: 7px; margin: 5px 0; padding: 12px; border-radius: 14px; background: var(--surface-muted); }
.about-panel dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.about-panel dt { color: var(--text-muted); }
.about-panel dd { color: var(--text); font-weight: 700; }

.image-preview {
  display: grid;
  min-height: calc(100dvh - 58px);
  place-items: center;
  padding: 18px;
  background: #151116;
}
.image-preview img { width: 100%; max-height: 78dvh; border-radius: 18px; object-fit: contain; }

/* Toast */
.toast-root {
  position: fixed;
  z-index: 300;
  top: calc(18px + var(--top-safe));
  left: 50%;
  display: grid;
  width: min(calc(100% - 32px), 420px);
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  opacity: 0;
  color: #fff;
  background: rgba(34, 27, 36, .92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  font-size: 11px;
  font-weight: 650;
  transform: translateY(-12px) scale(.96);
  transition: opacity .2s ease, transform .2s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.toast--success .icon { color: #5ce0b0; }
.toast--error .icon { color: #ff8797; }

/* Small screens */
@media (max-width: 365px) {
  .auth-card { padding-right: 18px; padding-left: 18px; }
  .home-header { padding-right: 16px; padding-left: 16px; }
  .home-header h1 { font-size: 24px; }
  .profile-deck { min-height: 410px; }
  .profile-card-content { padding: 14px; }
  .profile-card-title h2 { font-size: 21px; }
  .profile-bio { -webkit-line-clamp: 1; }
  .tag { padding: 0 8px; }
  .deck-actions { gap: 20px; }
  .match-grid { gap: 9px; padding-right: 12px; padding-left: 12px; }
  .field-grid { grid-template-columns: 1fr; }
}

/* Wide screens */
@media (min-width: 720px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100dvh - 40px); border-radius: 30px; }
  .app,
  .page { min-height: calc(100dvh - 40px); }
  .bottom-nav,
  .detail-action-bar { bottom: 20px; border-radius: 0 0 30px 30px; }
  .modal--sheet { bottom: 20px; border-radius: 25px; }
  .modal--full { top: 20px; bottom: 20px; max-height: calc(100dvh - 40px); border-radius: 30px; }
  .auth-page { min-height: calc(100dvh - 40px); }
  .chat-layout { height: calc(100dvh - 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Internationalization */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.language-switcher {
  position: relative;
  display: inline-flex;
  min-width: 0;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 13px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(16px);
}

.language-switcher > .icon {
  flex: 0 0 auto;
  pointer-events: none;
}

.language-switcher > .icon:last-child {
  width: 13px;
  color: var(--text-muted);
}

.language-switcher select {
  width: auto;
  max-width: 128px;
  min-height: 36px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  line-height: 36px;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.language-switcher--auth {
  position: absolute;
  z-index: 4;
  top: calc(12px + var(--top-safe));
  right: 14px;
}

.settings-card--language {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px 11px 15px;
}

.language-setting-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.language-setting-copy b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.language-setting-copy b .icon {
  color: var(--primary);
}

.language-setting-copy small {
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.45;
}

.language-switcher--settings {
  flex: 0 0 auto;
  box-shadow: none;
  background: var(--surface-muted);
}

html[lang="de"] .nav-item,
html[lang="ru"] .nav-item,
html[lang="fr"] .nav-item,
html[lang="pt-BR"] .nav-item {
  font-size: 9px;
  letter-spacing: -.02em;
}

html[lang="de"] .primary-button,
html[lang="ru"] .primary-button,
html[lang="fr"] .primary-button {
  letter-spacing: -.015em;
}

@media (max-width: 355px) {
  .settings-card--language {
    align-items: stretch;
    flex-direction: column;
  }

  .language-switcher--settings,
  .language-switcher--settings select {
    width: 100%;
    max-width: none;
  }
}
