/* =========================================================
   DanceFriend CSS 0.4 clean rebuild
   Aufbau:
   01 Tokens / Base
   02 Header / Navigation
   03 Buttons / Forms / Cards
   04 Landingpage
   05 Dashboard
   06 Suche / Suchkarten / Icons
   07 Profil / öffentliches Profil
   08 DanceFriends / Chat
   09 PWA / Lightbox / Sonstiges
   10 Responsive
   ========================================================= */

/* =========================================================
   01 Tokens / Base
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #0F766E;
    --accent-dark: #0A4F49;
    --blue: #0F766E;
    --blue-dark: #0A4F49;
    --green: #0F766E;

    --bg: #F4F4F4;
    --card: #FFFFFF;
    --text: #1E1E1E;
    --muted: #687073;
    --border: #E2E2E2;

    --danger: #DC2626;
    --danger-bg: #F3F4F4;
    --success: #0A4F49;
    --success-bg: rgba(15,118,110,0.11);

    --gold: #D4AF37;
    --shadow: 0 18px 48px rgba(30,30,30,0.10);
    --shadow-soft: 0 14px 36px rgba(30,30,30,0.07);
    --radius: 24px;
}

html { min-height: 100%; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15,118,110,0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(30,30,30,0.055), transparent 30%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: inherit; }

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 24px 70px;
}

.muted { color: var(--muted); line-height: 1.5; }

code {
    background: rgba(15,118,110,0.10);
    color: var(--accent-dark);
    padding: 2px 6px;
    border-radius: 8px;
}

.lucide {
    width: 1em;
    height: 1em;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   02 Header / Navigation
   ========================================================= */
.site-header {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.brand,
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
}

.brand-logo img {
    display: block;
    width: min(420px, 58vw);
    max-height: 72px;
    object-fit: contain;
}

.brand-mark,
.brand-logo .brand-mark,
.brand-logo > span:not(.brand-mark) { display: none !important; }

.top-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-weight: 700;
}

.top-nav a { text-decoration: none; }

.site-header-dashboard {
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    align-items: center;
    gap: 12px;
}

.site-header-dashboard .brand-logo {
    grid-column: 2;
    justify-content: center;
}

.site-header-dashboard .brand-logo img {
    width: min(300px, 56vw);
    max-height: 64px;
}

.site-header-dashboard .dashboard-top-nav {
    grid-column: 3;
    justify-self: end;
}

.site-header-subpage {
    position: sticky;
    top: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    align-items: center;
    gap: 12px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 24px;
    background: rgba(244,244,244,0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(30,30,30,0.05);
    border-radius: 0 0 18px 18px;
}

.site-header-subpage .subpage-logo,
.site-header-subpage .brand-logo {
    justify-self: center;
    justify-content: center;
}

.site-header-subpage .subpage-logo img,
.site-header-subpage .brand-logo img {
    width: min(260px, 54vw);
    max-height: 54px;
}

.sub-back-link,
.top-chat-link {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--accent) !important;
    background: rgba(15,118,110,0.10);
    border: 1px solid rgba(15,118,110,0.18);
    text-decoration: none;
    position: relative;
}

.sub-back-link svg,
.top-chat-link svg { width: 24px; height: 24px; }
.sub-chat-link { justify-self: end; }
.dashboard-top-nav { margin-left: auto; }

.top-chat-link span {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15,118,110,.28);
}

.dashboard-logout-row {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}
.dashboard-logout-row a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
}
.dashboard-logout-row a:hover { color: var(--accent); }

.bottom-app-nav { display: none !important; }

.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 24px 40px;
    color: var(--muted);
    display: flex;
    gap: 10px;
    justify-content: center;
}
.site-footer strong { color: var(--text); }

/* =========================================================
   03 Buttons / Forms / Cards
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 15px 24px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(15,118,110,0.22);
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    box-shadow: 0 14px 28px rgba(30,30,30,0.08);
}

.btn-outline,
.top-nav .btn-outline {
    background: #fff;
    color: var(--text);
    box-shadow: none;
    border: 1px solid rgba(30,30,30,0.16);
}

.btn-outline:hover,
.top-nav .btn-outline:hover {
    color: var(--accent);
    border-color: rgba(15,118,110,0.35);
}

.btn-small { padding: 10px 16px; font-size: 14px; }

.eyebrow {
    display: inline-flex;
    background: rgba(15,118,110,0.10);
    color: var(--accent-dark);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 22px;
}

.auth-page,
.dashboard-page,
.profile-page {
    max-width: 860px;
    margin: 0 auto;
}

.auth-card,
.form-card,
.progress-card,
.feature-card,
.public-profile-card,
.search-filter-card,
.person-tile,
.buddy-row {
    background: #fff;
    border: 1px solid rgba(30,30,30,0.06);
    box-shadow: var(--shadow-soft);
}

.auth-card,
.form-card,
.progress-card {
    border-radius: 34px;
    padding: 34px;
}

.auth-card h1,
.page-head h1 {
    font-size: 44px;
    letter-spacing: -2px;
    margin-bottom: 10px;
}

.page-head { margin-bottom: 24px; }
.page-head .eyebrow,
.chat-head .eyebrow,
.public-profile-info .eyebrow { display: none !important; }

.form,
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 26px;
}

.form label,
.profile-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 800;
}

.form input,
.form select,
.profile-form input,
.profile-form select,
.profile-form textarea,
.chat-compose textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    font-size: 17px;
    background: #fff;
    font-family: inherit;
}

.form textarea,
.profile-form textarea,
.chat-compose textarea { resize: vertical; }

.form input:focus,
.form select:focus,
.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus,
.chat-compose textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(15,118,110,0.12);
}

.notice {
    padding: 14px 16px;
    border-radius: 18px;
    margin: 20px 0;
    font-weight: 800;
}
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice.success { background: var(--success-bg); color: var(--success); }

.form-grid.two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.section-subtitle { margin-top: 28px; }

/* =========================================================
   04 Landingpage
   ========================================================= */
