.dsh-profile-page .dsh-login-main {
    width: min(var(--dsh-home-width), calc(100% - 2 * var(--dsh-gutter)));
    justify-content: flex-start;
    padding-block: clamp(19px, 3.1vw, 37px);
}
.dsh-profile-page:not(.dsh-profile-edit-page) > :is(.dsh-member-layout, .dsh-login-main) {
    padding-block: clamp(12px, 1.75vw, 22px);
}
.dsh-profile-page:not(.dsh-profile-edit-page) .dsh-login-main > .domenu {
    margin-bottom: 8px;
}
.dsh-profile-page .dsh-login-vision { margin-left: auto; }
.dsh-profile-site-login,
.dsh-profile-site-menu summary {
    display: inline-flex;
    min-height: 42px;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--dsh-login-line);
    border-radius: 8px;
    background: #fff;
    color: var(--dsh-login-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.dsh-profile-site-menu summary { list-style: none; }
.dsh-profile-site-menu summary::-webkit-details-marker { display: none; }
.dsh-profile-site-menu[open] summary, .dsh-profile-site-menu summary:hover {
    border-color: var(--dsh-login-green);
    background: #edf5ee;
    color: var(--dsh-login-dark);
}
.dsh-profile-site-login {
    border-color: var(--dsh-login-green);
    background: var(--dsh-login-green);
    color: #fff;
}
.dsh-profile-site-login:hover { background: var(--dsh-login-dark); color: #fff; text-decoration: none; }
.dsh-profile-site-menu { position: relative; flex: none; }
.dsh-profile-menu-panel {
    position: absolute;
    z-index: 40;
    inset: calc(100% + 8px) 0 auto auto;
    width: min(340px, calc(100vw - 2 * var(--dsh-gutter)));
    max-height: min(72vh, 520px);
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--dsh-login-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px #16362c27;
}
.dsh-profile-menu-panel :is(.bvi-open, .loginbtn) { display: none; }
.dsh-profile-menu-panel .navbar { min-height: 0; margin: 10px 0 0; border: 0; background: none; }
.dsh-profile-menu-panel .navbar-header,
.dsh-profile-menu-panel .navbar-form { display: none !important; }
.dsh-profile-menu-panel .navbar-collapse.collapse { display: block; padding: 0; border: 0; box-shadow: none; }
.dsh-profile-menu-panel .navbar-nav { float: none; margin: 0; }
.dsh-profile-menu-panel .navbar-nav > li { float: none; }
.dsh-profile-menu-panel .navbar-nav > li > a {
    min-height: 42px;
    padding: 10px;
    border-radius: 7px;
    color: var(--dsh-login-ink);
}
.dsh-profile-menu-panel .navbar-nav > li > a:hover,
.dsh-profile-menu-panel .navbar-nav > li > a:focus { background: #edf5ee; color: var(--dsh-login-dark); }
.dsh-profile-menu-panel .navbar-nav .dropdown-menu { position: static; float: none; width: 100%; box-shadow: none; }
.dsh-profile-menu-panel .widget_search input { min-height: 44px; color: var(--dsh-login-ink); }

.dsh-profile-hero {
    padding: clamp(20px, 2.55vw, 32px) clamp(19px, 3.3vw, 39px);
    border-radius: 18px;
    background: radial-gradient(ellipse at 100% 100%, #165f4b, var(--dsh-login-dark) 67%);
    color: #fff;
}
.dsh-profile-hero #user_profile_title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(10px, 1.8vw, 22px);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.dsh-profile-hero #user_profile_title .name { min-width: 0; margin: 0; padding: 0; }
.dsh-profile-portrait { min-width: 0; max-width: 110px; }
.dsh-profile-hero .dsh-profile-avatar {
    display: grid;
    width: clamp(56px, 7vw, 80px);
    height: clamp(56px, 7vw, 80px);
    place-items: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid #f2fff3b3;
    border-radius: 16px;
    background: #e8f3e9;
    color: var(--dsh-login-green);
}
.dsh-profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dsh-profile-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
.dsh-profile-hero #user_profile_title h1 {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.7vw, 34px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.dsh-profile-edit-actions {
    display: flex;
    flex: none;
    gap: 6px;
}
.dsh-profile-hero #user_profile_title .dsh-profile-edit-actions > a {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #ffffff59;
    border-radius: 8px;
    background: #ffffff12;
    color: #f5fcf7;
    text-decoration: none;
}
.dsh-profile-hero #user_profile_title .dsh-profile-edit-actions > a:is(:hover, :focus-visible) {
    border-color: #b7dfc7;
    background: #ffffff28;
    text-decoration: none;
}
.dsh-profile-hero #user_profile_title .dsh-profile-edit-actions > a:focus-visible {
    outline: 2px solid #e5f5e9;
    outline-offset: 2px;
}
.dsh-profile-edit-actions svg { display: block; width: 18px; height: 18px; }
@media (pointer: coarse) {
    .dsh-profile-hero #user_profile_title .dsh-profile-edit-actions > a {
        width: 44px;
        height: 44px;
    }
}
.dsh-profile-hero #user_profile_title .dsh-profile-message {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 5px 10px;
    border: 1px solid #ffffff59;
    border-radius: 8px;
    background: #ffffff12;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}
