@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Nunito:wght@400;600;700&display=swap');

:root {
  --bg0: #eef4ff;
  --bg1: #f7eef8;
  --bg2: #e8faf4;
  --ink: #243044;
  --muted: #5d6b82;
  --card: rgba(255, 255, 255, 0.55);
  --stroke: rgba(255, 255, 255, 0.65);
  --accent: #7c8cff;
  --accent-2: #57c5b6;
  --rose: #e8a0bf;
  --male: #5b8def;
  --female: #e07aa8;
  --nb: #9b7ed9;
  --shadow: 0 20px 60px rgba(70, 90, 140, 0.14);
  --radius: 22px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html:has(.shell-app),
body:has(.shell-app),
html.app-noscroll,
body.app-noscroll {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body.app-noscroll {
  position: fixed;
  inset: 0;
  width: 100%;
  touch-action: manipulation;
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% -10%, #dfe7ff 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 0%, #f6d9ea 0%, transparent 50%),
    radial-gradient(800px 500px at 50% 100%, #d8f5ef 0%, transparent 55%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 45%, var(--bg2));
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.35) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.25) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(124,140,255,.18) 0 1.5px, transparent 2px);
  background-size: 180px 180px, 140px 140px, 220px 220px;
  animation: drift 40s linear infinite;
  opacity: .7;
  z-index: 0;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-80px); }
}

#app { position: relative; z-index: 1; min-height: 100vh; }
#app:has(.shell-app),
body.app-noscroll #app {
  height: 100%;
  height: var(--app-vh, 100dvh);
  max-height: var(--app-vh, 100dvh);
  min-height: 0 !important;
  overflow: hidden;
}

.shell { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; max-width: 100%; }
.shell-landing {
  overflow-x: clip;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}
/* Maintenance notice — centered in free space below hero text */
.maint-banner {
  position: relative;
  z-index: 25;
  width: min(36rem, 100%);
  margin: 0 auto;
  padding: .85rem 1rem .95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(124, 140, 255, .35);
  box-shadow: 0 12px 32px rgba(40, 48, 72, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  pointer-events: auto;
  box-sizing: border-box;
}
.maint-banner-title {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.maint-banner-msg {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
}
.maint-banner-countdown {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.maint-banner-meta {
  margin: .45rem 0 0;
  font-size: .85rem;
  color: var(--muted);
}
.maint-auth-notice {
  margin: 0 0 1rem;
}
@media (max-width: 720px) {
  .shell-landing .maint-banner {
    width: 100%;
    max-width: 100%;
    padding: .65rem .8rem .7rem;
    border-radius: 14px;
  }
  .maint-banner-title { font-size: .95rem; }
  .maint-banner-msg { font-size: .82rem; margin-bottom: .3rem; }
  .maint-banner-countdown { font-size: 1.05rem; }
  .maint-banner-meta { font-size: .78rem; margin-top: .35rem; }
}
.nav-landing {
  flex-wrap: wrap;
  min-width: 0;
}
.nav-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}
/* Landing: fill any monitor — footer pinned to bottom, no page scroll */
html:has(.shell-landing),
body:has(.shell-landing) {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  overflow-x: hidden !important;
  overscroll-behavior: none;
  max-width: 100%;
}
#app:has(.shell-landing) {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0 !important;
  overflow: hidden;
  overflow-x: clip;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}
.shell-landing {
  flex: 1 1 auto;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.shell-landing .nav-landing {
  flex-shrink: 0;
}
.shell-landing .hero {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: .85rem;
  padding: .75rem 0 .5rem;
  overflow: hidden;
  position: relative;
}
.shell-landing .hero-core {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: inherit;
  min-width: 0;
  width: auto;
  max-width: min(42rem, 100%);
  margin: 0;
  position: relative;
  z-index: 2;
}
.shell-landing .maint-banner {
  position: relative;
  z-index: 2;
  margin: 0;
  align-self: flex-start;
}
/* Wartung: Hero bleibt in der Mitte; Banner in der freien unteren Fläche */
.shell-landing.has-maint .hero {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 0;
}
.shell-landing.has-maint .hero-visual {
  grid-row: 1 / -1;
  grid-column: 1;
  /* position bleibt absolute — keine inset-Overrides */
}
.shell-landing.has-maint .hero-core {
  grid-row: 2;
  grid-column: 1;
  justify-self: start;
}
.shell-landing.has-maint .maint-banner {
  grid-row: 3;
  grid-column: 1;
  align-self: center; /* vertikal Mitte des freien Bereichs */
  justify-self: start; /* mobil: horizontal wie bisher */
  margin: 0;
  width: min(36rem, 100%);
  max-width: 100%;
}
.shell-landing .footer-note {
  flex-shrink: 0;
  padding: .55rem 0 .75rem;
  margin: 0;
  font-size: .82rem;
  line-height: 1.3;
}
html.learn-open,
body.learn-open {
  overflow-x: hidden !important;
  max-width: 100%;
}
body.learn-open {
  overflow: hidden !important;
  touch-action: none;
}
body.learn-open .learn-panel {
  touch-action: pan-y;
}

/* Mobile landing: tighter spacing */
@media (max-width: 720px) {
  html:has(.shell-landing),
  body:has(.shell-landing) {
    touch-action: manipulation;
  }
  .shell-landing .nav-landing {
    padding: .45rem 0 .35rem;
    gap: .45rem;
  }
  .shell-landing .nav-landing .brand {
    font-size: 1.35rem;
  }
  .shell-landing .nav-landing-actions {
    gap: .35rem;
  }
  .shell-landing .nav-landing-actions .btn {
    padding: .4rem .7rem;
    font-size: .85rem;
  }
  .shell-landing .hero {
    gap: .55rem;
    padding: .35rem 0 .5rem;
  }
  .shell-landing.has-maint .hero-core {
    gap: .55rem;
  }
  .shell-landing .hero h1,
  .shell-landing .hero-title {
    font-size: clamp(1.9rem, 9vw, 2.55rem);
    max-width: 14ch;
  }
  .shell-landing .hero p {
    font-size: .95rem;
    line-height: 1.4;
    max-width: none;
  }
  .shell-landing .hero-actions {
    gap: .45rem;
    margin-top: .15rem;
  }
  .shell-landing .hero-actions .btn {
    padding: .45rem .75rem;
    font-size: .88rem;
  }
  .shell-landing .footer-note {
    padding: .35rem 0 .55rem;
    font-size: .72rem;
  }
  .shell-landing .hero-visual {
    left: 0;
    right: 0;
    top: 6%;
    max-width: none;
    width: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .55rem;
  }
  .shell-landing .hero p.hero-tagline {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem);
    text-align: left;
  }
  .shell-landing .wallpaper-orb {
    width: min(44vw, 168px);
    justify-self: center;
    opacity: .82;
    animation: morph-mobile 7s ease-in-out infinite;
    box-shadow:
      0 10px 28px rgba(90, 110, 180, .24),
      inset 0 -12px 28px rgba(255, 255, 255, .38);
    filter: none;
  }
}
.shell-auth {
  /* Top aligned with landing — no extra shell padding that drops the header */
  padding: 0 0 3rem;
  min-height: 100%;
}
.shell-auth > .nav {
  padding: 1.1rem 0;
  flex-wrap: nowrap;
  align-items: center;
}
.shell-auth .nav-auth-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 1.5rem); }
  .shell-auth {
    padding: 0 0 2.5rem;
    /* Ensure the membership/register form can scroll under mobile browsers */
    overflow: visible;
  }
  .shell-auth > .nav {
    padding: .45rem 0 .35rem;
    gap: .45rem;
  }
  .shell-auth > .nav .brand {
    font-size: 1.35rem;
  }
  .shell-auth .nav-auth-actions .btn {
    padding: .4rem .7rem;
    font-size: .85rem;
  }
  html:has(.shell-auth),
  body:has(.shell-auth) {
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto !important;
    position: static;
    overscroll-behavior: auto;
    touch-action: pan-y;
  }
  #app:has(.shell-auth) {
    height: auto;
    max-height: none;
    min-height: 100dvh !important;
    overflow: visible;
  }
}
.shell-app {
  width: 100%;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(.35rem, 1vh, .7rem);
  padding: clamp(.35rem, 1vh, .75rem) clamp(.5rem, 1.5vw, 1.25rem);
  overflow: hidden;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0; gap: 1rem;
}
.nav-app {
  flex-shrink: 0;
  padding: 0;
  gap: 1rem;
  align-items: center;
}
.nav-app .brand { font-size: clamp(1.35rem, 2.4vw, 2rem); }
.nav-app .brand.nav-app-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.nav-app-end {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-left: auto;
  flex-shrink: 0;
}
.avatar-nav { width: clamp(32px, 3.5vw, 40px); height: clamp(32px, 3.5vw, 40px); border-radius: 12px; }
.nav-nick {
  font-size: clamp(.9rem, 1.2vw, 1.05rem);
  line-height: 1;
  margin: 0;
}
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 5;
}
.lang-switch.is-open {
  z-index: 90;
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: .35rem .6rem;
  cursor: pointer;
  font: inherit;
  font-size: clamp(.85rem, 1.1vw, .95rem);
  color: var(--ink);
  line-height: 1;
  box-shadow: none;
}
.lang-trigger:hover {
  background: transparent;
  opacity: .85;
}
.lang-flag {
  font-size: 1.25rem;
  line-height: 1;
}
.lang-caret {
  font-size: .7rem;
  opacity: .55;
  margin-left: .05rem;
}
.lang-menu {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  min-width: 12.5rem;
  margin: 0;
  padding: .35rem;
  list-style: none;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(40, 48, 72, .16);
  z-index: 95;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: .55rem .65rem;
  cursor: pointer;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  text-align: left;
}
.lang-option:hover {
  background: rgba(120, 140, 180, .12);
}
.lang-option.is-active {
  background: rgba(120, 140, 180, .16);
  font-weight: 600;
}
.lang-compact .lang-trigger {
  padding: .3rem .45rem;
  min-width: 2.4rem;
  justify-content: center;
}
.lang-compact .lang-trigger-name {
  display: none;
}
.lang-compact .lang-caret {
  display: none;
}
.m-menu-lang .lang-switch {
  display: flex;
  width: 100%;
}
.m-menu-lang .lang-trigger {
  width: 100%;
  justify-content: flex-start;
  padding: .65rem .8rem;
  font-size: 1rem;
  background: transparent;
  border: 0;
}
.m-menu-lang .lang-menu {
  left: 0;
  right: 0;
  min-width: 0;
  width: 100%;
}
.notice-app, .error-app {
  flex-shrink: 0;
  margin: 0;
  padding: .5rem .85rem;
  font-size: .92rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  line-height: 1;
}
.brand-mark {
  width: 1.1em;
  height: 1.1em;
  border-radius: 24%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  align-self: center;
  box-shadow: 0 4px 14px rgba(70, 90, 140, .16);
}
.brand-word {
  min-width: 0;
  line-height: 1;
  display: block;
  align-self: center;
}
.brand span { color: var(--accent); }

.btn, button.btn {
  border: 0; cursor: pointer;
  border-radius: 999px;
  padding: .75rem 1.2rem;
  font-weight: 700;
  font-family: inherit;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9aa6ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(124,140,255,.35);
}
.btn-ghost {
  background: rgba(255,255,255,.45);
  color: var(--ink);
  border: 1px solid var(--stroke);
}
.btn-soft {
  background: linear-gradient(135deg, #89e0d0, #7c8cff);
  color: #123;
}

.hero {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: 1.2rem;
  padding: 2rem 0 1rem;
  position: relative;
  overflow: hidden; /* clip decorative orb — no sideways page scroll */
  max-width: 100%;
}
.hero h1, .hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1;
  margin: 0;
  max-width: 16ch;
  animation: rise .8s ease both;
  display: inline-flex;
  align-items: center;
  gap: .4em;
}
.hero-mark {
  width: .85em;
  height: .85em;
  border-radius: 24%;
  display: block;
  align-self: center;
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(70, 90, 140, .2);
}
.hero-title .brand-word {
  display: block;
  align-self: center;
  line-height: 1;
}
.hero-title .brand-word span { color: var(--accent); }
.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 42ch;
  margin: 0;
  animation: rise .9s ease .1s both;
}
.hero p.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.8vw, 3.75rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  white-space: pre-line;
  text-align: right;
  max-width: none;
  animation: rise .85s ease .05s both;
  flex: 0 1 auto;
}
.hero-copy {
  white-space: pre-line;
  line-height: 1.45;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; animation: rise 1s ease .15s both; }

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