body.is-landing { background: #F4F4F4; }

body.is-landing .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    max-width: none;
    width: 100%;
    padding: 24px clamp(20px, 5vw, 70px);
}

body.is-landing main {
    max-width: none;
    padding: 0;
}

.site-header-landing .top-nav { display: none !important; }
.site-header-landing .brand-logo img { width: min(420px, 52vw); max-height: 96px; }

.landing-hero,
.landing-hero.landing-hero-photo {
    min-height: 610px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 54px;
}

.hero-content h1 {
    font-size: clamp(48px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -4px;
    max-width: 760px;
    margin-bottom: 20px;
}

.hero-subline {
    font-size: 27px;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 16px;
}

.hero-text {
    font-size: 21px;
    line-height: 1.55;
    color: var(--muted);
    max-width: 650px;
    margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.trust-text { color: var(--muted); font-weight: 700; }

.hero-visual { display: none !important; }

.hero-photo-card {
    position: relative;
    min-height: 600px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111;
}

.hero-photo-card img {
    width: 100%;
    height: 100%;
    min-height: 600px;
    object-fit: cover;
    object-position: 58% 50%;
    display: block;
}

.hero-photo-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(30,30,30,0.26), transparent 42%);
    pointer-events: none;
}

.landing-hero-full {
    position: relative;
    min-height: 760px;
    background-image: url('assets/images/hero-dancefriend.png') !important;
    background-position: center center !important;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.landing-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.60) 28%, rgba(0,0,0,0.22) 56%, rgba(0,0,0,0.12) 100%),
        linear-gradient(0deg, rgba(0,0,0,0.28), rgba(0,0,0,0.05));
    pointer-events: none;
}

.landing-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 150px 24px 80px;
}

