.forumcontainer #profile-layout-row .profile-custom-background,.forumcontainer #profile-layout-row .profile-custom-background > .card-body {background:var(--profile-box-background)!important;background-image:none!important;}
html body .forumcontainer #profile-layout-row > [data-profile-column] > :is(#profile_achievements,#profile_habitats,[data-profile-section]).profile-custom-border-width {
    border-width:var(--profile-box-border-width)!important;
    border-style:solid;
}
.profile-custom-dialog .profile-copy-style {flex-wrap:wrap;}
.profile-custom-dialog .profile-copy-style > select {min-width:0;}
.profile-custom-dialog .profile-copy-style[hidden] {display:none!important;}
.forumcontainer #profile-layout-row .profile-custom-border {border-color:var(--profile-box-border)!important;}
.forumcontainer #profile-layout-row .profile-custom-text,.forumcontainer #profile-layout-row .profile-custom-text :is(p,span,a,td,li,label,.card-text,.profile-showcase-item) {color:var(--profile-box-text)!important;}
.forumcontainer #profile-layout-row #profile_userdetails.profile-custom-detail_label > .card-body > p > strong {
 color:var(--profile-box-detail_label)!important;
}
.forumcontainer #profile-layout-row #profile_userdetails.profile-custom-pronouns_text .pronouns-tag,
.forumcontainer #profile-layout-row #profile_userdetails.profile-custom-pronouns_text .pronouns-tag strong {
 color:var(--profile-box-pronouns_text)!important;
}
.forumcontainer #profile-layout-row .profile-custom-heading :is(h5,.card-title,.profile-achievements-heading) {color:var(--profile-box-heading)!important;}
.forumcontainer #profile-layout-row .profile-custom-font,.forumcontainer #profile-layout-row .profile-custom-font :is(p,span,a,td,li,h5,.card-title,.profile-showcase-content,.profile-showcase-item) {font-family:var(--profile-box-font)!important;}
.forumcontainer #profile-layout-row .profile-custom-font_size,.forumcontainer #profile-layout-row .profile-custom-font_size :is(p,span,a,td,li,.card-text,.profile-showcase-item) {font-size:var(--profile-box-font_size)!important;}
.forumcontainer #profile-layout-row .profile-custom-heading_size :is(h5,.card-title,.profile-achievements-heading) {font-size:var(--profile-box-heading_size)!important;line-height:1.2!important;}
.profile-custom-dialog {box-sizing:border-box;width:460px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 30px);overflow:auto;border:1px solid #658ba8;border-radius:16px;padding:20px;background:#102538;color:#edf5ff;font:14px/1.5 'National Park',sans-serif;}
.profile-custom-dialog::backdrop {background:#030b18aa;}
.profile-custom-dialog h3 {font:26px 'Bangers',sans-serif;margin:0 0 12px;}
.profile-custom-dialog label {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0;}
.profile-custom-dialog :is(button,select) {font:inherit;color:#f2f7ff;background:#173750;border:1px solid #658ba8;border-radius:6px;padding:6px;min-height:36px;}
.profile-custom-dialog input[type=color] {width:52px;min-height:36px;margin-left:auto;padding:2px;border:1px solid #658ba8;background:transparent;}
.profile-custom-dialog > select {width:100%;}
.profile-custom-dialog > button {margin:8px 8px 0 0;}
.profile-custom-dialog option {color:#edf5ff;background:#173750;}
/* Direct access and the layout panel open the same editor. */
.forumcontainer #profile-layout-row .profile-custom-button {font:16px/1.2 'Bangers',sans-serif;color:inherit;background:transparent;border:1px solid #658ba8;border-radius:7px;padding:6px 10px;cursor:pointer;}
.forumcontainer #profile-layout-row .profile-custom-trigger {
    position:absolute; top:5px; right:39px; z-index:12; display:flex; align-items:center; justify-content:center;
    box-sizing:border-box; width:30px!important; height:30px!important; min-width:0!important; min-height:0!important;
    margin:0!important; padding:3px!important; border:0; background:transparent; opacity:.8;
}
.forumcontainer #profile-layout-row .profile-custom-trigger > i {font-size:13px!important; line-height:1;}
.forumcontainer #profile-layout-row .profile-custom-trigger:hover,.forumcontainer #profile-layout-row .profile-custom-trigger:focus-visible {opacity:1;filter:drop-shadow(0 0 4px #35c9db);outline:2px solid #35c9db;outline-offset:1px;}
#profile-layout-row.profile-layout-editable [data-profile-section] > .card-body > h5,
#profile-layout-row.profile-layout-editable [data-profile-section] .profile-achievements-heading {padding-right:72px!important;}
#profile-layout-row.profile-layout-editable .habitat-carousel-toolbar {padding-right:72px!important;}
.profile-custom-dialog {width:520px;}
.profile-custom-dialog .profile-custom-field {display:flex;align-items:center;gap:10px;margin:12px 0;}
.profile-custom-dialog .profile-custom-field > label {margin:0;flex:1;}
.profile-custom-picker {min-width:0;width:215px;max-width:58%;}
.profile-custom-dialog .profile-custom-select-trigger {width:100%;display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;line-height:1.2;}
.profile-custom-select-trigger::after {content:'▾';font:14px/1 sans-serif;flex:none;}
.profile-custom-choice-list {max-height:230px;overflow:auto;margin-top:4px;padding:4px;border:1px solid #658ba8;border-radius:8px;background:#102538;}
.profile-custom-dialog .profile-border-picker .profile-custom-choice-list > button {
    display:flex; align-items:center; gap:10px;
}
.profile-border-picker :is(.profile-custom-select-trigger,[role=option])::before {
    content:''; order:1; margin-inline-start:auto; flex:0 1 3.5rem;
    border-top:var(--profile-sample-width,0px) solid currentColor;
}
.profile-border-picker .profile-custom-select-trigger::after {order:2;}
.profile-custom-choice-list[hidden] {display:none!important;}
.profile-custom-dialog .profile-custom-choice-list > button {display:block;width:100%;text-align:left;margin:0;border:0;border-radius:4px;line-height:1.25;padding:8px;}
.profile-custom-dialog .profile-custom-choice-list > button[aria-selected=true],.profile-custom-dialog .profile-custom-choice-list > button:hover {background:#295674;}
.profile-custom-dialog :is(button,select,input):focus-visible {outline:2px solid var(--profile-ui-accent,#73ddff);outline-offset:2px;}
.profile-custom-preview {padding:12px 14px;border:2px solid;border-radius:10px;margin:12px 0;overflow-wrap:anywhere;}
.profile-custom-dialog .profile-custom-preview h4 {margin:0 0 8px;line-height:1.2;font-weight:400;}
.profile-custom-dialog .profile-custom-preview p {margin:0;line-height:1.4;}
.profile-custom-actions {display:flex;gap:8px;justify-content:flex-end;margin-top:16px;}
@media(max-width:480px){.profile-custom-dialog{padding:14px;}.profile-custom-picker{width:170px;}}

/* Labels retain the selected face without synthetic bolding. */
#profile-layout-row #collections .profile-collections-grid .card-title,
#profile-layout-row #collections .profile-collections-grid .card-title a,
#profile-layout-row #profile_pets .petprofile_name {font-weight:400!important;}

/* Keep insertion cues above custom card shadows in either column. */
.forumcontainer #profile-layout-row .profile-drop-before {box-shadow:0 -5px 0 #35c9db,0 -8px 14px #35c9db88!important;outline:2px solid #35c9db!important;outline-offset:2px;}
.forumcontainer #profile-layout-row .profile-drop-after {box-shadow:0 5px 0 #35c9db,0 8px 14px #35c9db88!important;outline:2px solid #35c9db!important;outline-offset:2px;}
.forumcontainer #profile-layout-row [data-profile-drop-label]::after {z-index:1000!important;background:#154c61dc!important;color:#fff!important;}
.profile-section-drag .profile-section-handle,.profile-section-drag .profile-custom-trigger,.profile-section-drag .profile-panel-options {display:none!important;}

/* Image opacity applies only to the image layer, never the content. */
.profile-image-enabled {position:relative;isolation:isolate;}
.profile-image-layer {position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background-repeat:no-repeat;}
.forumcontainer #profile-layout-row .profile-image-enabled > .card-body {background:transparent!important;}
.forumcontainer.profile-background-customization {position:relative;isolation:isolate;}
.forumcontainer.profile-background-customization.profile-custom-background {background-color:var(--profile-box-background)!important;background-image:none!important;}
.profile-custom-preview {position:relative;isolation:isolate;min-height:120px;}
.profile-custom-dialog .profile-custom-field > input[type=file] {width:62%;font:12px 'National Park',sans-serif;}
.profile-custom-dialog .profile-custom-field > input[type=range] {width:42%;min-width:0;accent-color:#35c9db;}
.profile-custom-dialog .profile-custom-field > output {min-width:40px;text-align:right;font:12px 'National Park',sans-serif;}
.profile-custom-dialog .profile-custom-field > select {max-width:60%;}
.profile-custom-dialog .profile-custom-image-title {font:22px 'Bangers',sans-serif;margin:22px 0 10px;}
.profile-custom-dialog .profile-custom-upload-status {font-size:12px;margin:6px 0;}

/* Keep uploaded backgrounds visible through the container's decorative panels. */
.forumcontainer #profile-layout-row .profile-image-enabled > .card-body,
.forumcontainer #profile-layout-row .profile-image-enabled > .card-body > .card-title,
.forumcontainer #profile-layout-row .profile-image-enabled .profile-showcase-item,
.forumcontainer #profile-layout-row .profile-image-enabled .profile-collections-grid :is(.card,.card-body),
.forumcontainer #profile-layout-row .profile-image-enabled .profile_pet {background:transparent!important;}
.profile-custom-dialog .profile-custom-field > input[type=checkbox] {width:22px;height:22px;flex:none;margin:0;accent-color:#35c9db;cursor:pointer;}

/* Corners are independent per container; Default leaves existing CSS untouched. */
html body .forumcontainer #profile-layout-row [data-profile-section].profile-custom-corners,
html body .forumcontainer #profile-layout-row [data-profile-section].profile-custom-corners > .card-body {
 border-radius:var(--profile-box-corners)!important;
}
html body .forumcontainer #profile-layout-row [data-profile-section].profile-custom-corners > .profile-image-layer {border-radius:var(--profile-box-corners)!important;}

/* Text shadows inherit into linked titles and dynamically rendered item names. */
#profile-layout-row [data-profile-section].profile-font-glow,
#profile-layout-row [data-profile-section].profile-font-glow :is(.card-title, h5, .card-text, .petprofile_name, .profile-showcase-name, .profile-achievements-heading, .profile-link-label),
.profile-custom-dialog .profile-custom-preview.profile-font-glow > :is(h4,p) {
    text-shadow:var(--profile-font-shadow) !important;
}
#profile-layout-row .profile-font-glow :is(.profile-panel-options, button, select, input, i) {
    text-shadow:none;
}