.hero-visual {
  position: absolute;
  right: clamp(1.5rem, 8vw, 5rem);
  top: 12%;
  left: auto;
  bottom: auto;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.35rem);
  pointer-events: none;
  max-width: min(92%, 36rem);
  /* no transform here — would fight child rise/morph animations */
  transform: none;
}
.wallpaper-orb {
  position: relative;
  right: auto;
  top: auto;
  flex: 0 0 auto;
  width: min(32vw, 320px);
  aspect-ratio: 1;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  background:
    radial-gradient(circle at 30% 30%, #fff8, transparent 40%),
    linear-gradient(140deg, #c9d4ff, #f3c6dd 50%, #b8efe4);
  filter: blur(0.2px);
  animation: morph 12s ease-in-out infinite;
  opacity: .9;
  z-index: 0;
  transform-origin: center center;
}
@keyframes morph {
  0%, 100% { border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%; transform: rotate(0deg) scale(1); }
  50% { border-radius: 55% 45% 40% 60% / 50% 55% 45% 50%; transform: rotate(6deg) scale(1.03); }
}
@keyframes morph-mobile {
  0% {
    border-radius: 38% 62% 58% 42% / 42% 48% 52% 58%;
    transform: rotate(-8deg) scale(1);
  }
  33% {
    border-radius: 62% 38% 42% 58% / 55% 40% 60% 45%;
    transform: rotate(10deg) scale(1.08);
  }
  66% {
    border-radius: 45% 55% 65% 35% / 38% 62% 40% 55%;
    transform: rotate(-6deg) scale(.94);
  }
  100% {
    border-radius: 38% 62% 58% 42% / 42% 48% 52% 58%;
    transform: rotate(-8deg) scale(1);
  }
}

.panel {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.25rem; }
.auth-login-only {
  display: grid;
  grid-template-columns: minmax(0, 28rem);
  justify-content: center;
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .auth-login-only { grid-template-columns: 1fr; }
  .hero-visual {
    top: 6%;
    left: 0;
    right: 0;
    transform: none;
    max-width: none;
    width: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .55rem;
  }
  .wallpaper-orb {
    opacity: .78;
    width: min(46vw, 200px);
    justify-self: center;
    animation: morph-mobile 7s ease-in-out infinite;
    box-shadow:
      0 10px 28px rgba(90, 110, 180, .22),
      inset 0 -12px 28px rgba(255, 255, 255, .35);
    filter: none;
  }
  .hero p.hero-tagline {
    font-size: clamp(1.55rem, 5.2vw, 2.35rem);
    text-align: left;
  }
}

/* Desktop: hero + maint under header logo (left); tagline+orb on the right */
@media (min-width: 901px) {
  .shell.shell-landing {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: clamp(1rem, 2vw, 1.5rem);
    padding-right: clamp(1rem, 2vw, 1.5rem);
    box-sizing: border-box;
  }
  .shell-landing .hero {
    align-items: flex-start;
  }
  .shell-landing .hero-core {
    width: auto;
    max-width: min(34rem, 42vw);
    margin: 0;
  }
  .shell-landing .hero-visual {
    position: absolute;
    top: 14%;
    right: clamp(1rem, 4vw, 3rem);
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 0;
    max-width: min(38rem, 46vw);
  }
  .shell-landing .hero p.hero-tagline {
    text-align: right;
    animation: none; /* avoid transform clash with layout */
  }
  .shell-landing .hero-title {
    animation: none;
  }
  .shell-landing .hero-copy {
    animation: none;
  }
  .shell-landing .wallpaper-orb {
    width: min(26vw, 280px);
    opacity: .9;
    animation: morph 12s ease-in-out infinite;
    box-shadow: none;
    filter: blur(0.2px);
  }
  /* Desktop: Wartung horizontal Bildschirmmitte, vertikal Mitte der freien Fläche */
  .shell-landing.has-maint .maint-banner {
    justify-self: center;
    width: min(36rem, 90%);
    max-width: 36rem;
    margin: 0;
  }
}

label { display: block; font-size: .85rem; color: var(--muted); margin: .6rem 0 .25rem; }
.profile-form > label {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.35rem 0 .4rem;
  letter-spacing: -.01em;
}
.profile-form > label:first-of-type {
  margin-top: .55rem;
}
.profile-form > .meta-line {
  margin-top: .15rem;
}
.profile-form > .chips {
  margin-bottom: .15rem;
}
.profile-form > .field-grid-2,
.profile-form > .field-grid-3 {
  margin-bottom: .15rem;
}
.profile-form .field-grid-2 > div > label:first-child,
.profile-form .field-grid-3 > div > label:first-child {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: .35rem;
}
.field-grid-2, .field-grid-3 {
  display: grid;
  gap: .4rem .6rem;
  margin: .15rem 0 .35rem;
}
.field-grid-2 { grid-template-columns: 1fr 1fr; }
.field-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.field-grid-2 > div > label:first-child,
.field-grid-3 > div > label:first-child { margin-top: .35rem; }
@media (max-width: 560px) {
  .field-grid-3 { grid-template-columns: 1fr; }
  .field-grid-2 { grid-template-columns: 1fr; }
}
input, select, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(120,140,180,.25);
  background: rgba(255,255,255,.75);
  padding: .7rem .85rem;
  font: inherit;
  color: var(--ink);
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  border-radius: 999px;
  padding: .35rem .7rem;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(120,140,180,.2);
  cursor: pointer;
  font-size: .85rem;
}
.chip.active {
  background: linear-gradient(135deg, rgba(124,140,255,.25), rgba(87,197,182,.25));
  border-color: rgba(124,140,255,.45);
  font-weight: 700;
}

.dash {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns:
    minmax(220px, 18vw)
    minmax(0, 1fr)
    minmax(240px, 20vw);
  gap: clamp(.55rem, 1.2vw, 1.1rem);
  overflow: hidden;
}
.dash > .panel {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(.7rem, 1.4vh, 1.15rem) clamp(.75rem, 1.2vw, 1.25rem);
}
.dash-side > .section-title { flex-shrink: 0; margin: 0 0 .45rem; }
.online-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .55rem;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  margin: 0 0 .45rem;
}
.online-heading .section-title {
  margin: 0;
  min-width: 0;
  flex: 0 1 auto;
}
.drawer-head .online-heading {
  margin: 0;
  flex: 1 1 auto;
}
.online-count {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted, #6b7a90);
  letter-spacing: .01em;
  opacity: .9;
  white-space: nowrap;
}
.dash-side > #new-room {
  flex-shrink: 0;
  width: 100%;
  margin: 0 0 .5rem;
  padding: .55rem .8rem;
}
.online-filters {
  flex-shrink: 0;
  margin: 0 0 .45rem;
  border: 1px solid rgba(80, 96, 130, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.45);
  overflow: hidden;
  min-height: 0;
}
.online-filters[open] {
  display: flex;
  flex-direction: column;
  max-height: min(58vh, 420px);
  overflow: hidden;
}
.online-filters-summary {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  list-style: none;
  padding: .45rem .65rem;
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink, #243048);
  user-select: none;
  flex-shrink: 0;
}
.online-filters-summary::-webkit-details-marker { display: none; }
.online-filters-summary::before {
  content: '▾';
  font-size: .7rem;
  opacity: .55;
  transition: transform .15s ease;
}
.online-filters:not([open]) > .online-filters-summary::before {
  transform: rotate(-90deg);
}
.online-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: rgba(124, 140, 255, .22);
  color: #3a4a8a;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}
.online-filters-body {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 0 .65rem .65rem;
  min-height: 0;
  flex: 1 1 auto;
  max-height: min(48vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.online-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem .45rem;
}
.online-filter-grid > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.online-filter-full { grid-column: 1 / -1; }
.online-filters-body label {
  margin: 0;
  font-size: .7rem;
  font-weight: 600;
  opacity: .78;
}
.online-filters-body select,
.online-filters-body input[type="number"] {
  width: 100%;
  min-width: 0;
  padding: .35rem .45rem;
  border-radius: 10px;
  border: 1px solid rgba(80, 96, 130, .18);
  background: rgba(255,255,255,.72);
  font: inherit;
  font-size: .8rem;
}
.online-filter-looking-label { margin-top: .15rem !important; }
.online-filters-body .chips { gap: .3rem; }
.online-filters-body .chip {
  padding: .22rem .5rem;
  font-size: .72rem;
  border-radius: 999px;
}
.online-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}
.online-filter-actions .btn {
  padding: .3rem .65rem;
  font-size: .78rem;
}
.online-filter-count {
  flex-shrink: 0;
  margin: 0 0 .35rem;
  font-size: .75rem;
}
@media (min-width: 1600px) {
  .dash {
    grid-template-columns:
      minmax(260px, 16vw)
      minmax(0, 1fr)
      minmax(280px, 18vw);
  }
}
@media (max-width: 1100px) {
  .dash {
    grid-template-columns: minmax(180px, 30%) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 34%);
  }
  .dash > .chat-pane { grid-column: 2; grid-row: 1 / span 2; }
  .dash > .dash-side:first-child { grid-column: 1; grid-row: 1; }
  .dash > .dash-side:last-child { grid-column: 1; grid-row: 2; }
}
/* Mobile: chat is fullscreen; rooms/online/nav live in drawers */
.m-only { display: none !important; }
.desk-only { display: revert; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-shrink: 0;
  margin-bottom: .35rem;
}
.drawer-head .section-title { margin: 0; }
.m-icon-btn {
  border: 0;
  background: rgba(255,255,255,.65);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(70, 90, 140, .08);
}
.m-icon-btn:active { transform: scale(.96); }
.m-icon-btn#m-menu {
  position: relative;
}
.m-menu-dot {
  position: absolute;
  top: .28rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
  pointer-events: none;
}
.m-menu-dot--dm {
  right: .28rem;
  background: #c62828;
}
.m-menu-dot--friend {
  left: .28rem;
  background: #2e7d32;
}
.m-menu-dot[hidden] {
  display: none !important;
}
.m-icon-btn#m-menu.has-friend-notice:not(.has-dm-unread) .m-menu-dot--friend {
  left: auto;
  right: .28rem;
}
.m-chat-heading {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}
.m-chat-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-chat-sub {
  margin: .1rem 0 0;
  font-size: .75rem;
}
.m-nav-end {
  display: flex;
  gap: .35rem;
  align-items: center;
  flex-shrink: 0;
}
/* Shared app menu (⋯) — desktop + mobile */
.drawer-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(36, 48, 68, .35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  touch-action: none;
}
.shell-app.drawer-rooms .drawer-backdrop,
.shell-app.drawer-online .drawer-backdrop,
.shell-app.drawer-menu .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}
.mobile-app-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 340px);
  max-height: var(--app-vh, 100dvh);
  z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--stroke);
  padding: max(.85rem, env(safe-area-inset-top)) 1rem max(.85rem, env(safe-area-inset-bottom));
  box-shadow: 0 0 40px rgba(40,48,72,.25);
  transform: translateX(105%);
  transition: transform .22s ease;
  overflow: hidden;
  overscroll-behavior: none;
}
.shell-app.drawer-menu .mobile-app-menu {
  transform: translateX(0);
}
.m-menu-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: .1rem;
}
.m-menu-user {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .75rem;
}
.m-menu-user .avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
}
.m-menu-user strong {
  font-size: 1.15rem;
}
.m-menu-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .65rem;
  margin-bottom: .4rem;
  text-align: left;
}
.m-menu-ico {
  flex: 0 0 1.45rem;
  width: 1.45rem;
  text-align: center;
  font-size: 1.12rem;
  line-height: 1;
}
.m-menu-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.m-menu-btn .nav-dm-badge,
.m-menu-btn .nav-friend-badge {
  margin-left: auto;
  flex-shrink: 0;
}
.m-menu-section-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .4rem;
}
.m-menu-section-label .m-menu-ico {
  flex-basis: 1.45rem;
}
.m-menu-section-label .m-menu-label {
  flex: 0 1 auto;
}
.m-menu-lang { margin-top: .8rem; }
.m-menu-body .role-switch-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}
.m-menu-body .role-switch-label .m-menu-ico {
  flex-basis: 1.45rem;
}
.m-menu-body .role-switch-label .m-menu-label {
  flex: 0 1 auto;
}