.landing-hero-full .hero-content { max-width: 560px; }
.landing-hero-full h1 {
    color: #fff;
    font-size: clamp(46px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -4px;
    margin-bottom: 22px;
}
.landing-hero-full .hero-subline { color: #fff; }
.landing-hero-full .hero-text,
.landing-hero-full .trust-text { color: rgba(255,255,255,0.86); }
.landing-hero-full .eyebrow { background: rgba(255,255,255,0.13); color: #fff; backdrop-filter: blur(8px); }
.landing-hero-full .btn-secondary { background: rgba(255,255,255,0.94); color: var(--text); }

body.is-landing .how-it-works {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 24px 80px;
}

.how-it-works { padding-top: 30px; }
.how-it-works h2 { font-size: 36px; letter-spacing: -1px; margin-bottom: 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { border-radius: var(--radius); padding: 28px; }
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(15,118,110,0.10);
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 22px; margin-bottom: 10px; }
.feature-card p { color: var(--muted); line-height: 1.55; }

/* =========================================================
   05 Dashboard
   ========================================================= */
.dashboard-page,
.dashboard-redesign {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.dashboard-redesign { max-width: 1120px; }

/* Stellschrauben Dashboard-Hintergrund:
   background-size = Zoom / kleinerer Ausschnitt
   background-position = Ausschnitt verschieben */
.dashboard-hero,
.dashboard-hero-loft,
.dashboard-hero.dashboard-hero-loft {
    position: relative !important;
    overflow: hidden !important;
    min-height: 170px !important;
    padding: 30px !important;
    border-radius: 28px !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    box-shadow: var(--shadow) !important;
    background-image:
        linear-gradient(90deg, rgba(30,30,30,0.78), rgba(30,30,30,0.38)),
        url('assets/images/hero-dancefriend.png') !important;
    background-repeat: no-repeat !important;
    background-size: 140% auto !important;
    background-position: 78% center !important;
}

.dashboard-hero::after,
.dashboard-hero-loft::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    background: radial-gradient(circle at right center, rgba(15,118,110,0.18), transparent 42%) !important;
}

.dashboard-hero > *,
.dashboard-hero-loft > * {
    position: relative !important;
    z-index: 1 !important;
}

.dashboard-hero .eyebrow,
.dashboard-hero-loft .eyebrow { display: none !important; }

.dashboard-hello-text h1,
.dashboard-hero h1,
.dashboard-hero-loft h1 {
    font-size: clamp(32px, 4vw, 48px) !important;
    line-height: 1.04 !important;
    letter-spacing: -1.3px !important;
    margin: 0 0 6px !important;
}

.dashboard-hello-text p,
.dashboard-hero .hero-text,
.dashboard-hero-loft .hero-text {
    font-size: 18px !important;
    color: rgba(255,255,255,0.94) !important;
    margin: 0 !important;
}

.avatar {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    background: #fff;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 900;
    flex-shrink: 0;
    overflow: hidden;
    text-decoration: none;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.small { width: 62px; height: 62px; border-radius: 22px; font-size: 28px; }
.avatar.large { width: 96px; height: 96px; border-radius: 30px; font-size: 42px; box-shadow: 0 12px 28px rgba(23,32,51,0.07); }

.dashboard-hero .avatar,
.dashboard-hero-loft .avatar,
.dashboard-hero .avatar-click,
.dashboard-hero-loft .avatar-click {
    width: 96px !important;
    height: 96px !important;
    border-radius: 28px !important;
    border: 4px solid rgba(255,255,255,0.95) !important;
    background: rgba(255,255,255,0.96) !important;
    color: var(--accent) !important;
    box-shadow: 0 18px 44px rgba(0,0,0,0.32) !important;
}

.dashboard-notice-strip { display: none !important; }

.dashboard-actions-grid,
.dashboard-actions-v036 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

.dash-action-card {
    position: relative;
    min-width: 0;
    min-height: 184px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(30,30,30,0.06);
    border-radius: 26px;
    padding: 24px 44px 24px 24px;
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(30,30,30,0.07);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: transform .16s ease, box-shadow .16s ease;
}

.dash-action-card:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(30,30,30,0.10); }

.dash-action-card strong {
    display: block;
    max-width: 100%;
    font-size: 21px;
    line-height: 1.15;
    margin-top: 10px;
    overflow-wrap: normal;
    word-break: normal;
}

.dash-action-card small {
    display: block;
    max-width: 100%;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
    margin-top: 10px;
}

.dash-action-card em { display: none !important; }

.dash-action-primary {
    grid-column: 1 / -1 !important;
    min-height: 138px;
    display: grid !important;
    grid-template-columns: auto 1fr;
    align-items: center !important;
    gap: 22px !important;
}

.dash-action-primary strong {
    font-size: clamp(30px, 3.3vw, 44px) !important;
    line-height: 1.06 !important;
    letter-spacing: -1.4px;
    white-space: normal !important;
    margin: 0 0 8px;
}

.dash-action-primary small {
    font-size: 18px !important;
    max-width: 760px !important;
    margin-top: 10px !important;
}

.app-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--accent) !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 14px 28px rgba(15,118,110,.20);
}

.app-icon-circle svg { width: 52%; height: 52%; stroke: #fff; stroke-width: 2.35; }
.dash-action-primary .app-icon-circle { width: 68px; height: 68px; }

.big-action-card,
.dashboard-grid { display: none !important; }

.progress-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.progress-card h2 { margin-bottom: 8px; }
.progress-card p { color: var(--muted); margin-bottom: 14px; }
.progress-track { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress-track div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); border-radius: 999px; }

/* =========================================================
   06 Suche / Suchkarten / Icons
   ========================================================= */
.search-page { max-width: 980px; margin: 0 auto; }
.search-filter-card { margin-bottom: 24px; border-radius: 34px; padding: 34px; }

.search-filter-card summary {
    list-style: none;
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.search-filter-card summary::-webkit-details-marker { display: none; }
.search-filter-card summary::after { display: none !important; content: none !important; }

.summary-icons { color: var(--accent); display: inline-flex; align-items: center; }
.summary-icons svg { width: 28px; height: 28px; }
.search-filter-card .summary-up { display: none; }
.search-filter-card[open] .summary-down { display: none; }
.search-filter-card[open] .summary-up { display: inline-flex; }
.search-filter-form { margin-top: 22px; }
.search-filter-form select { min-height: 58px; font-size: 18px; padding: 16px 18px; }
.search-filter-form label { font-size: 17px; }

.filter-dances { margin-top: 22px; }
.filter-dances > strong { display: block; margin-bottom: 12px; font-size: 18px; }
.dance-check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dance-check-grid label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    background: var(--bg);
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
}
.dance-check-grid input { width: auto !important; accent-color: var(--accent); }
.filter-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.small-note { font-size: 14px; margin-top: 14px; }

.people-grid,
.buddy-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.people-grid .empty-state { grid-column: 1 / -1; }

.person-tile,
.buddy-search-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(229,231,235,0.9);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(23,32,51,0.08);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    transition: transform .16s ease, box-shadow .16s ease;
}

.person-tile:hover,
.buddy-search-card:hover { transform: translateY(-2px); box-shadow: 0 22px 54px rgba(23,32,51,0.12); }

.person-tile-link,
.buddy-card-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.person-tile-photo,
.buddy-card-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(15,118,110,0.10), rgba(15,118,110,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--accent);
    font-size: 54px;
    font-weight: 900;
}

.person-tile-photo img,
.buddy-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.buddy-card-initial {
    display: inline-flex;
    width: 88px;
    height: 88px;
    border-radius: 30px;
    background: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(23,32,51,0.08);
}

.person-tile-body,
.buddy-card-content {
    display: block;
    padding: 13px 13px 8px;
    min-width: 0;
    flex: 1;
}

.person-tile-body strong,
.buddy-card-content strong {
    display: block;
    font-size: 18px;
    letter-spacing: -0.4px;
    line-height: 1.15;
    margin-bottom: 4px;
}

.person-tile-body small,
.buddy-card-content small {
    display: block;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-tile-body em,
.person-snippet,
.buddy-card-content em {
    display: -webkit-box;
    margin-top: 8px;
    color: var(--text);
    font-style: normal;
    font-size: 13px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.person-tile-actions.compact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 9px 11px 12px; }

.buddy-card-actionbar {
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    min-height: 58px;
}

.buddy-invite-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    padding: 0 12px;
    text-decoration: none;
    color: var(--accent-dark) !important;
    font-weight: 900;
    font-size: 17px;
}
.buddy-invite-btn svg { width: 22px; height: 22px; }

.buddy-location {
    display: flex !important;
    align-items: center;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}
.buddy-location svg,
.buddy-location .lucide { width: 16px; height: 16px; flex: 0 0 auto; color: var(--accent); }
.buddy-location .location-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block; }

