/* DropX Profile Quick Center — unified desktop + PWA layout.
   The same semantic markup is used at every viewport; only spacing scales. */

.mobile-profile-overlay { z-index: 2147483190; }
.mobile-profile-drawer { z-index: 2147483200; box-sizing: border-box; }
.mobile-profile-drawer .mobile-profile-scroll {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 14px 14px calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(220,174,57,.42) transparent;
}
.mobile-profile-drawer .mobile-profile-scroll > * {
    position: static;
    float: none;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    transform: none;
}

/* Identity: no nested anchors; profile link and social counters are siblings. */
.mobile-profile-identity-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.mobile-profile-identity {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid var(--dx-border, rgba(210,170,62,.3));
    border-radius: 12px;
    background: var(--dx-surface, rgba(255,255,255,.035));
    color: inherit;
    box-sizing: border-box;
}
.mobile-profile-identity-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.mobile-profile-identity-main > img {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 2px solid #c99b2f;
    border-radius: 50%;
    object-fit: cover;
}
.mobile-profile-identity-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}
.mobile-profile-identity-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--theme-text-strong, #f3f3f3);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.mobile-profile-identity-name svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    color: var(--dx-muted, #a8a8ae);
}
.mobile-profile-identity-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    color: var(--dx-muted, #a8a8ae);
    font-size: 10px;
    line-height: 1.2;
}
.mobile-profile-identity-meta svg {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    color: #d9ad3b;
}
.mobile-profile-identity-meta strong {
    color: var(--dx-text, #f1f1f2);
    font-size: 10px;
    font-weight: 800;
}
.mobile-profile-meta-separator { opacity: .55; margin: 0 1px; }

.mobile-profile-social-stats.mobile-profile-social-stats-inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 12px;
    width: auto;
    min-width: 0;
    margin: 0 0 0 58px;
    padding: 0;
    border: 0;
    background: transparent;
}
.mobile-profile-social-stats-inline a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--dx-muted, #a8a8ae);
    line-height: 1;
    text-decoration: none;
}
.mobile-profile-social-stats-inline svg {
    display: block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    color: #d9ad3b;
    stroke-width: 2;
}
.mobile-profile-social-stats-inline strong {
    display: block;
    color: var(--dx-muted, #a8a8ae);
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mobile-profile-settings-button {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    border: 1px solid var(--dx-border, rgba(210,170,62,.35));
    border-radius: 12px;
    background: var(--dx-card, rgba(255,255,255,.045));
    color: #d9ad3b;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.mobile-profile-settings-button svg { width: 19px; height: 19px; stroke-width: 1.9; }
.mobile-profile-settings-button:hover,
.mobile-profile-settings-button:focus-visible {
    background: rgba(217,173,59,.12);
    border-color: #d9ad3b;
    outline: none;
}
.mobile-profile-settings-button:active { transform: scale(.96); }

/* Shared category and quick-link grid. Two columns on desktop and PWA alike. */
.mobile-profile-links,
.mobile-profile-more-links {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.mobile-profile-section {
    display: flex;
    position: static;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.mobile-profile-drawer .mobile-webstudio-column-title {
    display: flex;
    position: static;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 25px;
    margin: 0;
    padding: 0 1px 6px;
    border: 0;
    border-bottom: 1px solid var(--theme-line, rgba(149,102,28,.2));
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--theme-gold, #d9ad3b);
    font: 700 10px/1.2 var(--theme-font-mono, monospace);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mobile-profile-drawer .mobile-webstudio-column-title svg {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
.mobile-profile-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    align-items: stretch;
    align-content: start;
    gap: 7px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.mobile-profile-quick-grid > .mobile-webstudio-link {
    display: grid;
    position: static;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: center;
    align-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    height: auto;
    margin: 0;
    padding: 7px 8px;
    border: 1px solid var(--dx-border, rgba(210,170,62,.18));
    border-radius: 9px;
    background: var(--dx-surface, rgba(255,255,255,.035));
    color: var(--theme-text, #e8e8e8);
    text-decoration: none;
    box-sizing: border-box;
    transform: none;
    transition: background .18s ease, border-color .18s ease;
}
.mobile-profile-quick-grid > .mobile-webstudio-link:hover,
.mobile-profile-quick-grid > .mobile-webstudio-link:focus-visible {
    border-color: var(--theme-gold, #d9ad3b);
    background: color-mix(in srgb, var(--theme-gold, #d9ad3b) 9%, transparent);
    outline: none;
}
.mobile-profile-quick-grid .mobile-webstudio-link-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    margin: 0;
    border-radius: 7px;
    background: color-mix(in srgb, var(--theme-gold, #d9ad3b) 11%, transparent);
    color: var(--theme-gold, #d9ad3b);
}
.mobile-profile-quick-grid .mobile-webstudio-link-icon svg {
    display: block;
    width: 15px;
    height: 15px;
}
.mobile-profile-quick-grid .mobile-webstudio-link-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    margin: 0;
}
.mobile-profile-quick-grid .mobile-webstudio-link-copy strong {
    display: block;
    min-width: 0;
    color: var(--theme-text-strong, #f3f3f3);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.mobile-profile-quick-grid .mobile-webstudio-link-copy small {
    display: block;
    min-width: 0;
    color: var(--theme-text-muted, #a5a5a5);
    font-size: 9px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

/* User's own MiniWeb pages: shared loading, empty, error and result states. */
.mobile-profile-sites-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
    margin: 2px 0 0;
    padding: 0;
}
.mobile-profile-sites-subtitle {
    color: var(--theme-text-muted, #a5a5a5);
    font-size: 9px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .07em;
}
.mobile-profile-sites-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 6px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.mobile-profile-sites-list:empty { display: none; }
.mobile-profile-sites-list .mobile-profile-site-item,
.mobile-profile-sites-list .dropdown-item {
    display: flex;
    position: static;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 6px 7px;
    border: 1px solid var(--dx-border, rgba(210,170,62,.22));
    border-radius: 8px;
    background: var(--dx-surface, rgba(255,255,255,.035));
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}
.mobile-profile-site-item .dropdown-item-favicon {
    display: block;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    border-radius: 5px;
    object-fit: cover;
}
.mobile-profile-site-item .dropdown-item-info { display: block; min-width: 0; }
.mobile-profile-site-item .dropdown-item-title {
    display: block;
    min-width: 0;
    color: var(--theme-text-strong, #f3f3f3);
    font-size: 9px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.mobile-profile-sites-loading,
.mobile-profile-sites-message {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-height: 28px;
    margin: 0;
    padding: 5px 7px;
    border: 1px dashed var(--dx-border, rgba(210,170,62,.22));
    border-radius: 8px;
    background: rgba(255,255,255,.025);
    color: var(--theme-text-muted, #a5a5a5);
    font-size: 9px;
    line-height: 1.25;
}
.mobile-profile-sites-loading-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--theme-gold, #d9ad3b);
    box-shadow: 0 0 8px rgba(217,173,59,.45);
}
.mobile-profile-sites-retry {
    padding: 5px 8px;
    border: 1px solid var(--dx-border, rgba(210,170,62,.35));
    border-radius: 7px;
    background: rgba(217,173,59,.1);
    color: var(--theme-gold, #d9ad3b);
    font: inherit;
    font-size: 9px;
}

/* Activity and events metrics use the same compact three-column cards. */
.mobile-profile-activity,
.mobile-profile-liveline {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.mobile-profile-activity-grid,
.mobile-profile-liveline-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.mobile-profile-activity-grid .mobile-profile-live-stat,
.mobile-profile-liveline-stats .mobile-profile-live-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 64px;
    margin: 0;
    padding: 6px 3px;
    border: 1px solid var(--dx-border, rgba(255,255,255,.09));
    border-radius: 9px;
    background: var(--dx-card, rgba(255,255,255,.035));
    text-align: center;
    box-sizing: border-box;
}
.mobile-profile-activity-grid .mobile-profile-live-stat > svg,
.mobile-profile-liveline-stats .mobile-profile-live-stat > svg {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--theme-gold, #d9ad3b);
}
.mobile-profile-activity-grid .mobile-profile-live-stat > span,
.mobile-profile-liveline-stats .mobile-profile-live-stat > span {
    display: block;
    max-width: 100%;
    color: var(--theme-text-muted, #a5a5a5);
    font-size: 8px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.mobile-profile-activity-grid .mobile-profile-live-stat > strong,
.mobile-profile-liveline-stats .mobile-profile-live-stat > strong {
    display: block;
    color: var(--theme-text-strong, #f3f3f3);
    font-size: 12px;
    line-height: 1.05;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.mobile-profile-liveline .mobile-webstudio-link {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 7px 8px;
    border: 1px solid var(--dx-border, rgba(210,170,62,.18));
    border-radius: 9px;
    background: var(--dx-surface, rgba(255,255,255,.035));
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}
.mobile-profile-liveline .mobile-webstudio-link-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 7px;
    color: var(--theme-gold, #d9ad3b);
    background: color-mix(in srgb, var(--theme-gold, #d9ad3b) 11%, transparent);
}
.mobile-profile-liveline .mobile-webstudio-link-icon svg { width: 15px; height: 15px; }
.mobile-profile-liveline .mobile-webstudio-link-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mobile-profile-liveline .mobile-webstudio-link-copy strong { font-size: 10px; line-height: 1.2; }
.mobile-profile-liveline .mobile-webstudio-link-copy small { color: var(--theme-text-muted, #a5a5a5); font-size: 9px; line-height: 1.2; }

/* Account action. */
.mobile-profile-account-actions {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin: 1px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--theme-line, rgba(149,102,28,.2));
}
.mobile-profile-account-actions .mobile-profile-logout {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 43px;
    margin: 0;
    padding: 7px 8px;
    border: 1px solid rgba(210,85,75,.22);
    border-radius: 9px;
    background: rgba(210,85,75,.045);
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}
.mobile-profile-logout .mobile-webstudio-link-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 7px;
    color: #e27b70;
    background: rgba(210,85,75,.10);
}
.mobile-profile-logout .mobile-webstudio-link-icon svg { width: 15px; height: 15px; }
.mobile-profile-logout .mobile-webstudio-link-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mobile-profile-logout .mobile-webstudio-link-copy strong { font-size: 10px; line-height: 1.2; }
.mobile-profile-logout .mobile-webstudio-link-copy small { color: var(--theme-text-muted, #a5a5a5); font-size: 9px; }

/* Desktop and PWA share layout rules; only density and safe-area padding vary. */
@media (max-width: 700px), (display-mode: standalone) {
    .mobile-profile-drawer .mobile-profile-scroll {
        gap: 10px;
        padding: 10px 9px calc(16px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-profile-identity { padding: 8px; gap: 5px; }
    .mobile-profile-identity-main { gap: 8px; }
    .mobile-profile-identity-main > img { width: 42px; height: 42px; flex-basis: 42px; }
    .mobile-profile-social-stats.mobile-profile-social-stats-inline { margin-left: 50px; gap: 9px; }
    .mobile-profile-settings-button { flex-basis: 40px; width: 40px; min-height: 40px; }
    .mobile-profile-quick-grid { gap: 6px; }
    .mobile-profile-quick-grid > .mobile-webstudio-link { grid-template-columns: 22px minmax(0,1fr); min-height: 48px; gap: 5px; padding: 6px; }
    .mobile-profile-quick-grid .mobile-webstudio-link-icon { width: 22px; height: 22px; }
    .mobile-profile-quick-grid .mobile-webstudio-link-icon svg { width: 14px; height: 14px; }
    .mobile-profile-quick-grid .mobile-webstudio-link-copy strong { font-size: 9px; }
    .mobile-profile-quick-grid .mobile-webstudio-link-copy small { font-size: 8px; }
    .mobile-profile-sites-list { gap: 5px; }
    .mobile-profile-activity-grid .mobile-profile-live-stat,
    .mobile-profile-liveline-stats .mobile-profile-live-stat { min-height: 57px; gap: 3px; }
}
@media (max-width: 360px) {
    .mobile-profile-drawer .mobile-profile-scroll { padding-inline: 7px; }
    .mobile-profile-identity-name { font-size: 12px; }
    .mobile-profile-identity-meta { font-size: 9px; gap: 3px; }
    .mobile-profile-social-stats.mobile-profile-social-stats-inline { margin-left: 48px; gap: 7px; }
    .mobile-profile-quick-grid > .mobile-webstudio-link { grid-template-columns: 20px minmax(0,1fr); gap: 4px; padding: 5px; }
    .mobile-profile-quick-grid .mobile-webstudio-link-copy strong { font-size: 8.5px; }
    .mobile-profile-quick-grid .mobile-webstudio-link-copy small { display: none; }
}
body.light-mode .mobile-profile-identity {
    background: rgba(255,255,255,.8);
    border-color: rgba(166,126,34,.32);
}
body.light-mode .mobile-profile-settings-button {
    background: rgba(255,255,255,.8);
    border-color: rgba(92,75,35,.2);
}
body.light-mode .mobile-profile-quick-grid > .mobile-webstudio-link,
body.light-mode .mobile-profile-sites-list .dropdown-item,
body.light-mode .mobile-profile-liveline .mobile-webstudio-link {
    color: #3a3025;
    background: rgba(255,255,255,.55);
    border-color: rgba(92,75,35,.16);
}
body.light-mode .mobile-profile-quick-grid .mobile-webstudio-link-copy strong,
body.light-mode .mobile-profile-site-item .dropdown-item-title { color: #33271d; }
body.light-mode .mobile-profile-quick-grid .mobile-webstudio-link-copy small { color: #756655; }
body.light-mode .mobile-profile-activity-grid .mobile-profile-live-stat,
body.light-mode .mobile-profile-liveline-stats .mobile-profile-live-stat {
    background: rgba(255,255,255,.72);
    border-color: rgba(92,75,35,.16);
}
.mobile-profile-trigger { appearance:none; -webkit-appearance:none; border:0; margin:0; font:inherit; background:transparent; cursor:pointer; }
.mobile-profile-trigger.is-drawer-open { color: var(--theme-gold, #d9ad3b); }
.profile-menu-launcher .mobile-profile-trigger { cursor:pointer; }
.profile-menu-launcher .mobile-profile-trigger.header-icon-btn {
    display:inline-flex; align-items:center; justify-content:center;
    width:36px; min-width:36px; height:36px; margin:0; padding:0;
    border:1px solid var(--color-border-gold, rgba(214,165,43,.55));
    border-radius:50%; background:rgba(229,158,0,.06);
    color:var(--color-silver, #c4c8ce); cursor:pointer;
}
.mobile-profile-edge-close {
    position:absolute; left:-31px; top:50%; z-index:3;
    display:grid; place-items:center; width:31px; height:76px;
    padding:0; transform:translateY(-50%);
    border:1px solid var(--theme-line, rgba(214,165,43,.42));
    border-right:0; border-radius:13px 0 0 13px;
    background:var(--theme-surface, #101318); color:var(--theme-gold, #d9ad3b);
    box-shadow:-5px 0 15px rgba(0,0,0,.16); cursor:pointer; touch-action:manipulation;
}
.mobile-profile-edge-close svg { width:20px; height:20px; }
.mobile-profile-edge-close:focus-visible { outline:2px solid var(--theme-gold, #d9ad3b); outline-offset:2px; }
@media (prefers-reduced-motion: reduce) {
    .mobile-profile-drawer, .mobile-profile-overlay, .mobile-profile-quick-grid > .mobile-webstudio-link { transition:none; }
}