@media (max-width: 768px) {
  .desk-only { display: none !important; }
  .m-only { display: block !important; }
  button.m-only,
  .m-icon-btn.m-only { display: grid !important; }
  .m-nav-end { display: flex !important; }
  .drawer-head.m-only { display: flex !important; }

  /* No page scroll on mobile chat — layout fills the viewport */
  html.app-noscroll,
  body.app-noscroll,
  html:has(.shell-app),
  body:has(.shell-app) {
    position: fixed;
    inset: 0;
    width: 100%;
    height: var(--app-vh, 100dvh);
    max-height: var(--app-vh, 100dvh);
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  .shell-app {
    padding: 0;
    gap: 0;
    background: transparent;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
  }

  /* Hide scrollbars; panes still scroll via touch */
  .messages,
  .side-list,
  .m-menu-body,
  .picker.picker-rich {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .messages::-webkit-scrollbar,
  .side-list::-webkit-scrollbar,
  .m-menu-body::-webkit-scrollbar,
  .picker.picker-rich::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .nav-app {
    position: relative;
    z-index: 40;
    flex-shrink: 0;
    padding: .45rem .55rem;
    padding-top: max(.45rem, env(safe-area-inset-top));
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--stroke);
    gap: .45rem;
  }
  .nav-app .brand.nav-app-brand {
    display: inline-flex !important;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.2rem;
    gap: .35rem;
  }
  .nav-app .brand.nav-app-brand .brand-word {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-pane > .section-title {
    font-size: 1.05rem;
    margin: 0 0 .3rem;
  }
  .error-app {
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    font-size: .85rem;
    padding: .45rem .7rem;
  }

  .dash {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  .dash > .chat-pane {
    grid-column: 1;
    grid-row: 1;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }
  .dash > .dash-rooms,
  .dash > .dash-online {
    position: fixed;
    top: 0;
    bottom: 0;
    width: min(88vw, 340px);
    max-height: var(--app-vh, 100dvh);
    z-index: 60;
    border-radius: 0;
    margin: 0;
    box-shadow: 0 0 40px rgba(40,48,72,.25);
    transform: translateX(-105%);
    transition: transform .22s ease;
    padding-top: max(.75rem, env(safe-area-inset-top));
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
    overflow: hidden;
    overscroll-behavior: none;
  }
  .dash > .dash-rooms { left: 0; }
  .dash > .dash-online {
    left: auto;
    right: 0;
    transform: translateX(105%);
  }
  .shell-app.drawer-rooms .dash-rooms,
  .shell-app.drawer-online .dash-online {
    transform: translateX(0);
  }
  /* Mobile online drawer: filter panel must scroll independently of the user list. */
  .dash > .dash-online .online-filters[open] {
    max-height: min(62dvh, calc(var(--app-vh, 100dvh) - 7.5rem));
  }
  .dash > .dash-online .online-filters-body {
    max-height: none;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .dash-side .side-list {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .chat-pane > .toolbar { margin-top: .15rem; }
  .chat-pane > .picker.picker-rich {
    max-height: min(52vh, 420px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .chat-pane > .messages-wrap {
    flex: 1 1 auto;
    min-height: 0;
  }
  .messages {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .composer {
    flex-shrink: 0;
    padding-bottom: max(.15rem, env(safe-area-inset-bottom));
  }
}

.side-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  overflow: auto;
  overscroll-behavior: contain;
}
.side-list.rooms-pulse .room-row:first-child {
  animation: roomsPulse .85s ease;
}
@keyframes roomsPulse {
  0% { background: rgba(124,140,255,.08); }
  40% { background: rgba(124,140,255,.28); transform: scale(1.01); }
  100% { background: transparent; transform: none; }
}
.user-row, .room-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem;
  align-items: start;
  padding: .55rem .65rem;
  border-radius: 16px;
  background: rgba(255,255,255,.4);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
button.user-row.friends-user-row {
  width: 100%;
  margin: 0 0 .45rem;
  font: inherit;
  color: inherit;
  text-align: left;
  align-items: center;
}
.friends-request-row {
  align-items: center;
  margin: 0 0 .45rem;
}
.friends-request-row--rich {
  align-items: flex-start;
}
.friends-request-row--rich .friends-request-actions {
  align-self: center;
}
.friends-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}
.friends-user-row .friends-row-action {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent, #5a6fd6);
  white-space: nowrap;
  align-self: center;
}
.friends-user-row .user-row-body {
  min-width: 0;
}
.friends-user-row .nick {
  font-weight: 700;
  line-height: 1.25;
}
.friends-meta {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  margin-top: .2rem;
}
.friends-meta .meta-line {
  margin: 0;
  font-size: .78rem;
  line-height: 1.3;
}
.user-row > .tool { align-self: center; }
.user-row-body {
  display: flex;
  flex-direction: column;
  gap: .14rem;
  min-width: 0;
}
.online-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .22rem;
  min-width: 2.6rem;
}
.online-friend-tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: .01em;
  color: #1b5e20;
  background: rgba(46, 125, 50, .12);
  border: 1px solid rgba(46, 125, 50, .28);
  border-radius: 999px;
  padding: .12rem .35rem;
  white-space: nowrap;
  max-width: 4.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-row.is-friend {
  background: rgba(46, 125, 50, .06);
}
.online-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .28rem;
  line-height: 1.25;
}
.online-sep {
  opacity: .45;
  margin: 0 .05rem;
}
.online-device { font-size: .92em; line-height: 1; }
.online-canton { font-weight: 500; }
.online-age {
  font-weight: 500;
  color: var(--muted);
  font-size: .82rem;
}
.online-looking-label {
  font-weight: 600;
  color: var(--muted);
}
.online-looking-label::after { content: ':'; }
.room-row {
  align-items: start;
  border-color: rgba(100, 120, 160, .18);
}
.user-row {
  border-color: rgba(100, 120, 160, .18);
}
.room-row > div:first-child { line-height: 1.2; padding-top: .15rem; }
.room-row-body {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}
.room-row-body .room-title {
  line-height: 1.25;
}
.room-row-body .room-count {
  margin: 0;
  line-height: 1.3;
}
.room-access {
  display: inline-block;
  align-self: flex-start;
  margin-top: .1rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.35;
}
.room-access-free {
  color: #0f6b5c;
  background: rgba(87, 197, 182, .28);
  border: 1px solid rgba(87, 197, 182, .45);
}
.room-access-restricted {
  color: #9a2f4a;
  background: rgba(232, 160, 191, .32);
  border: 1px solid rgba(180, 80, 100, .35);
}
.user-row:hover, .room-row:hover { background: rgba(255,255,255,.7); transform: translateX(2px); }
.user-row.active, .room-row.active { border-color: rgba(124,140,255,.4); background: rgba(255,255,255,.8); }
.room-row.room-locked {
  opacity: .78;
  cursor: not-allowed;
  background: rgba(255, 232, 238, .55);
  border-color: rgba(180, 80, 100, .2);
}
.room-row.room-locked:hover { transform: none; background: rgba(255, 232, 238, .7); }
.room-locked-msg {
  color: #a33 !important;
  font-weight: 700;
  margin-top: .15rem;
}
.user-row.highlighted {
  border-color: rgba(124,140,255,.55);
  background: linear-gradient(135deg, rgba(124,140,255,.2), rgba(255,255,255,.9));
  box-shadow: inset 3px 0 0 var(--accent);
  animation: onlineFlash .55s ease both;
}
@keyframes onlineFlash {
  0% { background: rgba(124,140,255,.38); }
  100% { background: linear-gradient(135deg, rgba(124,140,255,.2), rgba(255,255,255,.9)); }
}

.avatar {
  width: 42px; height: 42px; border-radius: 14px; object-fit: cover;
  background: #dde5ff;
}
/* Gender aura — chat-pane pink/blue, radial center → edge */
.avatar-wrap.avatar-gender-female,
.avatar-wrap.avatar-gender-male {
  padding: 3px;
  border-radius: 17px;
  box-sizing: content-box;
}
.avatar-wrap.avatar-gender-female {
  background: radial-gradient(
    circle at 50% 42%,
    rgba(255, 165, 200, .98) 0%,
    rgba(255, 170, 190, .62) 40%,
    rgba(120, 155, 255, .88) 100%
  );
  box-shadow: 0 2px 12px rgba(255, 165, 200, .28);
}
.avatar-wrap.avatar-gender-male {
  background: radial-gradient(
    circle at 50% 42%,
    rgba(120, 155, 255, .98) 0%,
    rgba(124, 170, 255, .62) 40%,
    rgba(255, 165, 200, .88) 100%
  );
  box-shadow: 0 2px 12px rgba(120, 155, 255, .28);
}
.avatar-wrap.avatar-gender-female .avatar,
.avatar-wrap.avatar-gender-male .avatar {
  background: transparent;
}
.gender-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; margin-right: .35rem;
}
.gender-female { background: var(--female); }
.gender-male { background: var(--male); }
.gender-nonbinary, .gender-other { background: var(--nb); }

.country-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  margin-right: .2rem;
  vertical-align: -0.1em;
}
.geo-lang {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  margin-right: .32rem;
  vertical-align: middle;
}
.geo-lang .online-device {
  font-size: .88em;
  line-height: 1;
  flex-shrink: 0;
}
.msg .who-btn .geo-lang .online-device {
  font-size: .82em;
}
.lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  padding: .18rem .32rem;
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(60, 80, 120, .16);
  vertical-align: middle;
}
.msg .who-btn .geo-lang { margin-right: .35rem; }
.msg .who-btn .lang-code {
  font-size: .62rem;
  padding: .14rem .28rem;
}
.gender-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(40, 50, 80, .18);
}
.gender-badge .gender-glyph {
  display: block;
  transform: translateY(-0.04em);
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", "DejaVu Sans", sans-serif;
}
.gender-badge-lg {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 1.2rem;
}
.gender-badge-md {
  width: 1.45rem;
  height: 1.45rem;
  font-size: .95rem;
}
.gender-badge-sm {
  width: 1.15rem;
  height: 1.15rem;
  font-size: .78rem;
}
.gender-badge-self {
  margin-left: .15rem;
}
.gender-badge-seek {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 1px 2px rgba(40, 50, 80, .14);
}
.gender-badge.gender-female { background: var(--female); }
.gender-badge.gender-male { background: var(--male); }
.gender-badge.gender-nonbinary,
.gender-badge.gender-other { background: var(--nb); color: #1f2433; }
.gender-pair {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-left: .15rem;
  flex-shrink: 0;
}
.gender-seek {
  display: inline-flex;
  align-items: center;
  gap: .18rem;
  margin-left: .05rem;
}
.gender-seek-arrow {
  color: var(--muted);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  padding: 0 .05rem;
}
.gender-seek-text {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-line { font-size: .78rem; color: var(--muted); }
.joy-line { color: #9a5b2e; font-weight: 600; }
.joy-warn { color: #a04555; font-weight: 600; }
.nick {
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem .35rem;
  min-width: 0;
}
.nick-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nick .online-age { margin-left: 0; margin-right: 0; }

.chat-pane {
  --aura-a: rgba(124, 170, 255, .42);
  --aura-b: rgba(255, 170, 190, .38);
  --aura-c: rgba(90, 210, 190, .36);
  --aura-base: linear-gradient(165deg, rgba(236, 242, 255, .72), rgba(255, 240, 246, .55) 48%, rgba(232, 248, 244, .65));
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  isolation: isolate;
  background: var(--aura-base);
}
.chat-pane.wp-dream_aurora {
  --aura-a: rgba(120, 155, 255, .45);
  --aura-b: rgba(255, 165, 200, .4);
  --aura-c: rgba(170, 200, 255, .35);
  --aura-base: linear-gradient(165deg, rgba(220, 230, 255, .55), rgba(255, 228, 240, .42));
}
.chat-pane.wp-misty_lake {
  --aura-a: rgba(100, 200, 205, .42);
  --aura-b: rgba(150, 200, 255, .4);
  --aura-c: rgba(180, 230, 210, .38);
  --aura-base: linear-gradient(165deg, rgba(210, 236, 236, .55), rgba(220, 236, 255, .45));
}
.chat-pane.wp-soft_nebula {
  --aura-a: rgba(190, 165, 230, .4);
  --aura-b: rgba(255, 175, 205, .4);
  --aura-c: rgba(150, 195, 255, .35);
  --aura-base: linear-gradient(165deg, rgba(235, 225, 250, .55), rgba(255, 228, 238, .42));
}
.chat-pane.wp-garden_dusk {
  --aura-a: rgba(255, 190, 145, .42);
  --aura-b: rgba(170, 215, 175, .4);
  --aura-c: rgba(255, 205, 175, .35);
  --aura-base: linear-gradient(165deg, rgba(255, 235, 215, .55), rgba(220, 240, 225, .45));
}
.chat-pane.wp-cloud_silk {
  --aura-a: rgba(180, 200, 230, .4);
  --aura-b: rgba(220, 210, 235, .38);
  --aura-c: rgba(190, 220, 230, .36);
  --aura-base: linear-gradient(165deg, rgba(242, 246, 255, .62), rgba(235, 238, 248, .5));
}
.chat-pane.is-dm {
  --aura-a: rgba(100, 175, 255, .44);
  --aura-b: rgba(255, 155, 185, .4);
  --aura-c: rgba(100, 215, 195, .38);
}

/* Dual participant avatars in Privatchat header + inbox */
.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;
}
.dm-pair-avatars {
  position: relative;
  display: inline-block;
  width: 2.85rem;
  height: 2.1rem;
  flex-shrink: 0;
  vertical-align: middle;
}
.dm-pair-av {
  position: absolute;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .95);
  background: rgba(240, 242, 248, .9);
  box-shadow: 0 1px 4px rgba(40, 48, 72, .18);
}
.dm-pair-av--self {
  left: 0;
  top: .15rem;
  z-index: 1;
}
.dm-pair-av--peer {
  right: 0;
  top: 0;
  z-index: 2;
  width: 2rem;
  height: 2rem;
}
.dm-pair-avatars--inbox {
  width: 3.1rem;
  height: 2.35rem;
}
.dm-pair-avatars--inbox .dm-pair-av--self {
  width: 1.95rem;
  height: 1.95rem;
}
.dm-pair-avatars--inbox .dm-pair-av--peer {
  width: 2.15rem;
  height: 2.15rem;
}
.dm-chat-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  text-align: left;
}
.dm-chat-heading-text {
  min-width: 0;
  flex: 1 1 auto;
}
.dm-chat-heading-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}
.dm-chat-heading-sub {
  margin: .1rem 0 0;
  font-size: .72rem;
}
.section-title.dm-desk-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: inherit;
  font-weight: inherit;
}
.section-title.dm-desk-heading .dm-chat-heading {
  width: 100%;
}
.section-title.dm-desk-heading .dm-chat-heading-title {
  font-size: 1.15rem;
}
.m-chat-heading .dm-chat-heading {
  justify-content: center;
}
.m-chat-heading .dm-chat-heading-text {
  flex: 0 1 auto;
  max-width: calc(100% - 3.2rem);
}

/* Soft living color field behind chat (rooms + DM) */
.chat-aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}
.chat-aura-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: .85;
  will-change: transform;
  mix-blend-mode: soft-light;
}
.chat-aura-a {
  width: min(78%, 420px);
  height: min(70%, 380px);
  left: -18%;
  top: -12%;
  background: radial-gradient(circle at 40% 40%, var(--aura-a), transparent 68%);
  animation: chat-aura-drift-a 18s ease-in-out infinite alternate;
}
.chat-aura-b {
  width: min(85%, 460px);
  height: min(75%, 420px);
  right: -22%;
  top: 18%;
  background: radial-gradient(circle at 55% 45%, var(--aura-b), transparent 70%);
  animation: chat-aura-drift-b 22s ease-in-out infinite alternate;
}
.chat-aura-c {
  width: min(90%, 520px);
  height: min(60%, 340px);
  left: 12%;
  bottom: -18%;
  background: radial-gradient(circle at 50% 50%, var(--aura-c), transparent 72%);
  animation: chat-aura-drift-c 26s ease-in-out infinite alternate;
}
.chat-aura-sheen {
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(
      120deg,
      transparent 20%,
      rgba(255, 255, 255, .14) 42%,
      transparent 58%,
      rgba(255, 255, 255, .08) 72%,
      transparent 85%
    );
  background-size: 220% 220%;
  animation: chat-aura-sheen 16s ease-in-out infinite;
  opacity: .55;
  mix-blend-mode: soft-light;
}
@keyframes chat-aura-drift-a {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18%, 14%, 0) scale(1.12); }
  100% { transform: translate3d(8%, 22%, 0) scale(1.04); }
}
@keyframes chat-aura-drift-b {
  0% { transform: translate3d(0, 0, 0) scale(1.08); }
  50% { transform: translate3d(-16%, 10%, 0) scale(.95); }
  100% { transform: translate3d(-10%, -12%, 0) scale(1.1); }
}
@keyframes chat-aura-drift-c {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(14%, -16%, 0) scale(1.14); }
  100% { transform: translate3d(-12%, -8%, 0) scale(1.02); }
}
@keyframes chat-aura-sheen {
  0%, 100% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
}
.chat-pane > :not(.chat-aura):not(.bday-party-host) {
  position: relative;
  z-index: 1;
}
.chat-pane > .bday-party-host {
  position: absolute;
  z-index: 3;
}
.chat-pane.has-bday-party .composer,
.chat-pane.has-bday-party .toolbar,
.chat-pane.has-bday-party .picker,
.chat-pane.has-bday-party .section-title,
.chat-pane.has-bday-party #bday-ticker-slot {
  z-index: 4;
}