/* Suchkarten: Stern und Blockieren als echte nackte Lucide-Icons */
.buddy-fav-form,
.buddy-block-form {
    position: absolute !important;
    z-index: 20 !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}
.buddy-fav-form { top: 16px !important; right: 16px !important; }
.buddy-block-form { top: 16px !important; left: 16px !important; }

.buddy-fav-btn,
.buddy-block-btn,
.buddy-fav-btn:hover,
.buddy-block-btn:hover,
.buddy-fav-btn:focus,
.buddy-block-btn:focus,
.buddy-fav-btn:focus-visible,
.buddy-block-btn:focus-visible,
.buddy-fav-btn:active,
.buddy-block-btn:active {
    all: unset !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    color: #9ca3af !important;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.42)) !important;
}

.buddy-fav-btn svg,
.buddy-fav-btn .lucide,
.buddy-block-btn svg,
.buddy-block-btn .lucide {
    all: unset !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.25 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.buddy-fav-btn:hover,
.buddy-fav-btn.active,
.buddy-fav-btn.active:hover,
.buddy-fav-btn.active:focus,
.buddy-fav-btn.active:active {
    color: var(--gold) !important;
    filter: drop-shadow(0 0 7px rgba(212,175,55,0.70)) !important;
}

.buddy-block-btn:hover,
.buddy-block-btn.active,
.buddy-block-btn.active:hover,
.buddy-block-btn.active:focus,
.buddy-block-btn.active:active,
.buddy-search-card.is-blocked .buddy-block-btn {
    color: var(--danger) !important;
    filter: drop-shadow(0 0 7px rgba(220,38,38,0.55)) !important;
}

.buddy-fav-btn::before,
.buddy-fav-btn::after,
.buddy-block-btn::before,
.buddy-block-btn::after { display: none !important; content: none !important; }

.buddy-search-card.is-blocked .buddy-card-photo img,
.buddy-search-card.is-blocked .buddy-card-photo { filter: grayscale(0.92); }
.buddy-search-card.is-blocked .buddy-card-main { opacity: 0.72; }

.blocked-results-inline {
    margin-top: 32px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.blocked-results-inline .blocked-results-head h2 { font-size: 22px; margin-bottom: 4px; }
.blocked-results-inline .blocked-results-list { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; margin-top: 16px; }
.blocked-results-inline .blocked-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff !important;
    border: 1px solid rgba(30,30,30,0.06) !important;
    border-radius: 18px !important;
    padding: 12px !important;
    box-shadow: 0 12px 28px rgba(30,30,30,0.06) !important;
    opacity: 1 !important;
}
.blocked-result-profile { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.blocked-result-photo { width: 52px; height: 52px; border-radius: 18px; overflow: hidden; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--accent); font-weight: 900; filter: grayscale(0.8); }
.blocked-result-photo img { width: 100%; height: 100%; object-fit: cover; }
.blocked-result-profile strong,
.blocked-result-profile small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocked-result-profile small { color: var(--muted); font-size: 13px; margin-top: 3px; }
.blocked-result-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.blocked-result-actions span { display: none !important; }
.blocked-unban-btn,
.blocked-result-actions button { border: none; background: transparent; color: var(--danger) !important; padding: 0; cursor: pointer; display: inline-flex; filter: drop-shadow(0 0 6px rgba(220,38,38,0.20)); }
.blocked-unban-btn svg { width: 26px !important; height: 26px !important; }

.blocked-by-other-icon { color: var(--danger); display: inline-flex; filter: drop-shadow(0 0 6px rgba(220,38,38,0.20)); }
.blocked-by-other-icon svg { width: 26px; height: 26px; }



/* Suche 0.4.2: Entfernung zuerst, kompakte Meta-Chips */
.search-save-note {
    margin: 0 0 18px;
    font-weight: 700;
}

.buddy-card-content .buddy-location {
    margin-top: 2px;
}

.buddy-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 9px 0 2px;
}

.buddy-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 25px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15,118,110,0.09);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.buddy-card-content em {
    margin-top: 9px;
}


/* Suche 0.4.2: Entfernung ohne Kommastelle, Nähe bis 10 km fett */
.distance-value {
    white-space: nowrap;
    font-weight: 500;
}

.distance-near {
    font-weight: 900;
}

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

.buddy-location .location-text,
.blocked-location {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.location-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   07 Profil / öffentliches Profil
   ========================================================= */
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.choice-card { background: var(--bg); border: 1px solid transparent; border-radius: 22px; padding: 18px; cursor: pointer; }
.choice-card input { width: auto; margin-bottom: 10px; }
.choice-card span { font-size: 18px; }
.choice-card:has(input:checked) { background: rgba(15,118,110,0.10); border-color: rgba(15,118,110,0.35); }

.photo-upload-row { display: flex; align-items: center; gap: 18px; margin: 18px 0 24px; padding: 18px; border-radius: 24px; background: var(--bg); }
.photo-upload-label { flex: 1; }
.photo-upload-label input { margin-top: 8px; }
.photo-upload-label small { color: var(--muted); font-weight: 600; line-height: 1.4; }

.profile-photo-preview {
    width: 112px;
    height: 112px;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 900;
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(23,32,51,0.07);
    border: 1px solid var(--border);
}
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-photo-preview.empty { cursor: default; }
.avatar-click { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; overflow: hidden; }
.avatar-click:hover,
.profile-photo-preview:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(23,32,51,0.14); }