.dsh-profile-hero #user_profile_title .dsh-profile-message:is(:hover, :focus-visible) { background: #ffffff28; color: #fff; }
.dsh-profile-message svg { width: 18px; height: 18px; }
.dsh-profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    margin-top: 6px;
    color: #e3f1e8;
    font-size: 14px;
    line-height: 1.35;
}
.dsh-profile-meta > :is(span, .dsh-profile-ranking) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #ffffff14;
}
.dsh-profile-meta .dsh-profile-online::before {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: #b7edc1;
    content: "";
}
.dsh-profile-meta .dsh-profile-state { background: #f7e1e0; color: #7e3239; }
.dsh-profile-hero #user_profile_title .dsh-profile-ranking {
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}
.dsh-profile-hero #user_profile_title .dsh-profile-ranking:is(:hover, :focus-visible) {
    background: #ffffff24;
    color: #fff;
    text-decoration: none;
}
.dsh-profile-hero #user_profile_title .dsh-profile-ranking:focus-visible { outline: 2px solid #e5f5e9; outline-offset: 2px; }
.dsh-profile-ranking svg { width: 17px; height: 17px; flex: none; }
.dsh-profile-hero #user_profile_title .status {
    position: static;
    max-width: 65ch;
    margin: 7px 0 0;
    padding: 0;
    color: #f0f7f2;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.dsh-profile-hero #user_profile_title .status a { color: #fff; text-decoration: underline; }
.dsh-profile-hero #user_status_widget {
    max-width: 520px;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.dsh-profile-hero #user_status_widget label { display: block; margin-bottom: 4px; color: #e3f1e8; font-weight: 600; }
.dsh-profile-status-row { display: flex; align-items: stretch; gap: 7px; }
.dsh-profile-hero #user_status_widget input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 7px 11px;
    border: 1px solid #b9d6c8;
    border-radius: 8px;
    background: #fff;
    color: var(--dsh-login-ink);
}
.dsh-profile-status-save {
    min-height: 44px;
    flex: none;
    padding: 6px 10px;
    border: 1px solid #e5f1e8;
    border-radius: 8px;
    background: #e5f1e8;
    color: var(--dsh-login-dark);
    font-weight: 700;
    cursor: pointer;
}
.dsh-profile-status-save:hover { background: #d2ebda; }
#user_status_widget.loading .dsh-profile-status-save { opacity: .65; cursor: wait; }
.dsh-profile-hero :focus-visible { outline-color: #fff; }

.dsh-profile-page #user_profile_header { margin: 0 0 16px; }
.dsh-profile-page #user_profile_tabs, .dsh-profile-tools { margin: 8px 0 0; }
.dsh-profile-page #user_profile_tabs.dsh-profile-tabs { margin-top: 12px; }
#user_profile_tabs .tabbed, .dsh-profile-tools-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}
#user_profile_tabs .tabbed li, .dsh-profile-tools-list li { float: none; margin: 0; padding: 0; }
#user_profile_tabs .tabbed a, .dsh-profile-tools-list a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 7px 13px;
    border: 1px solid var(--dsh-login-line);
    border-radius: 8px;
    background: #fff;
    color: var(--dsh-login-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
}
#user_profile_tabs .tabbed a:hover, .dsh-profile-tools-list a:hover {
    border-color: var(--dsh-login-green);
    background: #edf5ee;
    color: var(--dsh-login-dark);
}
#user_profile_tabs .tabbed .active a, .dsh-profile-tools-list a.settings {
    border-color: var(--dsh-login-green);
    background: var(--dsh-login-green);
    color: #fff;
}