.messages {
  flex: 1 1 auto;
  min-height: 0; /* allow flex child to shrink so overflow scrolls */
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: .5rem;
  overscroll-behavior: contain;
}
.messages-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.messages-wrap > .messages {
  flex: 1 1 auto;
  min-height: 0;
}
.chat-jump-bottom {
  position: absolute;
  right: .85rem;
  bottom: .85rem;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: .45rem .75rem .45rem .65rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(236, 242, 255, .88));
  box-shadow: 0 10px 28px rgba(60, 80, 130, .22);
  color: var(--ink);
  font: 650 .82rem/1.1 var(--font-body);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  pointer-events: none;
  transition:
    opacity .28s cubic-bezier(.22, 1, .36, 1),
    transform .32s cubic-bezier(.22, 1.15, .32, 1),
    box-shadow .2s ease;
}
.chat-jump-bottom.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chat-jump-bottom:hover {
  box-shadow: 0 14px 34px rgba(60, 80, 130, .28);
}
.chat-jump-bottom-icon {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}
.chat-jump-bottom[hidden] {
  display: none !important;
}
.messages-stream {
  margin-top: auto; /* keep short threads visually at the bottom */
  display: flex;
  flex-direction: column;
  gap: .55rem;
  width: 100%;
}
.msg {
  max-width: min(88%, 720px);
  padding: .65rem .85rem;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  align-self: flex-start;
  animation: msgIn .35s ease both;
}
.msg.msg-moderable,
.msg.msg-reportable {
  cursor: pointer;
  transition: box-shadow .15s ease, outline-color .15s ease;
}
.msg.msg-moderable:hover,
.msg.msg-reportable:hover {
  /* inset — otherwise overflow:hidden on .messages clips the right edge */
  box-shadow: inset 0 0 0 1.5px rgba(70, 96, 160, .32);
}
.msg.msg-moderable:focus-visible,
.msg.msg-reportable:focus-visible {
  outline: 2px solid rgba(70, 96, 160, .45);
  outline-offset: -2px;
}
.msg.media-msg {
  max-width: 100%;
  width: 100%;
  align-self: stretch;
  padding: .55rem .65rem;
  background: rgba(255,255,255,.55);
}
.msg.media-msg.has-avatar {
  max-width: 100%;
}
.msg.media-msg .msg-body {
  width: 100%;
  min-width: 0;
}
.chat-media {
  width: 100%;
}
.chat-media-hit {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}
.chat-media-el {
  display: block;
  width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  background: rgba(20, 24, 40, .08);
  border-radius: 12px;
}
.chat-media-duty {
  margin: .45rem 0 0;
  font-size: .8rem;
}
.chat-media-blocked {
  padding: .8rem;
  border-radius: 12px;
  background: rgba(180, 83, 9, .08);
  border: 1px solid rgba(180, 83, 9, .2);
}
.chat-media-fs {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(8, 10, 18, .92);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.chat-media-fs img,
.chat-media-fs video {
  max-width: min(96vw, 1200px);
  max-height: 86vh;
  object-fit: contain;
}
.chat-media-fs-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}
.btn.is-locked,
.m-menu-btn.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.composer-attach-btn.is-locked {
  opacity: .55;
}
.composer-attach-locked {
  cursor: pointer;
}
.msg.has-avatar {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  max-width: min(92%, 780px);
}
.msg.has-avatar.me {
  flex-direction: row-reverse;
}
.msg-avatar-btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;
  border-radius: 50%;
}
.msg-avatar-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.msg .avatar-msg {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.msg .avatar-wrap {
  width: 36px;
  height: 36px;
}
.msg .avatar-wrap.avatar-gender-female,
.msg .avatar-wrap.avatar-gender-male {
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: 50%;
}
.msg .avatar-wrap .bday-badge {
  font-size: .7rem;
  right: -4px;
  bottom: -4px;
}
.msg .msg-body {
  min-width: 0;
  flex: 1 1 auto;
}
@media (min-width: 1400px) {
  .msg { max-width: min(75%, 860px); }
  .msg.has-avatar { max-width: min(82%, 920px); }
}
.msg.me { align-self: flex-end; background: linear-gradient(135deg, rgba(124,140,255,.2), rgba(255,255,255,.8)); }
.msg .who { font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.msg .who-gold { font-weight: 600; color: #9a7b2f; }
.msg .who-btn .country-flag { margin-right: .2rem; font-size: .95rem; }
.msg .who-nick { font-weight: 700; color: inherit; }
.msg .who-meta { font-weight: 600; opacity: .85; }
.msg .who-btn {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .1rem;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 .2rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}
.msg .who-btn:hover { text-decoration: underline; color: var(--ink); }
.msg .who-btn.who-meta-locked {
  text-decoration: none;
  cursor: help;
}
.msg .who-btn.who-meta-locked:hover { text-decoration: none; }
.msg .who-meta-locked .country-flag,
.msg .who-meta-locked .lang-code,
.msg .who-meta-locked .who-meta,
.msg .who-meta-locked .geo-lang {
  filter: blur(3.5px);
  opacity: .72;
  user-select: none;
  pointer-events: none;
}
.premium-lock-icon {
  display: inline-flex;
  align-items: center;
  margin-right: .15rem;
  font-size: .85em;
  line-height: 1;
  filter: none !important;
  opacity: 1 !important;
}
.premium-locked-hint {
  margin: 0 0 .85rem;
  color: #7a4f00;
  font-weight: 600;
}
.btn-premium-gated {
  background: linear-gradient(135deg, #c4a35a, #e8c56a) !important;
  color: #3a2a00 !important;
  box-shadow: 0 8px 18px rgba(196, 163, 90, .35) !important;
}
.online-filter-premium-tag {
  margin-left: .35rem;
  font-size: .72rem;
  font-weight: 700;
  color: #7a4f00;
  background: rgba(255, 236, 179, .85);
  border: 1px solid rgba(255, 209, 102, .65);
  border-radius: 999px;
  padding: .12rem .45rem;
  vertical-align: middle;
}
.search-form-premium-gated .search-submit-row .btn-premium-gated {
  opacity: 1;
}
.premium-feature-wrap {
  position: relative;
}
.premium-feature-wrap.is-locked > .search-form {
  /* legacy: keep styles for other locked premium teasers, but search is editable */
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}
.premium-lock-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: none; /* filters stay editable; hint sits next to submit */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: 1.25rem;
  text-align: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 248, 230, .55), rgba(255, 240, 200, .78));
  border: 1px solid rgba(255, 209, 102, .55);
  backdrop-filter: blur(1px);
  pointer-events: none;
}
.premium-lock-overlay .premium-lock-icon {
  font-size: 1.6rem;
  margin: 0;
}
.premium-lock-overlay p {
  margin: 0;
  max-width: 22rem;
  font-weight: 700;
  color: #7a4f00;
  font-size: .95rem;
  line-height: 1.35;
}
.msg.sticker, .msg.gif, .msg.emoji-only {
  background: transparent;
  font-size: 3.2rem;
  line-height: 1;
  padding: .2rem;
  animation: bounceIn .55s cubic-bezier(.2,1.4,.4,1) both;
  transform-origin: center bottom;
}
/* Animated Noto GIFs freeze under persistent CSS transforms (Chrome). */
.msg.emoji-only:has(.anim-emoji),
.msg.sticker:has(.anim-emoji),
.msg.has-anim-emoji {
  animation: emojiFadeIn .35s ease both;
  transform: none;
}
.anim-emoji-wrap.anim-emoji-inline {
  display: inline-block;
  vertical-align: -0.25em;
  line-height: 0;
  animation: none;
  margin: 0 .06em;
}
.anim-emoji.anim-emoji-inline {
  width: 1.45em;
  height: 1.45em;
  display: inline-block;
  vertical-align: -0.25em;
  filter: none;
}
@keyframes emojiFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes bounceIn {
  0% { opacity: 0; transform: translate(var(--jx, 0), 18px) scale(.6); }
  60% { opacity: 1; transform: translate(var(--jx, 0), -6px) scale(1.08); }
  100% { transform: translate(var(--jx, 0), 0) scale(1); }
}

.chat-pane > .section-title,
.chat-pane > .toolbar,
.chat-pane > .picker,
.chat-pane > .composer,
.chat-pane > #bday-ticker-slot {
  flex-shrink: 0;
}
.bday-ticker {
  overflow: hidden;
  margin: 0 0 .45rem;
  padding: .35rem 0;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,107,138,.18), rgba(255,209,102,.22), rgba(78,205,196,.18));
  border: 1px solid rgba(255,107,138,.28);
}
/* Pause only while hovering (desktop). Do not use :focus-within —
   a click would leave focus on the chip and freeze the marquee. */