.dance-list,
.dance-list.compact { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.dance-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.dance-card { background: var(--bg); border: 1px solid transparent; border-radius: 24px; padding: 18px; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease; }
.dance-card.is-selected { background: #fff; border-color: rgba(15,118,110,0.32); box-shadow: 0 16px 38px rgba(23,32,51,0.08); }
.dance-toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px !important; cursor: pointer; margin-bottom: 14px; }
.dance-toggle input { width: 20px !important; height: 20px; accent-color: var(--accent); }
.dance-toggle span { font-size: 20px; font-weight: 900; }
.level-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.dance-card:not(.is-selected) .level-grid { display: none; }
.level-pill { display: block !important; cursor: pointer; }
.level-pill input { position: absolute; opacity: 0; pointer-events: none; }
.level-pill span { display: flex; align-items: center; min-height: 42px; border-radius: 999px; padding: 10px 13px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 800; border: 1px solid var(--border); transition: all .15s ease; }
.level-pill input:checked + span { background: rgba(15,118,110,0.12); color: var(--accent-dark); border-color: rgba(15,118,110,0.30); }

.dance-select-row { display: grid !important; grid-template-columns: 1fr 260px; align-items: center; gap: 16px !important; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 12px 14px; }
.dance-select-row > span { font-size: 17px; font-weight: 900; }
.dance-select-row select { background: #fff; }
.all-dances-check { background: rgba(15,118,110,0.12) !important; color: var(--accent-dark); font-weight: 900; }

.profile-save-actions { display: flex; justify-content: flex-end; margin-top: 18px; padding: 0; }
.profile-save-actions .btn { min-width: 220px; }
.sticky-actions { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; gap: 12px; background: rgba(246,248,252,0.88); backdrop-filter: blur(8px); padding: 14px; border-radius: 24px; }

.public-profile-page { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.public-profile-hero { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: center; }
.public-profile-photo { width: 100%; aspect-ratio: 1 / 1; border-radius: 34px; overflow: hidden; background: rgba(15,118,110,0.10); color: var(--accent); display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 96px; font-weight: 900; box-shadow: 0 18px 45px rgba(23,32,51,0.08); }
.public-profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.public-profile-info h1 { font-size: clamp(42px, 6vw, 66px); letter-spacing: -3px; line-height: 0.95; margin-bottom: 14px; }
.profile-meta-pills { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0 4px; }
.profile-meta-pills span { background: var(--bg); color: var(--text); border-radius: 999px; padding: 9px 13px; font-size: 14px; font-weight: 900; }
.profile-action-row,
.profile-bottom-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.profile-bottom-actions { display: none !important; }
.profile-section-card h2,
.buddy-section h2 { font-size: 28px; letter-spacing: -1px; margin-bottom: 14px; }
.profile-long-text { font-size: 18px; line-height: 1.65; }

.profile-icon-actions { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 14px !important; flex-wrap: nowrap !important; margin-top: 18px; }
.profile-icon-actions .inline-form { width: auto !important; flex: 0 0 auto !important; margin: 0; }
.profile-icon-actions .notice { flex: 1 1 100%; }
.profile-icon-btn { width: 44px !important; height: 44px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--muted) !important; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.profile-icon-btn svg { width: 28px !important; height: 28px !important; }
.profile-icon-btn.favorite.active { color: var(--gold) !important; filter: drop-shadow(0 0 8px rgba(212,175,55,0.35)); }
.profile-icon-btn.favorite.active svg { fill: none !important; }
.profile-icon-btn.message { color: var(--accent) !important; }
.profile-icon-btn.blocked.active,
.profile-icon-btn.blocked:hover { color: var(--danger) !important; filter: drop-shadow(0 0 8px rgba(220,38,38,0.30)); }

.dance-profile-list { display: flex; flex-direction: column; gap: 10px; }
.dance-profile-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--bg); }
.dance-profile-row span { color: var(--accent-dark); font-weight: 800; text-align: right; }
.dance-profile-row.is-match { border-color: rgba(15,118,110,0.22); background: rgba(15,118,110,0.045); }
.dance-level-wrap { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dance-match-badge { font-style: normal; font-size: 12px; font-weight: 900; line-height: 1; color: var(--accent); background: rgba(15,118,110,0.12); border: 1px solid rgba(15,118,110,0.20); border-radius: 999px; padding: 6px 9px; }

/* =========================================================
   08 DanceFriends / Chat
   ========================================================= */
.buddy-section + .buddy-section { margin-top: 22px; }
.buddy-list { display: flex; flex-direction: column; gap: 12px; }
.buddy-row { border-radius: 24px; padding: 16px; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.buddy-row > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.buddy-row strong { font-size: 19px; }
.buddy-row small { color: var(--muted); }
.buddy-row em { background: rgba(15,118,110,0.10); color: var(--accent); border-radius: 999px; padding: 6px 10px; font-style: normal; font-weight: 900; font-size: 12px; }

/* Nachrichtenübersicht */
.chat-overview-page { max-width: 860px; margin: 0 auto; }
.chat-overview-head { margin-bottom: 18px; }
.chat-overview-head h1 { font-size: clamp(38px, 6vw, 58px); letter-spacing: -2px; }
.chat-overview-head .hero-text { margin-bottom: 0; }
.chat-panel { background: #fff; border: 1px solid rgba(30,30,30,0.06); border-radius: 28px; box-shadow: 0 14px 36px rgba(30,30,30,0.07); }
.conversation-list { overflow: hidden; }
.conversation-row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; text-decoration: none; border-bottom: 1px solid rgba(30,30,30,0.06); transition: background .16s ease, transform .16s ease; }
.conversation-row:last-child { border-bottom: 0; }
.conversation-row:hover { background: rgba(15,118,110,0.045); }
.conversation-avatar { width: 58px; height: 58px; border-radius: 21px; overflow: hidden; background: linear-gradient(135deg, rgba(15,118,110,0.11), rgba(30,30,30,0.045)); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; flex: 0 0 auto; }
.conversation-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.conversation-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.conversation-title { color: var(--text); font-size: 18px; font-weight: 900; line-height: 1.15; }
.conversation-preview { color: var(--muted); font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-row.is-unread .conversation-title { color: var(--accent-dark); }
.conversation-row.is-unread .conversation-preview { color: var(--text); font-weight: 800; }
.conversation-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; align-self: stretch; justify-content: center; }
.conversation-time { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.conversation-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; box-shadow: 0 8px 18px rgba(15,118,110,.25); }

/* Chatverlauf */
.chat-page { height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 520px; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.chat-head { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.chat-head .chat-back-btn { display: none !important; }
.chat-avatar { width: 54px; height: 54px; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, rgba(15,118,110,0.11), rgba(30,30,30,0.045)); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; text-decoration: none; flex: 0 0 auto; }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-head-text { min-width: 0; }
.chat-head h1 { font-size: 29px; line-height: 1.05; letter-spacing: -1.4px; margin: 0 0 3px; }
.chat-head p { color: var(--muted); font-size: 14px; line-height: 1.35; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head p a { color: var(--accent); font-weight: 900; text-decoration: none; }
.message-list { flex: 1 1 auto; min-height: 0 !important; max-height: none !important; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; display: flex; flex-direction: column; gap: 10px; padding: 20px; margin-bottom: 4px !important; background: rgba(255,255,255,0.72); }
.message-bubble { max-width: min(74%, 560px); padding: 12px 14px 9px; border-radius: 22px 22px 22px 8px; background: #fff; color: var(--text); align-self: flex-start; box-shadow: 0 10px 24px rgba(30,30,30,0.06); border: 1px solid rgba(30,30,30,0.05); }
.message-bubble.me { background: var(--accent); color: #fff; align-self: flex-end; border-color: rgba(15,118,110,0.08); border-radius: 22px 22px 8px 22px; box-shadow: 0 12px 28px rgba(15,118,110,0.20); }
.message-bubble p { line-height: 1.45; margin: 0; }
.message-bubble small { display: block; margin-top: 6px; opacity: .68; font-size: 11px; line-height: 1; text-align: right; }
.chat-empty { padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.chat-empty strong { color: var(--text); font-size: 20px; }
.chat-empty .btn { margin-top: 6px; width: auto; }
.chat-compose { flex: 0 0 auto; position: relative !important; bottom: auto !important; z-index: 40; padding: 12px; border-radius: 28px; margin-top: 8px !important; }
.chat-compose-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: end; }
.chat-compose textarea { width: 100%; min-height: 46px; max-height: 130px; border: 1px solid rgba(30,30,30,0.10); border-radius: 20px; padding: 13px 15px; font-size: 16px; line-height: 1.35; font-family: inherit; resize: vertical; background: var(--bg); color: var(--text); }
.chat-compose textarea:focus { outline: none; border-color: rgba(15,118,110,0.45); box-shadow: 0 0 0 4px rgba(15,118,110,0.11); background: #fff; }
.chat-send-btn { width: 46px; height: 46px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 12px 26px rgba(15,118,110,0.24); }
.chat-send-btn svg { width: 21px; height: 21px; stroke-width: 2.4; }
.chat-send-btn span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* =========================================================
   09 PWA / Lightbox / Sonstiges
   ========================================================= */
.push-panel { margin-top: 18px; padding: 18px; border-radius: 24px; background: var(--bg); }
.push-panel .btn { margin-bottom: 10px; }
.push-options { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
.toggle-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px !important; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; cursor: pointer; }
.toggle-row input { width: 22px !important; height: 22px; accent-color: var(--accent); }
.toggle-row span { font-weight: 900; }

.pwa-install-card { position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 9000; max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid rgba(15,118,110,0.20); border-radius: 22px; box-shadow: 0 24px 60px rgba(23,32,51,0.18); padding: 18px 54px 18px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.pwa-install-card[hidden] { display: none; }
.pwa-install-card strong { font-size: 18px; display: block; margin-bottom: 4px; color: var(--text); }
.pwa-install-card p { color: var(--muted); margin: 0; line-height: 1.4; }
.pwa-install-close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border: none; border-radius: 999px; background: var(--bg); color: var(--text); font-size: 24px; cursor: pointer; }

body.lightbox-open { overflow: hidden; }
.image-lightbox[hidden] { display: none; }
.image-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,42,0.82); display: flex; align-items: center; justify-content: center; padding: 22px; }
.image-lightbox img { max-width: min(92vw, 760px); max-height: 86vh; border-radius: 34px; object-fit: contain; box-shadow: 0 28px 80px rgba(0,0,0,0.35); background: #fff; }
.image-lightbox-close { position: fixed; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 999px; border: none; background: #fff; color: var(--text); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 16px 36px rgba(0,0,0,0.18); }

.place-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.place-suggestions small { width: 100%; color: var(--muted); font-weight: 700; }
.place-suggestion-btn { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: 9px 13px; font-weight: 800; cursor: pointer; }
.place-suggestion-btn:hover { border-color: var(--accent); color: var(--accent); }

.remember-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 800; color: var(--text); }
.remember-row input { width: 20px !important; height: 20px; accent-color: var(--accent); }
.empty-state h2 { margin-bottom: 8px; }
.inline-form { display: contents; }

/* =========================================================
   10 Responsive
   ========================================================= */
@media (max-width: 980px) {
    .people-grid,
    .buddy-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-actions-grid,
    .dashboard-actions-v036 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 850px) {
    .site-header { padding: 14px 18px 10px; gap: 12px; }
    .brand-logo img { width: min(260px, 58vw); max-height: 54px; }
    .top-nav { gap: 12px; font-size: 14px; }
    .top-nav a:not(.btn) { display: none; }
    main { padding: 18px 18px 50px; }

    .site-header-dashboard { padding: 14px 16px; grid-template-columns: 46px 1fr 46px; }
    .site-header-dashboard .brand-logo img { width: min(240px, 56vw); max-height: 52px; }
    .site-header-subpage { width: calc(100% - 24px); padding: 12px 16px; grid-template-columns: 46px 1fr 46px; }
    .site-header-subpage .subpage-logo img,
    .site-header-subpage .brand-logo img { width: min(210px, 52vw); max-height: 46px; }
    .sub-back-link,
    .site-header-subpage .top-chat-link { width: 42px; height: 42px; }

    .landing-hero,
    .landing-hero.landing-hero-photo { grid-template-columns: 1fr; gap: 24px; min-height: auto; padding-top: 20px; }
    .hero-photo-card { min-height: 430px; border-radius: 28px; order: -1; }
    .hero-photo-card img { min-height: 430px; object-position: 62% center; }
    .hero-content h1,
    .landing-hero-photo .hero-content h1 { font-size: 48px; letter-spacing: -3px; }
    .hero-subline { font-size: 22px; }
    .hero-text { font-size: 19px; }
    .feature-grid,
    .form-grid.two,
    .choice-grid { grid-template-columns: 1fr; }

    body.is-landing .site-header { padding: 16px 18px; }
    .site-header-landing .brand-logo img { width: min(260px, 62vw); max-height: 70px; }
    .landing-hero-full { min-height: 720px; background-position: 58% center; }
    .landing-hero-inner { padding: 128px 18px 54px; }
    .landing-hero-full .hero-content { max-width: 480px; }
    .landing-hero-full h1 { font-size: 52px; letter-spacing: -3px; }

    .dashboard-hero,
    .dashboard-hero-loft,
    .dashboard-hero.dashboard-hero-loft {
        min-height: 170px !important;
        padding: 22px !important;
        border-radius: 22px !important;
        background-size: 170% auto !important;
        background-position: 74% center !important;
    }
    .dashboard-hello-text h1,
    .dashboard-hero h1,
    .dashboard-hero-loft h1 { font-size: 30px !important; }
    .dashboard-hello-text p,
    .dashboard-hero .hero-text,
    .dashboard-hero-loft .hero-text { font-size: 15px !important; }
    .dashboard-hero .avatar,
    .dashboard-hero-loft .avatar,
    .dashboard-hero .avatar-click,
    .dashboard-hero-loft .avatar-click { width: 72px !important; height: 72px !important; border-radius: 22px !important; border-width: 3px !important; }

    .dashboard-actions-v036 .dash-action-primary,
    .dashboard-actions-grid .dash-action-primary { grid-column: 1 / -1 !important; min-height: 126px; padding: 22px !important; }
    .dashboard-actions-v036 .dash-action-primary strong,
    .dashboard-actions-grid .dash-action-primary strong { font-size: 27px !important; }
    .dashboard-actions-v036 .dash-action-primary small,
    .dashboard-actions-grid .dash-action-primary small { font-size: 15px !important; }
    .dashboard-actions-v036 .dash-action-card:not(.dash-action-primary),
    .dashboard-actions-grid .dash-action-card:not(.dash-action-primary) { min-height: 164px !important; padding: 20px !important; }

    .dance-card-grid { grid-template-columns: 1fr; }
    .dance-select-row { grid-template-columns: 1fr; }
    .dance-check-grid { grid-template-columns: 1fr 1fr; }
    .public-profile-hero { grid-template-columns: 1fr; }
    .profile-action-row { flex-direction: column; }
    .dance-profile-row { flex-direction: column; align-items: flex-start; }
    .dance-profile-row span { text-align: left; }
    .blocked-results-inline .blocked-results-list { grid-template-columns: 1fr !important; }
    .profile-save-actions,
    .profile-save-actions .btn { width: 100%; }
}

@media (max-width: 700px) {
    .people-grid,
    .buddy-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .person-tile,
    .buddy-search-card { border-radius: 20px; }
    .person-tile-photo,
    .buddy-card-photo { font-size: 42px; }
    .person-tile-body,
    .buddy-card-content { padding: 11px 11px 7px; }
    .person-tile-body strong,
    .buddy-card-content strong { font-size: 16px; }
    .person-tile-body small,
    .person-tile-body em,
    .buddy-card-content small,
    .buddy-card-content em { font-size: 12px; }
    .person-tile-actions.compact { gap: 6px; padding: 8px 9px 10px; }

    main { padding-bottom: 12px; }
    .chat-page { height: calc(100vh - 105px); height: calc(100dvh - 105px); min-height: 0; gap: 10px; }
    .chat-head { padding: 12px 14px; border-radius: 22px; }
    .chat-avatar { width: 50px; height: 50px; border-radius: 18px; font-size: 22px; }
    .chat-head h1 { font-size: 25px; letter-spacing: -1px; }
    .chat-head p { font-size: 13px; }
    .message-list { padding: 12px; border-radius: 22px; }
    .message-bubble { max-width: 86%; padding: 11px 13px 8px; border-radius: 18px 18px 18px 7px; }
    .message-bubble.me { border-radius: 18px 18px 7px 18px; }
    .chat-compose { padding: 10px; border-radius: 22px; }
    .chat-compose-row { grid-template-columns: minmax(0,1fr) 44px; gap: 8px; }
    .chat-compose textarea { min-height: 44px; padding: 12px 14px; font-size: 16px; border-radius: 18px; }
    .chat-send-btn { width: 44px; height: 44px; }
    .conversation-list { border-radius: 24px; }
    .conversation-row { grid-template-columns: 52px minmax(0,1fr) auto; gap: 12px; padding: 14px; }
    .conversation-avatar { width: 52px; height: 52px; border-radius: 19px; }
    .conversation-title { font-size: 17px; }
    .conversation-preview { font-size: 14px; max-width: 100%; }
}

@media (max-width: 620px) {
    .pwa-install-card { flex-direction: column; align-items: flex-start; padding: 18px 52px 18px 18px; }
    .pwa-install-card .btn { width: auto; }
}

@media (max-width: 520px) {
    .photo-upload-row { flex-direction: column; align-items: flex-start; }
    .profile-photo-preview { width: 100%; height: 180px; border-radius: 28px; }
    .image-lightbox { padding: 14px; }
    .image-lightbox img { max-width: 94vw; max-height: 82vh; border-radius: 26px; }
}

@media (max-width: 430px) {
    .brand { font-size: 20px; }
    .hero-actions,
    .sticky-actions { flex-direction: column; }
    .btn { width: 100%; }
    .auth-card,
    .form-card,
    .progress-card { padding: 24px; border-radius: 28px; }

    .site-header-landing .brand-logo img { width: min(220px, 58vw); }
    .landing-hero-full { min-height: 680px; background-position: 58% center; }
    .landing-hero-full h1 { font-size: 43px; letter-spacing: -2px; }
    .landing-hero-full .hero-actions { flex-direction: column; max-width: 320px; }
    .hero-photo-card,
    .hero-photo-card img { min-height: 360px; }
    .hero-content h1,
    .landing-hero-photo .hero-content h1 { font-size: 42px; }
    .hero-subline { font-size: 20px; }
    .hero-text { font-size: 18px; }

    .dashboard-actions-grid,
    .dashboard-actions-v036 { grid-template-columns: 1fr 1fr !important; }
    .dash-action-card { padding: 16px; min-height: 146px; }
    .dash-action-primary { grid-column: 1 / -1 !important; min-height: 112px; }
    .dash-action-primary .app-icon-circle { width: 52px; height: 52px; }
    .dash-action-primary strong { font-size: 24px !important; }
    .dash-action-primary small { font-size: 14px !important; }

    .dance-check-grid { grid-template-columns: 1fr; }
    .filter-actions,
    .person-actions { flex-direction: column; }
    .site-footer { flex-direction: column; align-items: center; }
}

/* =========================================================
   0.4.3 Mein Profil: Fotogalerie
   ========================================================= */
.profile-edit-page {
    max-width: 980px;
}

.profile-edit-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.profile-edit-hero h1 {
    font-size: clamp(38px, 5vw, 62px);
    letter-spacing: -2px;
    line-height: .98;
    margin: 4px 0 10px;
}

.profile-edit-hero .hero-text {
    margin-bottom: 0;
}

.profile-completion {
    width: 190px;
    flex: 0 0 190px;
    background: var(--bg);
    border-radius: 24px;
    padding: 18px;
}

.profile-completion strong {
    display: block;
    font-size: 34px;
    letter-spacing: -1px;
    color: var(--accent-dark);
    line-height: 1;
}

.profile-completion span {
    display: block;
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
    margin: 5px 0 12px;
}

.profile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-card-head h2 {
    margin-bottom: 6px;
}

.photo-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 34px;
    border-radius: 999px;
    background: rgba(15,118,110,0.10);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 900;
    flex: 0 0 auto;
}

.profile-photo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.profile-gallery-item,
.profile-gallery-upload {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid rgba(30,30,30,0.07);
}

.profile-gallery-item.is-profile {
    border-color: rgba(15,118,110,0.42);
    box-shadow: 0 0 0 4px rgba(15,118,110,0.10), 0 16px 36px rgba(30,30,30,0.10);
}

.profile-gallery-photo {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.profile-gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(15,118,110,0.94);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(15,118,110,0.28);
}

.profile-gallery-actions {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.profile-gallery-actions form {
    margin: 0;
}

.gallery-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,0.94);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.gallery-icon-btn.danger {
    color: var(--danger);
}

.gallery-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.25;
}

.profile-gallery-upload label {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    color: var(--accent-dark);
    background: rgba(15,118,110,0.06);
}

.profile-gallery-upload input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.upload-plus {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    font-weight: 400;
    box-shadow: 0 12px 26px rgba(15,118,110,0.22);
}

.profile-gallery-upload strong {
    font-size: 15px;
    line-height: 1.15;
}

.profile-gallery-upload small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.3;
}

.profile-char-count {
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

@media (max-width: 850px) {
    .profile-edit-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-completion {
        width: 100%;
        flex: 0 0 auto;
    }

    .profile-photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .profile-card-head {
        flex-direction: column;
    }

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

    .profile-gallery-item,
    .profile-gallery-upload {
        border-radius: 20px;
    }
}