#user_profile.dsh-profile-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
}
.dsh-profile-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); gap: 16px 10px; }
.dsh-profile-card,
.dsh-profile-page :is(#user_profile_tab_content, #users_karma_log_window, #user_content_list) {
    min-width: 0;
    padding: clamp(18px, 2vw, 26px) clamp(16px, 2.3vw, 25px);
    border: 1px solid var(--dsh-login-line);
    border-radius: 14px;
    background: #fff;
    overflow-wrap: anywhere;
}
.dsh-profile-card h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: var(--dsh-login-ink);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}
.dsh-profile-card-icon {
    display: grid;
    width: 37px;
    height: 37px;
    flex: none;
    place-items: center;
    border-radius: 8px;
    background: #e8f2e9;
    color: var(--dsh-login-green);
}
.dsh-profile-card p { margin: 0 0 12px; color: var(--dsh-login-muted); }
.dsh-profile-card a { color: var(--dsh-login-green); }
.dsh-profile-values { display: grid; gap: 10px; margin: 0; }
.dsh-profile-values dt, .dsh-profile-field .title { margin: 0 0 2px; color: var(--dsh-login-muted); font-size: 14px; font-weight: 600; }
.dsh-profile-values dd { margin: 0; font-size: 17px; }
.dsh-profile-field + .dsh-profile-field { margin-top: 10px; }
.dsh-profile-card img { max-width: 100%; }

.dsh-profile-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dsh-profile-code-row code {
    max-width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--dsh-login-line);
    border-radius: 7px;
    background: #f3f7f3;
    color: var(--dsh-login-dark);
    font-size: 16px;
    overflow-wrap: anywhere;
    user-select: all;
}
.dsh-profile-copy {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--dsh-login-green);
    border-radius: 8px;
    background: var(--dsh-login-green);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.dsh-profile-copy:hover { background: var(--dsh-login-dark); }
.dsh-profile-copy[hidden] { display: none; }
.dsh-profile-code .dsh-profile-copy-status { margin: 6px 0 0; font-size: 14px; }
.dsh-profile-code .dsh-profile-copy-status:empty { margin: 0; }
.dsh-profile-code > a { display: inline-block; margin-top: 10px; }

.dsh-profile-materials, .dsh-profile-account-links,
.dsh-profile-friends .friends-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dsh-profile-materials li, .dsh-profile-account-links li, .dsh-profile-friends .friends-list li { min-width: 0; margin: 0; padding: 0; }
.dsh-profile-materials a, .dsh-profile-account-links a {
    display: grid;
    min-height: 50px;
    height: 100%;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid var(--dsh-login-line);
    border-radius: 9px;
    background: #fbfdfa;
    color: var(--dsh-login-ink);
    text-decoration: none;
}
.dsh-profile-materials a:hover { border-color: var(--dsh-login-green); background: #edf5ee; color: var(--dsh-login-dark); }
.dsh-profile-account-links { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.dsh-profile-account-links a {
    min-height: 56px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    font-weight: 600;
    line-height: 1.3;
}
.dsh-profile-account-links a:is(:hover, :focus-visible) {
    border-color: var(--dsh-login-green);
    background: #edf5ee;
    color: var(--dsh-login-dark);
}
.dsh-profile-account-icon {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 7px;
    background: #e8f2e9;
    color: var(--dsh-login-green);
}
.dsh-profile-account-icon svg { width: 18px; height: 18px; }
.dsh-profile-account-arrow { width: 17px; height: 17px; color: var(--dsh-login-green); }
.dsh-profile-material-name { font-weight: 600; }
.dsh-profile-material-count {
    min-width: 27px;
    padding: 2px 6px;
    border-radius: 5px;
    background: #e8f2e9;
    color: var(--dsh-login-dark);
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.dsh-profile-materials svg { color: var(--dsh-login-green); }
.dsh-profile-friends .friends-list a { display: flex; min-height: 44px; align-items: center; gap: 8px; }
.dsh-profile-friends .friends-list img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.dsh-profile-friends > a { display: inline-block; margin-top: 10px; }

@media (max-width: 840px) {
    .dsh-profile-materials, .dsh-profile-friends .friends-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
    .dsh-profile-page .dsh-login-frame { gap: 7px; }
    .dsh-profile-page .dsh-login-vision { width: 42px; justify-content: center; padding-inline: 0; }
    .dsh-profile-page .dsh-login-vision span, .dsh-profile-site-login svg { display: none; }
    .dsh-profile-site-login { padding-inline: 9px; }
}
@media (max-width: 520px) {
    .dsh-profile-materials, .dsh-profile-account-links,
    .dsh-profile-friends .friends-list { grid-template-columns: minmax(0, 1fr); }
    .dsh-profile-materials a { min-height: 48px; }
    .dsh-profile-card h2 { font-size: 21px; }
}
@media (max-width: 380px) {
    .dsh-profile-hero #user_profile_title { grid-template-columns: minmax(0, 1fr); }
    .dsh-profile-site-menu summary { width: 42px; padding-inline: 0; }
    .dsh-profile-site-menu summary span { display: none; }
}
@media (max-width: 340px) {
    .dsh-profile-site-login { width: 42px; padding-inline: 0; }
    .dsh-profile-site-login svg { display: block; }
    .dsh-profile-site-login span { display: none; }
}