.bday-ticker:hover .bday-ticker-track {
  animation-play-state: paused;
}
@media (hover: none) {
  .bday-ticker:hover .bday-ticker-track {
    animation-play-state: running;
  }
}
.bday-ticker-track {
  display: inline-block;
  white-space: nowrap;
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
  /* Start just off the right edge of the ticker viewport. */
  padding-left: 100%;
  /* Desktop: 75% slower than previous 4.5s → 18s */
  animation: bday-marquee 18s linear infinite;
  will-change: transform;
}
@media (max-width: 720px) {
  /* Mobile keeps the previous pace */
  .bday-ticker-track {
    animation-duration: 9s;
  }
}
.bday-admin-msg {
  font-weight: 700;
}
.bday-chip {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: .1rem .15rem;
  margin: 0;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: underline;
  text-decoration-color: rgba(255,107,138,.45);
  text-underline-offset: 3px;
}
.bday-chip:hover,
.bday-chip:focus-visible {
  background: rgba(255,255,255,.45);
  outline: none;
  text-decoration-color: rgba(255,107,138,.9);
}
.bday-sep {
  opacity: .55;
  font-weight: 600;
}
.bday-wish-sheet { width: min(480px, 100%); }
.bday-wish-list {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.bday-wish-option {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  margin: 0;
  padding: .55rem .65rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.35);
  cursor: pointer;
  color: inherit;
  font: inherit;
  line-height: 1.35;
}
.bday-wish-option:has(input:checked) {
  border-color: rgba(255,107,138,.55);
  background: rgba(255,107,138,.12);
  box-shadow: 0 0 0 1px rgba(255,107,138,.2);
}
.bday-wish-option input {
  margin-top: .2rem;
  flex-shrink: 0;
}
.bday-wish-sheet textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
}
/* padding-left:100% → text enters from the right; -100% scrolls it fully off left. */
@keyframes bday-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.avatar-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: fit-content;
}
.avatar-wrap .avatar { display: block; }
.avatar-guest-face {
  display: grid !important;
  place-items: center;
  box-sizing: border-box;
  background: linear-gradient(145deg, #dfe6f5, #c5d0e8);
  color: #2a3550;
  font-weight: 800;
  font-size: .7em;
  letter-spacing: .02em;
  line-height: 1.15;
  text-align: center;
  padding: .2em .15em;
  border-radius: inherit;
  object-fit: unset;
  width: var(--avatar-size, 40px);
  height: var(--avatar-size, 40px);
}
.avatar.avatar-msg.avatar-guest-face {
  width: 36px;
  height: 36px;
  font-size: .58em;
}
.m-menu-user .avatar-guest-face,
.avatar-wrap .avatar.avatar-guest-face {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: .85em;
}
.guest-pill {
  display: inline-block;
  margin-left: .35rem;
  padding: .08rem .4rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: #2a3550;
  background: rgba(197, 208, 232, .9);
  border: 1px solid rgba(90, 110, 150, .28);
  vertical-align: middle;
}
.action-sheet-head .avatar-wrap.avatar-gender-female,
.action-sheet-head .avatar-wrap.avatar-gender-male,
.m-menu-user .avatar-wrap.avatar-gender-female,
.m-menu-user .avatar-wrap.avatar-gender-male {
  border-radius: 26px;
  padding: 4px;
}
.avatar-wrap.is-birthday .avatar {
  box-shadow: 0 0 0 2px rgba(255,107,138,.55), 0 0 12px rgba(255,209,102,.45);
  animation: bday-avatar-glow 4.8s ease-in-out 3 both;
}
.avatar-wrap.is-celebrating .avatar {
  animation: bday-avatar-pop 2.2s ease-in-out 3 both;
}
.avatar-wrap .bday-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  font-size: .95rem;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.15));
  animation: bday-bounce 2.4s ease-in-out 4 both;
}
.avatar-wrap.is-celebrating .bday-badge,
.user-row.celebrating .bday-badge {
  animation: bday-bounce 1.2s ease-in-out 4 both;
}
@keyframes bday-bounce {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-3px) rotate(8deg); }
}
@keyframes bday-avatar-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,107,138,.45), 0 0 8px rgba(255,209,102,.35); }
  50% { box-shadow: 0 0 0 3px rgba(255,107,138,.7), 0 0 16px rgba(255,209,102,.55); }
}
@keyframes bday-avatar-pop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.06) rotate(-2deg); }
  70% { transform: scale(1.03) rotate(2deg); }
}
.user-row.birthday {
  background: linear-gradient(135deg, rgba(255,209,102,.22), rgba(255,255,255,.55));
}
.user-row.celebrating {
  border-color: rgba(255,107,138,.55);
  background: linear-gradient(135deg, rgba(255,107,138,.2), rgba(255,209,102,.25));
  animation: bday-row-pulse 3.2s ease-in-out 3 both;
}
@keyframes bday-row-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,138,0); }
  50% { box-shadow: 0 0 0 3px rgba(255,107,138,.18); }
}
.msg-birthday {
  align-self: center;
  max-width: 95%;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,209,102,.35), rgba(255,107,138,.2));
  border: 1px solid rgba(255,107,138,.3);
  font-weight: 700;
  animation: bday-msg-pop .7s ease both;
}
@keyframes bday-msg-pop {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --- Birthday party FX in chat pane --- */
.bday-party-host {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .35s ease;
}
.bday-party-host.is-on { opacity: 1; }
.bday-party {
  position: absolute;
  inset: 0;
}
.bday-party-confetti,
.bday-party-floaters {
  position: absolute;
  inset: 0;
}
.bday-confetti-bit {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 1.35);
  background: var(--c);
  border-radius: 2px;
  opacity: .85;
  transform: rotate(var(--r));
  /* once, at half speed (duration set via --t) */
  animation: bday-confetti-fall var(--t) linear var(--d) 1 both;
}
.bday-floater {
  position: absolute;
  bottom: -2.5rem;
  left: var(--x);
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
  animation: bday-float-up var(--t) linear var(--d) 1 both;
  will-change: transform, opacity;
}
.bday-celeb-banner {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  max-width: min(90%, 320px);
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,107,138,.35);
  color: var(--ink);
  font-weight: 800;
  font-size: .92rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(40,48,72,.12);
  animation: bday-banner-in .55s ease both;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bday-party-host.is-burst .bday-party-confetti .bday-confetti-bit {
  animation-duration: 4.4s; /* half speed burst */
}
.bday-party-host.is-burst .bday-celeb-banner {
  animation: bday-banner-burst 1.4s ease both;
}
@keyframes bday-confetti-fall {
  0% { transform: translate3d(0, -10px, 0) rotate(var(--r)); opacity: 0; }
  8% { opacity: .9; }
  100% { transform: translate3d(18px, 110vh, 0) rotate(calc(var(--r) + 420deg)); opacity: .15; }
}
@keyframes bday-float-up {
  0% { transform: translate3d(0, 0, 0) scale(.85) rotate(-8deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(var(--dx), -115vh, 0) scale(1.15) rotate(12deg); opacity: 0; }
}
@keyframes bday-banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.94); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes bday-banner-burst {
  0% { transform: translateX(-50%) scale(.9); }
  40% { transform: translateX(-50%) scale(1.08); }
  100% { transform: translateX(-50%) scale(1); }
}
.chat-pane.has-bday-party .messages {
  /* keep messages readable above soft FX */
  position: relative;
  z-index: 1;
}
.chat-pane.has-bday-party .composer,
.chat-pane.has-bday-party .toolbar,
.chat-pane.has-bday-party .picker,
.chat-pane.has-bday-party .section-title,
.chat-pane.has-bday-party #bday-ticker-slot {
  position: relative;
  z-index: 4;
}
@media (prefers-reduced-motion: reduce) {
  .bday-party-host,
  .avatar-wrap.is-birthday .avatar,
  .avatar-wrap.is-celebrating .avatar,
  .user-row.celebrating,
  .msg-birthday,
  .chat-aura-blob,
  .chat-aura-sheen {
    animation: none !important;
  }
  .bday-party-confetti,
  .bday-party-floaters { display: none; }
  .bday-celeb-banner { animation: none; }
  .chat-aura-blob { opacity: .55; }
  .chat-aura-sheen { opacity: .25; }
}
.chat-pane > .section-title {
  margin: 0 0 .35rem;
  font-size: 1.15rem;
}
.composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .5rem;
  margin-top: .5rem;
  align-items: end;
}
.composer textarea { resize: none; min-height: 42px; max-height: 88px; }
.composer-leading {
  display: flex;
  align-items: end;
  gap: .35rem;
  flex-shrink: 0;
  max-width: min(70vw, 18rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.composer-attach-gold {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding-right: .15rem;
}
.composer-attach-gold-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #8a6a1a;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}
@media (max-width: 420px) {
  .composer-attach-gold-label { display: none; }
}
.composer-emoji-btn,
.composer-tool-btn,
.composer-media-btn {
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(100, 120, 160, .22);
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.composer-media-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 1.55rem;
  background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(236,240,252,.85));
  box-shadow: 0 2px 8px rgba(40, 48, 72, .06);
}
.composer-media-btn.is-gif {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.composer-media-icon {
  display: grid;
  place-items: center;
  line-height: 1;
}
.composer-media-icon.is-gif {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: #3d4e7a;
}
.composer-tool-btn.is-gif {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.composer-emoji-btn:hover,
.composer-tool-btn:hover,
.composer-media-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}
.composer-media-btn.active,
.composer-tool-btn.active {
  background: linear-gradient(135deg, rgba(124,140,255,.32), rgba(255,255,255,.95));
  box-shadow: 0 4px 14px rgba(124,140,255,.22);
}
.composer-emoji-btn:focus-visible,
.composer-tool-btn:focus-visible,
.composer-media-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.composer-leading::-webkit-scrollbar { display: none; }
.composer-pending {
  margin: .35rem 0 0;
}
.composer-pending-chip {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .5rem;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(100, 120, 160, .16);
}
.composer-pending-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.media-mode-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: .4rem;
  margin-bottom: .45rem;
  min-width: 0;
}
.media-mode-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: .35rem;
  flex: 0 1 auto;
  min-width: 0;
}
.media-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 44px;
  width: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(100, 120, 160, .16);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  cursor: pointer;
  padding: .35rem .7rem;
  color: var(--muted);
  font: inherit;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.media-mode-btn:hover {
  transform: translateY(-1px);
  background: #fff;
}
.media-mode-btn.active {
  background: linear-gradient(135deg, rgba(124,140,255,.32), rgba(255,255,255,.95));
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(124,140,255,.2);
  border-color: transparent;
}
.media-mode-btn-icon {
  font-size: 1.45rem;
  line-height: 1;
}
.media-mode-btn-icon.is-gif {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  min-width: 1.9rem;
  padding: .28rem .38rem;
  border-radius: 9px;
  background: rgba(70, 90, 140, .1);
  color: #3d4e7a;
}
.media-mode-btn-label {
  font-size: .82rem;
  font-weight: 750;
}
.media-mode-btn.is-fuehli.active {
  background: linear-gradient(135deg, hsla(198, 85%, 78%, .55), rgba(255,255,255,.95));
  box-shadow: 0 6px 16px hsla(198, 70%, 45%, .22);
}
.media-mode-btn.is-machi.active {
  background: linear-gradient(135deg, rgba(166, 124, 82, .42), rgba(255,255,255,.95));
  box-shadow: 0 6px 16px rgba(92, 64, 51, .22);
}
.media-mode-btn-icon.is-fuehli-icon,
.media-mode-btn-icon.is-machi-icon {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  line-height: 0;
}
.media-mode-btn-icon.is-fuehli-icon .fuehli-creature,
.media-mode-btn-icon.is-machi-icon .machi-creature {
  width: 1.7rem;
  height: 1.75rem;
}
.media-action-btns {
  display: flex;
  flex: 0 0 auto;
  gap: .3rem;
  margin-left: auto;
}
.media-action-btn {
  width: 44px;
  min-height: 44px;
  border: 1px solid rgba(100, 120, 160, .16);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.media-action-btn:hover {
  transform: translateY(-1px);
  background: #fff;
}
.media-action-btn.active {
  background: linear-gradient(135deg, rgba(124,140,255,.32), rgba(255,255,255,.95));
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(124,140,255,.2);
  border-color: transparent;
}
.media-action-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.media-genre-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
  min-width: 0;
}
.media-genre-row .emoji-cats,
.media-genre-row .gif-chips {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}
.media-fav-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(200, 150, 40, .28);
  border-radius: 14px;
  background: linear-gradient(160deg, #fff7e6, #ffe8b8);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(180, 130, 20, .12);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.media-fav-btn:hover {
  transform: translateY(-1px) scale(1.04);
}
.media-fav-btn.active {
  background: linear-gradient(160deg, #ffd76a, #f5b942);
  box-shadow: 0 4px 14px rgba(200, 140, 20, .28);
  filter: saturate(1.1);
}
.media-fav-star {
  font-size: 1.35rem;
  line-height: 1;
  color: #b8860b;
}
.media-fav-btn.active .media-fav-star {
  color: #6b4a00;
}
.media-section-label {
  margin: .45rem 0 .25rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
}
.composer-attach {
  position: relative;
  align-self: end;
  display: flex;
  align-items: center;
}
.composer-attach-btn {
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(100, 120, 160, .22);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
/* Gold: Medien-Icon fast so hoch wie das Eingabefeld */
.composer-attach:has(input) .composer-attach-btn {
  width: 40px;
  height: 40px;
  font-size: 1.95rem;
  border-radius: 12px;
}
.composer-attach-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.composer-attach input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.composer-attach:has(input) {
  cursor: pointer;
}
.composer-attach:has(input) .composer-attach-btn {
  pointer-events: none;
}
.attach-menu {
  position: absolute;
  bottom: calc(100% + .35rem);
  left: 0;
  z-index: 30;
  min-width: 11rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .4rem;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(100, 120, 160, .2);
  box-shadow: var(--shadow);
}
.attach-menu.hidden { display: none; }
.attach-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: .55rem .65rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
}
.attach-menu button:hover { background: rgba(124,140,255,.12); }
.dm-file-banner {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  margin: 0 0 .45rem;
}
.dm-file-banner-muted { cursor: default; }
.dm-file-banner-action {
  display: block;
  margin-top: .25rem;
  font-weight: 700;
  color: var(--accent);
}
.file-offer {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.file-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .25rem;
}
.file-ready {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .2rem;
}
.file-ready-ok {
  color: #2e7d32;
  font-weight: 650;
  margin: 0;
}
.file-ready-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.file-forward-list {
  max-height: min(50vh, 22rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.file-view-overlay .file-view-sheet {
  max-width: min(96vw, 42rem);
  width: 100%;
}
.file-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}
.file-view-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 8rem;
  max-height: min(70vh, 32rem);
  overflow: auto;
}
.file-view-media {
  max-width: 100%;
  max-height: min(65vh, 30rem);
  border-radius: 12px;
}
.file-view-audio { width: 100%; }
.file-view-pdf {
  width: 100%;
  height: min(65vh, 30rem);
  border: 0;
  border-radius: 12px;
  background: #fff;
}
.ft-progress {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  margin-top: .15rem;
  width: 100%;
  min-width: 10rem;
}
.ft-progress-track {
  height: 3px;
  width: 100%;
  border-radius: 999px;
  background: rgba(126, 200, 240, .22);
  overflow: hidden;
}
.ft-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: #7ec8f0;
  box-shadow: 0 0 0 1px rgba(126, 200, 240, .15);
  transition: width .18s ease-out;
}
.ft-progress.is-done .ft-progress-bar {
  background: #5eb6e6;
}
.ft-progress-label {
  margin: 0;
}
.file-offer-meta {
  margin: .35rem 0 .45rem;
  display: grid;
  gap: .2rem;
}
.file-offer-meta > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: .35rem;
  font-size: .86rem;
  line-height: 1.35;
}
.file-offer-meta dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.file-offer-meta dd {
  margin: 0;
  font-weight: 700;
  word-break: break-word;
}
.file-report-reminder {
  margin: .35rem 0 .55rem !important;
  font-size: .86rem;
  line-height: 1.4;
}
.file-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.file-offer-actions .file-never {
  color: #9a2f4a;
}
.file-block-row {
  align-items: center;
  cursor: default;
}
.file-block-row input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  margin-top: .2rem;
}

.toolbar { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .25rem; }
.tool {
  border: 0; background: rgba(255,255,255,.55); border-radius: 12px;
  padding: .4rem .55rem; cursor: pointer; font-size: 1.15rem;
}

.tabs { display: flex; gap: .4rem; margin-bottom: .8rem; flex-wrap: wrap; }
.tab {
  border: 0; background: rgba(255,255,255,.4); border-radius: 999px;
  padding: .45rem .85rem; cursor: pointer; font-weight: 700; color: var(--muted);
}
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.notice {
  padding: .8rem 1rem; border-radius: 16px;
  background: rgba(255,255,255,.65); border: 1px solid rgba(124,140,255,.25);
  color: var(--muted); margin: .5rem 0 1rem;
}
.error { color: #b33; background: #ffe8ee; padding: .6rem .8rem; border-radius: 12px; margin: .5rem 0; }
.ok { color: #1a7a55; background: #e5f8ef; padding: .6rem .8rem; border-radius: 12px; margin: .5rem 0; }

.nick-field {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.nick-field input {
  flex: 1;
  min-width: 0;
}
.nick-status-slot {
  flex: 0 0 1.6rem;
  width: 1.6rem;
  text-align: center;
  line-height: 1;
}
.nick-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
}
.nick-status-ok {
  color: #0f7a4a;
  background: #d8f5e7;
}
.nick-status-bad {
  color: #b21f3a;
  background: #ffe0e6;
}
.nick-status-busy {
  color: #887;
  font-weight: 500;
}
.nick-suggest {
  margin: .45rem 0 .8rem;
  padding: .65rem .75rem;
  border-radius: 14px;
  background: rgba(120, 140, 180, .08);
}
.nick-suggest-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.nick-suggest-chip {
  border: 1px solid rgba(60, 80, 120, .18);
  background: #fff;
  color: #243;
  border-radius: 999px;
  padding: .35rem .75rem;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
}
.nick-suggest-chip:hover {
  border-color: rgba(60, 80, 120, .35);
  background: #f4f7fb;
}

.hidden { display: none !important; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem; margin: 0 0 .75rem;
}

.picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: .4rem; max-height: min(140px, 22vh); overflow: auto; margin: .25rem 0;
}
.picker button {
  border: 0; background: rgba(255,255,255,.6); border-radius: 12px;
  font-size: 1.6rem; padding: .35rem; cursor: pointer;
}
.picker img { width: 56px; height: 56px; object-fit: contain; }

.picker.picker-rich {
  display: flex;
  flex-direction: column;
  max-height: min(520px, 58vh);
  overflow: hidden;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: .55rem .65rem .6rem;
  margin: .2rem 0 .35rem;
  box-shadow: var(--shadow);
  animation: sheet-up .2s ease both;
}
@media (min-height: 900px) {
  .picker.picker-rich { max-height: min(600px, 62vh); }
}
.picker.picker-rich .media-picker {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.picker.picker-rich .media-picker-head,
.picker.picker-rich .emoji-cats,
.picker.picker-rich .gif-chips,
.picker.picker-rich .emoji-action-tabs,
.picker.picker-rich .media-mode-row,
.picker.picker-rich .media-mode-btns,
.picker.picker-rich .media-genre-row,
.picker.picker-rich .media-section-label,
.picker.picker-rich .fuehli-intro,
.picker.picker-rich .machi-intro,
.picker.picker-rich #gif-status,
.picker.picker-rich #favs-empty {
  flex-shrink: 0;
}
.picker.picker-rich .emoji-grid,
.picker.picker-rich .gif-grid,
.picker.picker-rich .fuehli-grid,
.picker.picker-rich .machi-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.media-picker-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  align-items: center;
  margin-bottom: .5rem;
}
.media-picker-head input[type="search"] {
  margin: 0;
  border-radius: 999px;
  padding: .55rem .9rem;
}
.emoji-action-tabs {
  display: none;
}
.emoji-action-tab {
  display: none;
}
.emoji-cats, .gif-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: .3rem;
  margin-bottom: .4rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1px;
}
.emoji-cats::-webkit-scrollbar,
.gif-chips::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.emoji-cat, .gif-chip {
  flex: 0 0 auto;
  border: 0;
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: .28rem .55rem;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1.2;
  transition: transform .15s ease, background .15s ease;
}
.emoji-cat:hover, .gif-chip:hover { transform: translateY(-1px); }
.emoji-cat.active,
.gif-chip.active {
  background: linear-gradient(135deg, rgba(124,140,255,.35), rgba(255,255,255,.9));
  box-shadow: 0 4px 12px rgba(124,140,255,.2);
}
.gif-chip {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  padding: .28rem .55rem;
  text-transform: lowercase;
}
.picker.picker-rich #gif-status {
  margin: 0 0 .35rem;
  font-size: .78rem;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: .28rem;
  max-height: 240px;
  overflow: auto;
  padding: .15rem;
}
.emoji-btn {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(255,255,255,.55);
  border-radius: 12px;
  cursor: pointer;
  padding: .18rem;
  transition: transform .18s cubic-bezier(.2,1.4,.4,1), background .15s ease;
}
.emoji-btn:hover {
  transform: scale(1.14) rotate(-4deg);
  background: #fff;
}
.emoji-btn img, .emoji-fallback {
  width: 28px; height: 28px;
  object-fit: contain;
  pointer-events: none;
  animation: emoji-bob 2.4s ease-in-out infinite;
}
.emoji-btn:nth-child(3n) img { animation-delay: .2s; }
.emoji-btn:nth-child(3n+1) img { animation-delay: .45s; }
.emoji-btn:nth-child(3n+2) img { animation-delay: .7s; }
.emoji-fallback { font-size: 1.35rem; line-height: 1; display: grid; place-items: center; }
@keyframes emoji-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}
.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: .28rem;
  max-height: 280px;
  overflow: auto;
  padding: .15rem;
}
.gif-btn {
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  aspect-ratio: 1;
  transition: transform .18s ease, box-shadow .18s ease;
}
.gif-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 18px rgba(40,48,72,.18);
}
.gif-btn img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* —— Fühlis: wasserblaue pelzige Kuschelwesen —— */
.fuehli-intro {
  margin: 0;
  font-size: .82rem;
  font-weight: 650;
  color: #3d6a82;
  line-height: 1.35;
}
.fuehli-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: .5rem;
  padding: .2rem .05rem .35rem;
}
.fuehli-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  min-height: 118px;
  padding: .35rem .35rem .45rem;
  border: 0;
  border-radius: 22px;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 20%, rgba(197, 240, 255, .95), transparent 55%),
    linear-gradient(165deg, #e8f7ff, #c5eafc 55%, #dceef8);
  box-shadow: 0 4px 14px rgba(58, 160, 224, .16);
  transition: transform .2s cubic-bezier(.2,1.4,.4,1), box-shadow .2s ease;
  overflow: hidden;
}
.fuehli-pick:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 24px rgba(58, 160, 224, .28);
}
.fuehli-pick-creature {
  display: grid;
  place-items: center;
  line-height: 0;
  filter: drop-shadow(0 4px 6px rgba(42, 106, 138, .18));
}
.fuehli-pick-label {
  font-size: .68rem;
  font-weight: 750;
  color: #2a5570;
  text-align: center;
  line-height: 1.2;
}
.msg.fuehli-msg {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: .15rem 0 !important;
}
.msg.fuehli-msg .msg-body > div {
  display: flex;
}
.fuehli-bubble {
  --fuehli-hue: 198;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  min-width: 148px;
  max-width: 220px;
  padding: .65rem .85rem .7rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 18%, rgba(232, 249, 255, .98), transparent 50%),
    linear-gradient(160deg, #dff3ff, #b8e4fc 60%, #eaf6ff);
  box-shadow:
    0 12px 30px rgba(58, 160, 224, .24),
    inset 0 1px 0 rgba(255,255,255,.75);
  animation: fuehli-pop .55s cubic-bezier(.2,1.4,.4,1) both;
  overflow: visible;
}
.fuehli-glow {
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle at 50% 40%, rgba(126, 200, 255, .4), transparent 62%);
  pointer-events: none;
  animation: fuehli-glow 3.2s ease-in-out infinite;
  border-radius: 40%;
}
.fuehli-creature-wrap {
  position: relative;
  line-height: 0;
  filter: drop-shadow(0 6px 10px rgba(42, 106, 138, .2));
}
.fuehli-creature {
  display: block;
  overflow: visible;
}
.fuehli-label {
  position: relative;
  font-size: .86rem;
  font-weight: 780;
  color: #234a62;
  text-align: center;
  letter-spacing: .01em;
}

.machi-intro {
  margin: 0;
  flex: 1;
  font-size: .86rem;
  color: #5c4033;
  line-height: 1.35;
}
.machi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: .55rem;
  margin-top: .35rem;
}
.machi-pick {
  appearance: none;
  border: 1px solid rgba(92, 64, 51, .14);
  border-radius: 18px;
  background: linear-gradient(160deg, #f7efe4, #e8d4b8);
  padding: .55rem .4rem .5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.machi-pick:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(61, 41, 20, .16);
}
.machi-pick-creature { line-height: 0; }
.machi-pick-label {
  font-size: .78rem;
  font-weight: 750;
  color: #3d2914;
  text-align: center;
  line-height: 1.2;
}
.msg.machi-msg {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: .15rem 0 !important;
}
.msg.machi-msg .msg-body > div { display: flex; }
.machi-bubble {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  min-width: 148px;
  max-width: 220px;
  padding: .65rem .85rem .7rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 250, 242, .98), transparent 50%),
    linear-gradient(160deg, #f0e0c8, #d4b896 60%, #f7efe4);
  box-shadow:
    0 12px 30px rgba(92, 64, 51, .22),
    inset 0 1px 0 rgba(255,255,255,.7);
  animation: fuehli-pop .55s cubic-bezier(.2,1.4,.4,1) both;
  overflow: visible;
}
.machi-bubble.machi-tone-dark,
.machi-bubble.machi-tone-black {
  background:
    radial-gradient(circle at 28% 18%, rgba(196, 165, 116, .35), transparent 50%),
    linear-gradient(160deg, #5c4033, #2a1a0f 60%, #3d2914);
}
.machi-bubble.machi-tone-dark .machi-label,
.machi-bubble.machi-tone-black .machi-label { color: #f0e0c8; }
.machi-bubble.machi-tone-white {
  background:
    radial-gradient(circle at 28% 18%, #fff, transparent 50%),
    linear-gradient(160deg, #fff, #ebe6dc 60%, #f5f0e8);
}
.machi-glow {
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle at 50% 40%, rgba(166, 124, 82, .35), transparent 62%);
  pointer-events: none;
  animation: fuehli-glow 3.2s ease-in-out infinite;
  border-radius: 40%;
}
.machi-creature-wrap {
  position: relative;
  line-height: 0;
  filter: drop-shadow(0 6px 10px rgba(42, 26, 15, .22));
}
.machi-creature { display: block; overflow: visible; }
.machi-label {
  position: relative;
  font-size: .86rem;
  font-weight: 780;
  color: #3d2914;
  text-align: center;
  letter-spacing: .01em;
}
.machi-creature .machi-figure { transform-origin: 50% 85%; animation: fuehli-breathe 2.8s ease-in-out infinite; }
.machi-creature .machi-body { transform-origin: 50% 70%; animation: fuehli-squash 2.8s ease-in-out infinite; }
.machi-creature .machi-ear--l { transform-origin: 85% 80%; animation: fuehli-ear-l 3.4s ease-in-out infinite; }
.machi-creature .machi-ear--r { transform-origin: 15% 80%; animation: fuehli-ear-r 3.4s ease-in-out infinite .2s; }
.machi-creature .machi-mane { transform-origin: 50% 90%; animation: fuehli-tuft 2.6s ease-in-out infinite; }
.machi-creature .machi-arm--l:not(.machi-arm--open) { transform-origin: 90% 40%; animation: fuehli-arm-l 2.4s ease-in-out infinite; }
.machi-creature .machi-arm--r:not(.machi-arm--open) { transform-origin: 10% 40%; animation: fuehli-arm-r 2.4s ease-in-out infinite .12s; }
.machi-creature .machi-arm--open.machi-arm--l { transform-origin: 90% 40%; animation: fuehli-hug-l 1.8s ease-in-out infinite; }
.machi-creature .machi-arm--open.machi-arm--r { transform-origin: 10% 40%; animation: fuehli-hug-r 1.8s ease-in-out infinite; }
.machi-creature .machi-foot--l { transform-origin: 50% 20%; animation: fuehli-foot-l 2.2s ease-in-out infinite; }
.machi-creature .machi-foot--r { transform-origin: 50% 20%; animation: fuehli-foot-r 2.2s ease-in-out infinite .11s; }
.machi-creature .machi-shadow { animation: fuehli-shadow 2.8s ease-in-out infinite; }
.machi-creature .machi-mouth { animation: fuehli-mouth 2.8s ease-in-out infinite; }
.machi-creature .machi-prop--fist,
.machi-creature .machi-prop--flex { animation: fuehli-prop-float 2.2s ease-in-out infinite; }
.machi-creature .machi-prop--fire { animation: fuehli-prop-pop 1.6s ease-in-out infinite; }

/* Face & body life (not only whole-bubble bob) */
.fuehli-creature .fuehli-figure,
.fuehli-creature .fuehli-body,
.fuehli-creature .fuehli-ear,
.fuehli-creature .fuehli-arm,
.fuehli-creature .fuehli-foot,
.fuehli-creature .fuehli-tuft,
.fuehli-creature .fuehli-horn,
.fuehli-creature .fuehli-eye,
.fuehli-creature .fuehli-mouth,
.fuehli-creature .fuehli-blush,
.fuehli-creature .fuehli-nose,
.fuehli-creature .fuehli-prop,
.fuehli-creature .fuehli-shadow {
  transform-box: fill-box;
  transform-origin: center;
}
.fuehli-creature .fuehli-ear--l { transform-origin: 85% 80%; }
.fuehli-creature .fuehli-ear--r { transform-origin: 15% 80%; }
.fuehli-creature .fuehli-arm--l { transform-origin: 90% 40%; }
.fuehli-creature .fuehli-arm--r { transform-origin: 10% 40%; }
.fuehli-creature .fuehli-foot--l,
.fuehli-creature .fuehli-foot--r { transform-origin: 50% 20%; }
.fuehli-creature .fuehli-tuft { transform-origin: 50% 90%; }
.fuehli-creature .fuehli-body { transform-origin: 50% 70%; }
.fuehli-creature .fuehli-figure { transform-origin: 50% 85%; }
.fuehli-creature .fuehli-figure { animation: fuehli-breathe 2.8s ease-in-out infinite; }
.fuehli-creature .fuehli-body { animation: fuehli-squash 2.8s ease-in-out infinite; }
.fuehli-creature .fuehli-belly {
  transform-box: fill-box;
  transform-origin: center;
  animation: fuehli-belly 2.8s ease-in-out infinite;
}
.fuehli-creature .fuehli-ear--l { animation: fuehli-ear-l 3.4s ease-in-out infinite; }
.fuehli-creature .fuehli-ear--r { animation: fuehli-ear-r 3.4s ease-in-out infinite .2s; }
.fuehli-creature .fuehli-tuft { animation: fuehli-tuft 2.6s ease-in-out infinite; }
.fuehli-creature .fuehli-horn--l,
.fuehli-creature .fuehli-horn--r {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: fuehli-horn 3.8s ease-in-out infinite;
}
.fuehli-creature .fuehli-horn--r { animation-delay: .15s; }
.fuehli-creature .fuehli-arm--l:not(.fuehli-arm--open) { animation: fuehli-arm-l 2.4s ease-in-out infinite; }
.fuehli-creature .fuehli-arm--r:not(.fuehli-arm--open) { animation: fuehli-arm-r 2.4s ease-in-out infinite .12s; }
.fuehli-creature .fuehli-arm--open.fuehli-arm--l { animation: fuehli-hug-l 1.8s ease-in-out infinite; }
.fuehli-creature .fuehli-arm--open.fuehli-arm--r { animation: fuehli-hug-r 1.8s ease-in-out infinite; }
.fuehli-creature .fuehli-foot--l { animation: fuehli-foot-l 2.2s ease-in-out infinite; }
.fuehli-creature .fuehli-foot--r { animation: fuehli-foot-r 2.2s ease-in-out infinite .11s; }
.fuehli-creature .fuehli-shadow { animation: fuehli-shadow 2.8s ease-in-out infinite; }
.fuehli-creature .fuehli-blush { animation: fuehli-blush 2.6s ease-in-out infinite; }
.fuehli-creature .fuehli-nose { animation: fuehli-nose 2.8s ease-in-out infinite; }
.fuehli-creature .fuehli-mouth { animation: fuehli-mouth 2.8s ease-in-out infinite; }
.fuehli-creature .fuehli-eyes--round .fuehli-eye,
.fuehli-creature .fuehli-eyes--spark .fuehli-eye,
.fuehli-creature .fuehli-eyes--dreamy .fuehli-eye,
.fuehli-creature .fuehli-eyes--sad .fuehli-eye,
.fuehli-creature .fuehli-eyes--brave .fuehli-eye { animation: fuehli-blink 4.8s ease-in-out infinite; }
.fuehli-creature .fuehli-eye--r { animation-delay: .04s; }
.fuehli-creature .fuehli-pupil {
  transform-box: fill-box;
  transform-origin: center;
  animation: fuehli-pupil 3.6s ease-in-out infinite;
}
.fuehli-creature .fuehli-eyes--heart .fuehli-eye { animation: fuehli-heart-eye 1.5s ease-in-out infinite; }
.fuehli-creature .fuehli-eyes--happy .fuehli-eye { animation: fuehli-happy-eye 2.2s ease-in-out infinite; }
.fuehli-creature .fuehli-eyes--sleep .fuehli-eye { animation: fuehli-sleep-eye 3.2s ease-in-out infinite; }
.fuehli-creature .fuehli-tear {
  transform-box: fill-box;
  transform-origin: top center;
  animation: fuehli-tear 2.4s ease-in-out infinite;
}
.fuehli-creature .fuehli-face-spark,
.fuehli-creature .fuehli-eye-shine {
  transform-box: fill-box;
  transform-origin: center;
  animation: fuehli-twinkle 1.8s ease-in-out infinite;
}
.fuehli-creature .fuehli-prop--heart { animation: fuehli-prop-float 2.2s ease-in-out infinite; }
.fuehli-creature .fuehli-prop--tinyheart { animation: fuehli-prop-pop 1.4s ease-in-out infinite; }
.fuehli-creature .fuehli-star--a { animation: fuehli-star 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-star--b { animation: fuehli-star 1.6s ease-in-out infinite .35s; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-butterfly--a { animation: fuehli-flutter-a 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-butterfly--b { animation: fuehli-flutter-b 2.2s ease-in-out infinite .2s; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-prop--flower { animation: fuehli-spin-soft 4s ease-in-out infinite; }
.fuehli-creature .fuehli-prop--sun { animation: fuehli-sun 3s linear infinite; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-sun-rays { animation: fuehli-rays 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-z { animation: fuehli-zzz 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; opacity: .85; }
.fuehli-creature .fuehli-z--2 { animation-delay: .25s; }
.fuehli-creature .fuehli-z--3 { animation-delay: .5s; }
.fuehli-creature .fuehli-prop--leaf { animation: fuehli-leaf 3.2s ease-in-out infinite; }
.fuehli-creature .fuehli-prop--badge { animation: fuehli-badge 2s ease-in-out infinite; }
.fuehli-creature .fuehli-prop--cloud,
.fuehli-creature .fuehli-prop--cloudlet { animation: fuehli-prop-float 3.4s ease-in-out infinite; }
.fuehli-creature .fuehli-puddle { animation: fuehli-puddle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.fuehli-creature .fuehli-puddle--inner { animation-delay: .12s; }
.fuehli-mood-giggle .fuehli-figure { animation: fuehli-giggle 0.7s ease-in-out infinite; }
.fuehli-mood-giggle .fuehli-mouth { animation: fuehli-laugh-mouth 0.7s ease-in-out infinite; }
.fuehli-mood-brave .fuehli-figure { animation: fuehli-brave-pose 2.4s ease-in-out infinite; }
.fuehli-mood-brave .fuehli-arm--r { animation: fuehli-thumbsup 1.8s ease-in-out infinite; }
.fuehli-mood-melt .fuehli-body { animation: fuehli-melt-body 2.8s ease-in-out infinite; }
.fuehli-mood-sleepy .fuehli-figure { animation: fuehli-sleepy-sway 4s ease-in-out infinite; }
.fuehli-mood-missyou .fuehli-figure { animation: fuehli-sigh 3.2s ease-in-out infinite; }
.fuehli-mood-sparkle .fuehli-tuft { animation: fuehli-tuft-spark 1.4s ease-in-out infinite; }
.fuehli-mood-sunny .fuehli-blush { animation: fuehli-blush-hot 1.6s ease-in-out infinite; }
.fuehli-mood-cuddle .fuehli-figure { animation: fuehli-cuddle-bounce 1.8s ease-in-out infinite; }

@keyframes fuehli-glow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes fuehli-pop {
  from { opacity: 0; transform: scale(.7) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fuehli-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes fuehli-squash {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.03, .96); }
}
@keyframes fuehli-belly {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06, 1.04); }
}
@keyframes fuehli-ear-l {
  0%, 70%, 100% { transform: rotate(0deg); }
  78% { transform: rotate(-12deg); }
  86% { transform: rotate(6deg); }
  92% { transform: rotate(-4deg); }
}
@keyframes fuehli-ear-r {
  0%, 65%, 100% { transform: rotate(0deg); }
  74% { transform: rotate(14deg); }
  82% { transform: rotate(-5deg); }
  90% { transform: rotate(3deg); }
}
@keyframes fuehli-tuft {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04, .96); }
}
@keyframes fuehli-tuft-spark {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1); }
  50% { transform: translateY(-4px) rotate(3deg) scale(1.08); }
}
@keyframes fuehli-horn {
  0%, 100% { transform: rotate(0deg) scaleY(1); }
  50% { transform: rotate(0deg) scaleY(1.06); }
}
@keyframes fuehli-arm-l {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(-10deg) translateY(-2px); }
}
@keyframes fuehli-arm-r {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(10deg) translateY(-2px); }
}
@keyframes fuehli-hug-l {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  50% { transform: rotate(-8deg) translate(3px, -3px); }
}
@keyframes fuehli-hug-r {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  50% { transform: rotate(8deg) translate(-3px, -3px); }
}
@keyframes fuehli-foot-l {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-4deg); }
}
@keyframes fuehli-foot-r {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(4deg); }
}
@keyframes fuehli-shadow {
  0%, 100% { transform: scaleX(1); opacity: .18; }
  50% { transform: scaleX(.86); opacity: .12; }
}
@keyframes fuehli-blush {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .95; transform: scale(1.08); }
}
@keyframes fuehli-blush-hot {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes fuehli-nose {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08, .94); }
}
@keyframes fuehli-mouth {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.05, .95) translateY(1px); }
}
@keyframes fuehli-laugh-mouth {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.12, 1.18); }
}
@keyframes fuehli-blink {
  0%, 42%, 48%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.08); }
}
@keyframes fuehli-pupil {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(1.2px, .4px); }
  60% { transform: translate(-1px, .6px); }
}
@keyframes fuehli-heart-eye {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
@keyframes fuehli-happy-eye {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.15) translateY(-.5px); }
}
@keyframes fuehli-sleep-eye {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(1.08); }
}
@keyframes fuehli-tear {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(4px); opacity: 1; }
}
@keyframes fuehli-twinkle {
  0%, 100% { opacity: .45; transform: scale(.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(18deg); }
}
@keyframes fuehli-prop-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.06); }
}
@keyframes fuehli-prop-pop {
  0%, 100% { transform: scale(1) rotate(-6deg); }
  50% { transform: scale(1.2) rotate(8deg); }
}
@keyframes fuehli-star {
  0%, 100% { transform: scale(.9) rotate(0deg); opacity: .75; }
  50% { transform: scale(1.2) rotate(18deg); opacity: 1; }
}
@keyframes fuehli-flutter-a {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50% { transform: translate(4px, -6px) rotate(10deg); }
}
@keyframes fuehli-flutter-b {
  0%, 100% { transform: translate(0, 0) rotate(8deg); }
  50% { transform: translate(-5px, -5px) rotate(-12deg); }
}
@keyframes fuehli-spin-soft {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(10deg) scale(1.08); }
}
@keyframes fuehli-sun {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fuehli-rays {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes fuehli-zzz {
  0%, 100% { transform: translateY(0) scale(.9); opacity: .35; }
  50% { transform: translateY(-8px) scale(1.1); opacity: 1; }
}
@keyframes fuehli-leaf {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(10deg) translateY(-3px); }
}
@keyframes fuehli-badge {
  0%, 100% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.12) rotate(-6deg); }
  70% { transform: scale(1.08) rotate(5deg); }
}
@keyframes fuehli-puddle {
  0%, 100% { transform: scaleX(1) scaleY(1); opacity: .75; }
  50% { transform: scaleX(1.12) scaleY(.88); opacity: 1; }
}
@keyframes fuehli-giggle {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, -1px) rotate(-3deg); }
  50% { transform: translate(2px, -2px) rotate(3deg); }
  75% { transform: translate(-1px, -1px) rotate(-2deg); }
}
@keyframes fuehli-brave-pose {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}
@keyframes fuehli-thumbsup {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(18deg) translateY(-4px); }
}
@keyframes fuehli-melt-body {
  0%, 100% { transform: scale(1, 1) translateY(0); }
  50% { transform: scale(1.08, .88) translateY(4px); }
}
@keyframes fuehli-sleepy-sway {
  0%, 100% { transform: rotate(-3deg) translateY(1px); }
  50% { transform: rotate(3deg) translateY(-2px); }
}
@keyframes fuehli-sigh {
  0%, 100% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.02, .96) translateY(2px); }
  70% { transform: scale(.98, 1.02) translateY(-2px); }
}
@keyframes fuehli-cuddle-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.04, .97); }
}
@media (prefers-reduced-motion: reduce) {
  .fuehli-creature .fuehli-figure,
  .fuehli-creature .fuehli-body,
  .fuehli-creature .fuehli-belly,
  .fuehli-creature .fuehli-ear,
  .fuehli-creature .fuehli-tuft,
  .fuehli-creature .fuehli-horn,
  .fuehli-creature .fuehli-arm,
  .fuehli-creature .fuehli-foot,
  .fuehli-creature .fuehli-shadow,
  .fuehli-creature .fuehli-blush,
  .fuehli-creature .fuehli-nose,
  .fuehli-creature .fuehli-mouth,
  .fuehli-creature .fuehli-eye,
  .fuehli-creature .fuehli-pupil,
  .fuehli-creature .fuehli-prop,
  .fuehli-creature .fuehli-star,
  .fuehli-creature .fuehli-butterfly,
  .fuehli-creature .fuehli-z,
  .fuehli-creature .fuehli-puddle,
  .fuehli-creature .fuehli-tear,
  .fuehli-creature .fuehli-face-spark,
  .fuehli-creature .fuehli-eye-shine,
  .fuehli-creature .fuehli-sun-rays,
  .fuehli-glow,
  .fuehli-bubble { animation: none !important; }
}
.anim-emoji-wrap {
  display: inline-block;
  animation: emojiFadeIn .35s ease both;
  line-height: 0;
}
.anim-emoji {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  /* No transform/filter animation on the GIF itself — keeps the loop running. */
  filter: drop-shadow(0 6px 10px rgba(40,48,72,.12));
}
.emoji-plain {
  display: inline-block;
  animation: emoji-pop .55s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes emoji-pop {
  0% { opacity: 0; transform: scale(.45) translateY(10px); }
  60% { opacity: 1; transform: scale(1.12) translateY(-4px); }
  100% { transform: scale(1) translateY(0); }
}
.chat-gif {
  max-width: min(240px, 70vw);
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 20px rgba(40,48,72,.15);
}
img.is-anim-paused {
  background: rgba(20, 28, 44, .08);
  object-fit: contain;
}

.crop-wrap {
  width: 100%;
  max-width: 100%;
  margin: .75rem 0 0;
}
.crop-viewport {
  position: relative;
  width: min(100%, 320px);
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #1a2230;
  border: 1px solid var(--stroke);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  display: block;
  transform-origin: 0 0;
  pointer-events: none;
  -webkit-user-drag: none;
}
.crop-help { margin: .55rem 0 .35rem; text-align: center; }
.crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .65rem;
}
.range { width: 100%; }

.footer-note { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 0; margin: 0; }
.footer-note .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem .75rem;
  margin-top: .55rem;
}
.footer-note .footer-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-note .footer-links a:hover {
  color: var(--ink);
}
.m-menu-info a.m-menu-btn {
  text-decoration: none;
}

.admin-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { font-family: var(--font-display); font-size: 2rem; }

.verify-box {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.verify-box .section-title {
  text-align: center;
}
.verify-box video, .verify-box canvas {
  width: 100%; max-width: 420px; border-radius: 18px; background: #111;
  margin-left: auto; margin-right: auto;
}
.verify-steps {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 1rem;
  justify-content: center;
}
.verify-step-pill {
  font-size: .78rem; font-weight: 700; padding: .35rem .65rem; border-radius: 999px;
  background: rgba(0,0,0,.06); color: var(--muted);
}
.verify-step-pill.is-active { background: var(--accent, #3d5afe); color: #fff; }
.verify-step-pill.is-done { background: rgba(46, 160, 110, .18); color: #1b7a4a; }
.verify-example {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .75rem auto 1rem;
  max-width: 420px;
}
@media (max-width: 520px) {
  .verify-example { grid-template-columns: 1fr; }
}
.verify-example-card {
  border: 1px solid rgba(0,0,0,.08); border-radius: 14px; padding: .65rem .7rem;
  background: rgba(255,255,255,.55);
  text-align: left;
}
.verify-example-card svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.verify-example-card p { margin: .45rem 0 0; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.verify-cam-wrap {
  position: relative; width: 100%; max-width: 420px;
  margin: .5rem auto;
  border-radius: 18px; overflow: hidden; background: #111;
}
.verify-cam-wrap video {
  display: block; width: 100%; max-width: none; border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover;
}
.verify-cam-wrap video.is-mirrored {
  transform: scaleX(-1);
}
.verify-cam-mirror {
  position: absolute; top: .55rem; left: .55rem; z-index: 3;
  min-width: 2.5rem; padding: .4rem .65rem; font-size: .95rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.verify-cam-mirror[aria-pressed="true"] {
  background: rgba(47, 111, 237, .92);
  color: #fff;
}
.verify-cam-flip {
  position: absolute; top: .55rem; right: .55rem; z-index: 3;
  min-width: 2.5rem; padding: .4rem .65rem; font-size: .82rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.verify-frame {
  pointer-events: none; position: absolute; inset: 10% 8%;
  border: 2px dashed rgba(255,255,255,.85); border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.35);
}
.verify-frame.is-passport {
  inset: 8% 6%;
  border-radius: 10px;
}
.verify-frame-hint {
  position: absolute; left: 50%; bottom: .55rem; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff; font-size: .78rem; padding: .25rem .55rem;
  border-radius: 999px; white-space: nowrap;
}
.verify-guide {
  margin: 0 0 .55rem;
  color: var(--muted);
  line-height: 1.4;
}
.verify-coach {
  margin: 0 0 .65rem;
  padding: .7rem .85rem;
  border-radius: 14px;
  background: rgba(36, 48, 72, .08);
  border: 1px solid rgba(80, 100, 140, .2);
  font-size: .92rem;
  line-height: 1.35;
}
.verify-coach strong {
  display: block;
  margin-bottom: .35rem;
  font-family: var(--font-display);
  font-size: 1rem;
}
.verify-coach ul {
  margin: 0;
  padding-left: 1.1rem;
}
.verify-coach li { margin: .15rem 0; }
.verify-coach.is-good {
  background: rgba(36, 140, 90, .12);
  border-color: rgba(36, 140, 90, .35);
}
.verify-live-hint {
  position: absolute; left: 50%; bottom: .65rem; transform: translateX(-50%);
  z-index: 2; max-width: 92%;
  background: rgba(20,28,44,.78); color: #fff; font-size: .86rem; font-weight: 650;
  padding: .4rem .75rem; border-radius: 999px; text-align: center;
  line-height: 1.25; backdrop-filter: blur(6px);
  transition: background .2s ease, color .2s ease;
}
.verify-live-hint.is-good {
  background: rgba(36, 140, 90, .88);
}
.verify-countdown {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: .35rem;
  background: rgba(12, 18, 32, .42);
  pointer-events: none;
  text-align: center;
  padding: 1rem;
}
.verify-countdown[hidden] { display: none !important; }
/* Während Aufnahme: kein roter/dunkler Schleier — sonst wirkt es wie «noch nicht gestartet». */
.verify-countdown.is-recording {
  background: transparent;
  place-content: start center;
  padding-top: .85rem;
  align-content: start;
}
.verify-countdown.is-recording .verify-countdown-label,
.verify-countdown.is-recording .verify-countdown-num {
  color: #fff;
  text-shadow:
    0 0 2px rgba(0, 0, 0, .9),
    0 2px 10px rgba(0, 0, 0, .75);
}
.verify-countdown-label {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
  line-height: 1.25;
}
.verify-countdown-num {
  font-size: clamp(3.4rem, 18vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(0,0,0,.55);
  animation: verify-count-pop .28s ease both;
}
@keyframes verify-count-pop {
  from { transform: scale(1.25); opacity: .55; }
  to { transform: scale(1); opacity: 1; }
}
.verify-guide {
  margin: .35rem auto .85rem;
  max-width: 420px;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink, #243048);
  text-align: center;
}
.verify-choice {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin: .5rem auto 1rem;
  max-width: 420px;
}
.verify-choice-row {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
.verify-choice-btn,
.verify-choice .btn {
  width: 100%;
  justify-content: center;
  padding: .85rem 1rem;
  font-size: 1rem;
}
.verify-choice-row .btn {
  width: auto;
  flex: 1 1 140px;
}
.verify-upload-fallback {
  margin-top: .85rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: .75rem;
  border-top: 1px solid rgba(0,0,0,.08);
  max-width: 420px;
}
.verify-zoom {
  display: flex;
  align-items: center;
  gap: .45rem;
  max-width: 420px;
  margin: .35rem auto .15rem;
}
.verify-zoom[hidden] { display: none !important; }
.verify-zoom .btn {
  min-width: 2.4rem;
  padding: .35rem .55rem;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 700;
}
.verify-zoom input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--accent, #2f6fed);
}
.verify-upload-note {
  max-width: 420px;
  margin: 0 auto .5rem;
  font-size: .86rem;
  line-height: 1.35;
  text-align: center;
}
.verify-chal-instr {
  font-size: 1.05rem;
  font-weight: 650;
  margin: .2rem 0 .5rem;
  line-height: 1.35;
}
.verify-chal-timer {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.verify-upload-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  margin: .75rem 0 1rem;
  width: 100%;
  max-width: 28rem;
}
.verify-upload-btn.is-busy {
  opacity: .65;
  pointer-events: none;
  cursor: not-allowed;
}
.verify-upload-note {
  margin: 0 0 .35rem;
  line-height: 1.4;
}
.verify-progress {
  width: 100%;
  box-sizing: border-box;
  margin-top: .35rem;
  padding: .9rem 1rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(232, 245, 255, .95), rgba(255,255,255,.92));
  border: 1px solid rgba(80, 130, 190, .22);
  box-shadow: 0 8px 22px rgba(40, 70, 110, .1);
}
.verify-progress.is-active {
  animation: verify-progress-pulse 1.8s ease-in-out infinite;
}
.verify-progress-head {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .45rem;
}
.verify-progress-title {
  font-size: .95rem;
  color: #234a62;
}
.verify-progress-spinner {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2.5px solid rgba(58, 140, 200, .22);
  border-top-color: #3a8cc8;
  flex-shrink: 0;
  animation: verify-spin .75s linear infinite;
}
.verify-progress-stage {
  margin: 0 0 .55rem;
  font-size: .88rem;
  font-weight: 650;
  color: #2a5570;
  min-height: 1.35em;
}
.verify-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(80, 130, 190, .14);
  overflow: hidden;
}
.verify-progress-bar {
  height: 100%;
  width: 10%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5eb8e8, #3a8cc8 55%, #7dcea0);
  transition: width .8s ease;
}
.verify-progress-hint {
  margin: .55rem 0 0;
  font-size: .78rem;
}
@keyframes verify-spin {
  to { transform: rotate(360deg); }
}
@keyframes verify-progress-pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(40, 70, 110, .1); }
  50% { box-shadow: 0 10px 28px rgba(58, 140, 200, .22); }
}
.verify-chal {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.verify-chal-number {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(3.2rem, 12vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
  margin: .15rem 0 .55rem;
  color: var(--text, #1a2233);
}
.verify-manual {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  justify-content: center;
  margin: .75rem auto 0;
  max-width: 420px;
  font-size: .86rem;
  color: var(--muted);
  text-align: left;
}
.verify-shot-preview {
  width: 100%; max-width: 420px; border-radius: 14px; border: 1px solid rgba(0,0,0,.08);
  display: block; margin: .5rem auto;
}
.verify-actions {
  display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem auto;
  justify-content: center;
  max-width: 420px;
}
.verify-tips {
  font-size: .88rem; color: var(--muted); margin: .35rem auto .75rem;
  max-width: 420px; text-align: center;
}
.verify-box #v-msg {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.action-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(40, 48, 72, .35);
  backdrop-filter: blur(4px);
  display: grid; place-items: end center;
  padding: 1rem;
  animation: fade-in .18s ease both;
}
.action-sheet {
  width: min(280px, calc(100vw - 2.5rem));
  max-width: 280px;
  box-sizing: border-box;
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--stroke);
  border-radius: 24px 24px 20px 20px;
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.1rem;
  animation: sheet-up .22s ease both;
  margin-bottom: .25rem;
  /* visible — btn:hover translate/shadow must not clip the right border */
  overflow: visible;
}
.action-sheet .btn:hover,
.action-sheet .btn:focus-visible {
  transform: none;
}
.action-sheet.action-sheet-wide {
  width: min(340px, calc(100vw - 2.5rem));
  max-width: 340px;
  max-height: 85vh;
  overflow: auto;
}
.action-sheet-head {
  display: flex; gap: .85rem; align-items: center;
  margin-bottom: 1rem;
}
.action-sheet-head .avatar {
  width: 56px; height: 56px; border-radius: 18px; object-fit: cover;
}
.action-sheet-actions {
  display: grid; gap: .55rem;
}
.role-switch {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 .15rem;
  font-size: .85rem;
  color: var(--muted);
}
.role-switch select {
  margin: 0;
  padding: .3rem .5rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.85);
  font: inherit;
  color: var(--ink);
  max-width: 11rem;
}
.m-menu-body .role-switch {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin: .35rem 0 .6rem;
  padding: .35rem .15rem;
}
.m-menu-body .role-switch select {
  max-width: none;
  flex: 1;
}
.cr-youth-options {
  border: 0;
  padding: 0;
  margin: .8rem 0 0;
  text-align: left;
  display: block;
  width: 100%;
  min-inline-size: 0;
}
.cr-youth-options legend {
  display: block;
  float: none;
  width: 100%;
  padding: 0;
  margin: 0 0 .35rem;
  font-size: .85rem;
  color: var(--muted);
  text-align: left;
}
.cr-youth-options .cr-youth-option {
  display: flex !important;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: .5rem;
  width: 100%;
  max-width: 100%;
  margin: .35rem 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  white-space: nowrap;
}
.cr-youth-options .cr-youth-option span {
  white-space: nowrap;
  flex: 0 0 auto;
}
.cr-youth-options .cr-youth-option input {
  flex: 0 0 auto;
  margin: 0;
}
.cr-youth-options .cr-youth-hint {
  margin: .45rem 0 0;
  text-align: left;
}
.cr-suggest-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .25rem;
}
.cr-suggest-list .cr-suggest {
  font-size: .85rem;
  padding: .35rem .7rem;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheet-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 720px) {
  .action-overlay { place-items: center; }
  .action-sheet { border-radius: var(--radius); }
}

.search-shell { padding: 1rem 0 3rem; }
.search-panel { max-width: 820px; margin: 0 auto; }
.search-head {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.search-free-badge,
.search-paid-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.search-free-badge {
  background: rgba(78, 205, 196, .22);
  color: #0f6b63;
  border: 1px solid rgba(78, 205, 196, .45);
}
.search-paid-badge {
  background: rgba(255, 209, 102, .28);
  color: #7a4f00;
  border: 1px solid rgba(255, 209, 102, .5);
}
.search-form label { margin-top: .65rem; }
.search-online-toggle {
  display: flex !important;
  align-items: center;
  gap: .5rem;
  margin-top: .9rem;
  cursor: pointer;
  color: inherit;
  font-weight: 600;
}
.search-results { margin-top: 1.25rem; }
.search-result-row { cursor: pointer; }

/* Landing: Sicherheit zuerst (expand on „Warum Verifizierung?“) */
.learn-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  box-sizing: border-box;
}
.learn-overlay.is-open {
  pointer-events: auto;
  visibility: visible;
}
.learn-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  background: rgba(12, 18, 28, .45);
  cursor: pointer;
  opacity: 0;
  transition: opacity .22s ease;
}
.learn-overlay.is-open .learn-backdrop { opacity: 1; }
.learn-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(78vh, 520px);
  margin: 0;
  border-radius: 1.1rem 1.1rem 0 0;
  padding: 1.15rem 1.2rem 1.4rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(110%);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .18);
  box-sizing: border-box;
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, .95);
  color: var(--ink);
}
.learn-overlay.is-open .learn-panel { transform: translateY(0); }
.learn-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .65rem;
  min-width: 0;
}
.learn-panel-head .section-title {
  margin: 0;
  padding-right: .25rem;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.learn-panel-body {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  color: var(--muted);
}
.learn-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: .65rem;
  background: rgba(36, 48, 68, .06);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.learn-close:hover { background: rgba(36, 48, 68, .1); }
.learn-close:focus-visible {
  outline: 2px solid var(--accent, #4ecdc4);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  /* Anchored under „Warum Verifizierung?“ — bright white card, no grey veil */
  .learn-overlay.learn-anchored {
    align-items: flex-start;
    justify-content: stretch;
  }
  .learn-overlay.learn-anchored .learn-backdrop {
    background: transparent;
  }
  .learn-overlay.learn-anchored .learn-panel {
    position: absolute;
    width: auto;
    max-width: none;
    border-radius: 1.15rem;
    background: #ffffff;
    box-shadow:
      0 10px 28px rgba(70, 90, 140, .16),
      0 2px 8px rgba(36, 48, 68, .08);
    border: 1px solid rgba(255, 255, 255, 1);
    transform: translateY(-6px);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
  }
  .learn-overlay.learn-anchored.is-open .learn-panel {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (min-width: 721px) {
  .learn-overlay { align-items: center; padding: 1.5rem; }
  .learn-panel {
    border-radius: 1.1rem;
    width: min(100%, 480px);
    max-width: 480px;
    max-height: min(70vh, 420px);
    transform: translateY(16px) scale(.98);
    opacity: 0;
    transition: transform .24s ease, opacity .24s ease;
    box-shadow: 0 20px 50px rgba(70, 90, 140, .2);
  }
  .learn-overlay.is-open .learn-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* —— Centered app notices (custom alert / confirm) —— */
.sc-notice-root {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1.1rem max(1rem, env(safe-area-inset-bottom));
  pointer-events: none;
  visibility: hidden;
}
.sc-notice-root.is-open,
.sc-notice-root.is-leaving {
  pointer-events: auto;
  visibility: visible;
}
.sc-notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 36, 58, .38);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .32s cubic-bezier(.22, 1, .36, 1);
}
.sc-notice-card {
  position: relative;
  z-index: 1;
  width: min(100%, 24.5rem);
  margin: 0;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, .72);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .72)),
    radial-gradient(120% 90% at 0% 0%, rgba(124, 140, 255, .18), transparent 55%),
    radial-gradient(100% 80% at 100% 100%, rgba(87, 197, 182, .14), transparent 50%);
  box-shadow:
    0 28px 70px rgba(48, 62, 110, .28),
    0 2px 0 rgba(255, 255, 255, .65) inset;
  transform: translateY(18px) scale(.94);
  opacity: 0;
  transition:
    transform .38s cubic-bezier(.22, 1.15, .32, 1),
    opacity .32s cubic-bezier(.22, 1, .36, 1);
  text-align: center;
}
.sc-notice-root.is-open .sc-notice-backdrop { opacity: 1; }
.sc-notice-root.is-open .sc-notice-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.sc-notice-root.is-leaving .sc-notice-backdrop {
  opacity: 0;
  transition-duration: .28s;
}
.sc-notice-root.is-leaving .sc-notice-card {
  transform: translateY(-10px) scale(.96);
  opacity: 0;
  transition-duration: .28s;
}
.sc-notice-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sc-notice-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.15rem;
}
.sc-notice-actions .btn {
  min-width: 7.5rem;
}
@media (prefers-reduced-motion: reduce) {
  .sc-notice-backdrop,
  .sc-notice-card {
    transition-duration: .01ms !important;
  }
}

/* Private chat inbox */
.nav-dm-btn {
  position: relative;
}
.nav-dm-badge,
.nav-friend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 .28rem;
  margin-left: .35rem;
  border-radius: 999px;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
/* Author display:inline-flex would otherwise override HTML [hidden]. */
.nav-dm-badge[hidden],
.nav-friend-badge[hidden] {
  display: none !important;
}
.nav-dm-badge {
  background: #c62828;
}
.nav-friend-badge {
  background: #2e7d32;
}
.dm-peer-avatar {
  display: inline-flex;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  vertical-align: middle;
}
.dm-peer-av {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .95);
  background: rgba(240, 242, 248, .9);
  box-shadow: 0 1px 4px rgba(40, 48, 72, .18);
}
.dm-peer-avatar--inbox {
  width: 2.55rem;
  height: 2.55rem;
}
.dm-inbox-row.is-blocked {
  opacity: .78;
}
.nav-friend-btn {
  position: relative;
}
.dm-inbox-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.dm-inbox-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .65rem;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .55);
  border-radius: 12px;
  padding: .55rem .7rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.dm-inbox-row:hover {
  background: rgba(255, 255, 255, .85);
}
.dm-inbox-row.is-unread {
  border-color: rgba(198, 40, 40, .35);
  background: rgba(198, 40, 40, .06);
}
.dm-inbox-row .avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
}
.dm-inbox-row .avatar-fallback {
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .08);
  font-weight: 700;
}
.dm-inbox-body {
  min-width: 0;
}
.dm-inbox-top {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: baseline;
}
.dm-inbox-preview {
  margin-top: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* App settings + lock overlay */
.settings-panel .settings-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stroke);
}
.settings-panel .settings-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.settings-h {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 .35rem;
}
.settings-check {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: .45rem 0;
  cursor: pointer;
  line-height: 1.35;
}
.settings-check input {
  margin-top: .2rem;
  flex-shrink: 0;
}
.app-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(28, 36, 52, .55);
  backdrop-filter: blur(8px);
}
.app-lock-card {
  width: min(100%, 24rem);
  margin: 0;
}
.app-lock-card input[type="password"] {
  width: 100%;
}

/* Menu info / version */
.m-menu-info {
  margin-top: 1.1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--stroke);
}
.m-menu-info-label {
  margin: 0 0 .25rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .72rem;
  opacity: .75;
}
.m-menu-info-label .m-menu-label {
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: .72rem;
}
.m-menu-version {
  margin: 0;
  font-weight: 750;
  font-size: .95rem;
}
.m-menu-build {
  margin: .2rem 0 0;
  font-size: .75rem;
  opacity: .7;
}

.blocks-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--stroke);
}
.blocks-row:last-child { border-bottom: 0; }
.blocks-row .avatar,
.blocks-row .avatar-wrap .avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
}
.blocks-row-body {
  flex: 1 1 auto;
  min-width: 0;
}
.blocks-row .btn {
  flex-shrink: 0;
}
