/* Layout-neutral bridges for the live server's DOM hooks. Visual rules are in the original source CSS. */
#main #profile-summary, #main .profile-summary-compact, #main .profile-summary-status-line {display:contents}
#main .profile-summary-contacts {display:none}
#main .profile-summary-avatar {background-position:center;background-size:cover;image-rendering:pixelated;position:relative}
#main .profile-tab-panel[hidden], #main .profile-tab-button[hidden], #main [hidden] {display:none!important}
#main .profile-tab-panel:not(.active) {display:none}
#main .profile-tabs-nav {overflow-x:auto}
#main .profile-summary-name .m-profile-online-dot {margin-left:0}
#main #profile-wall .profile-wall-empty {font:inherit}
#main #profile-wall .profile-wall-empty strong {font-weight:400}
#main #profile-wall .profile-wall-empty {padding:18px 0;color:#aa917c;font:400 13px/1.6 Arial,sans-serif}
#main #profile-wall .profile-wall-empty p {margin:0}
#main .profile-wall-post-body p:first-child {margin-top:0}
#main .profile-wall-post-body p:last-child {margin-bottom:0}
#main .profile-wall-avatar {display:block;width:100%;height:100%;background-size:cover;background-position:center}
#main .profile-wall-avatar-link {overflow:hidden}
#main .profile-wall-entry-actions {display:flex;gap:5px}
#main .profile-wall-entry-actions button {cursor:pointer}
#main .profile-wall-delete-pair {display:inline-flex;position:relative;width:24px;height:24px}
#main .profile-wall-delete-pair>.profile-wall-delete-toggle,#main .profile-wall-delete-pair>.profile-wall-delete-direct {position:absolute;inset:0}
#main .profile-wall-delete-pair:not(.is-confirming)>.profile-wall-delete-direct,#main .profile-wall-delete-pair.is-confirming>.profile-wall-delete-toggle {visibility:hidden;pointer-events:none}
#main .profile-wall-delete-icon img {width:12px;height:12px}
#main .profile-wall-entry-actions button {display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:3px;border:1px solid #604330;background:#291c15;color:#c9a58a}
#main .profile-wall-entry-actions button svg {width:14px;height:14px}
#main .profile-wall-comments-head {display:none}
#main .profile-wall-comment {position:relative}
#main .profile-wall-comment-body {display:contents}
#main .m-profile-comment-head {display:contents}
#main .m-profile-comment-content {grid-column:2}
#main .profile-wall-comment .m-profile-comment-byline {grid-column:2}
#main .profile-wall-comment .m-profile-comment-controls {position:absolute;right:0;top:0}
#main .profile-wall-plain-reply textarea {flex:1;min-width:0;height:36px;resize:vertical;padding:10px 12px;border:1px solid #5b4234;background:#1a1411;color:#f5e8d8;font:12px/14px var(--font)}
#main .profile-character-actions {display:flex;gap:5px}
#main .profile-character-actions svg {width:14px;height:14px}
#main .profile-character-action-message {position:relative;margin:0;padding:8px 12px;font-size:12px}
#main .profile-character-nickname-input {width:160px;max-width:100%;font:inherit;color:inherit;background:#211711;border:1px solid #80553b}
#main .profile-character-action-icon img {width:12px;height:12px}
#main #profile-characters-owner-bar {display:none}
#main #profile-tab-settings>.im-profile-section-panel,#main #profile-tab-privates>.im-profile-section-panel {padding:0;border:0;background:none;box-shadow:none}
#main .profile-settings-intro {display:none}
#main #profile-settings>.profile-placeholder-card,#main #im-profile-missing-settings {position:absolute;left:-100000px;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}
#main #profile-privates {position:absolute;left:-100000px;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}
#main #profile-tab-privates>.im-profile-section-panel>.m-panel-head {display:none}
#main .im-settings-option:has(:disabled),#main .m-smallbtn:disabled {cursor:not-allowed;opacity:.6}
#main .im-profile-api-note,#main .im-v2-api-warning {font:400 11px/1.5 var(--font);color:var(--sub);margin:12px 0 0}
#main .im-v2-map-notice {display:grid;place-items:center;height:100%;padding:20px;text-align:center;color:var(--sub);background:#211812}
.im-v6-settings-dialog {width:min(700px,calc(100vw - 32px));max-height:calc(100vh - 50px);overflow:auto;margin:auto;padding:26px;border:1px solid #7a5237;background:#241913;color:#ead9c7}
.im-v6-settings-dialog::backdrop {background:#080504bc}
.im-v6-modal-title {margin:0 36px 16px 0;font:500 25px/1.2 Arial,sans-serif;color:#f2dbc5}
.im-v6-modal-close {position:absolute;right:12px;top:12px;width:29px;height:29px;border:1px solid #835b3d;background:#302017;color:#efd0b2;cursor:pointer}
/* The retired page-shell backdrop must not paint through the source layout. */
body.im-profile-page::before,body.im-profile-page::after {content:none}
/* Real actions keep their server handlers; appearance follows the source controls. */
#main .profile-avatar-edit-button,#main .profile-signature-edit-button {display:none}
#main .profile-moderation-summary-actions {position:absolute;right:0;top:24px;display:flex;gap:6px}
#main .profile-moderation-summary-actions button {display:grid;place-items:center;width:30px;height:30px;padding:6px;border:1px solid #80553b;background:#302018;color:#f0bc93;cursor:pointer}
#main .profile-moderation-summary-actions svg {width:16px;height:16px}
#main .profile-wall-editor-label {font-size:12px}
#main .wall-rich-editor-shell {min-height:85px;border:1px solid #80553b;background:#1a1411;padding:10px;color:var(--text)}
#main .wall-rich-editor {min-height:65px;outline:none}
#main .profile-wall-new-post-actions {display:flex;justify-content:flex-end;gap:10px;margin:8px 0 18px}
#main .profile-character-slot-inline-form {margin-top:14px}
#main .profile-character-slot-inline-input {max-width:100%;padding:8px;border:1px solid #80553b;background:#1a1411;color:var(--text)}
#main .profile-character-slot-inline-actions {display:flex;gap:8px;justify-content:center;margin-top:10px}

/* Preserve source sizes for the server's two-step action pairs. */
#main .profile-character-actions {display:contents}
#main .profile-character-actions>.profile-wall-delete-pair {width:23px;height:23px;flex:none}
#main .profile-character-rename-pair>button {position:absolute;inset:0}
#main .profile-character-rename-pair:not(.is-confirming)>.profile-character-rename-confirm,
#main .profile-character-rename-pair.is-confirming>.profile-character-rename-toggle {visibility:hidden;pointer-events:none}
#main .im-slot-action-title {margin:0}
#main .im-slot-action-subtitle {font-family:Arial,'Trebuchet MS',sans-serif}
#main .m-achievements-panel {position:relative}
#main #im-profile-achievement-data-note {position:absolute;top:17px;right:22px;margin:0;font-size:9px;line-height:12px}
#main:has(#profile-tab-privates.active) .m-profile-tabs {margin-bottom:12px}
#main .im-pr-add {position:relative}
#main .im-pr-add .im-v2-api-warning {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#main .im-v2-delete-claim {position:absolute;z-index:3;bottom:17px;left:17px;display:grid;place-items:center;width:29px;height:29px;padding:5px}
#main .im-v2-delete-claim svg {width:15px;height:15px}
#style-pop .im-v2-account-details {font-size:12px;padding:12px;color:var(--sub)}
.im-link-state.is-pending {color:#bcab9d;border-color:#78543b;background:#32251e}

/* The original two action slots retain the source geometry; pinning is offered on hover or keyboard focus. */
#main .m-profile-post-controls {position:relative}
#main .m-profile-post-controls>.profile-wall-delete-pair {width:25px;flex:0 0 25px}
#main .m-profile-post-controls>.profile-wall-post-pin {position:absolute;right:60px;top:0;opacity:0;pointer-events:none}
#main .m-post:hover .profile-wall-post-pin,#main .m-post:focus-within .profile-wall-post-pin {opacity:1;pointer-events:auto}
#main .profile-wall-post-pin svg {fill:currentColor}

/* The live textarea retains its API listeners and the source field's visual size. */
#main .profile-wall-plain-reply textarea {height:36px!important;min-height:36px;max-height:36px;line-height:15.6px;padding:9.2px 12px;resize:none}
@media(max-width:460px){
 #main .m-profile-post-controls>.profile-wall-delete-pair {width:23px;flex-basis:23px}
 #main .m-profile-post-controls>.profile-wall-post-pin {right:52px}
}
body.im-profile-page:has([data-profile-source-editor]) .profile-tab-tooltip {display:none!important}
/* Existing account verification steps keep their handlers inside the source modal. */
.im-profile-source-modal .im-source-real-card {position:static!important;display:block;width:100%;height:auto;max-width:none;max-height:none;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--text);font-family:var(--font);opacity:1;overflow:visible;pointer-events:auto}
.im-profile-source-modal .im-source-real-card [hidden] {display:none!important}
.im-profile-source-modal .im-source-real-card>.recovery-settings-heading,.im-profile-source-modal .im-source-real-card>strong:first-child {display:none}
.im-profile-source-modal .recovery-settings-grid {display:grid;grid-template-columns:1fr;gap:16px;margin:0}
.im-profile-source-modal .recovery-method-card {padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:var(--text)}
.im-profile-source-modal .recovery-method-head {color:var(--text)}
.im-profile-source-modal .recovery-method-icon {color:var(--accent);background:#302018;border-color:#80553b}
.im-profile-source-modal .recovery-method-icon svg {width:22px;height:22px;fill:none;stroke:currentColor}
.im-profile-source-modal .recovery-method-identity,.im-profile-source-modal .recovery-method-state,.im-profile-source-modal .im-source-real-card p {color:var(--sub);font-size:13px}
.im-profile-source-modal .recovery-method-actions,.im-profile-source-modal .recovery-email-code-row,.im-profile-source-modal .recovery-unlink-confirm-row {display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.im-profile-source-modal .recovery-email-code-row input,.im-profile-source-modal .recovery-unlink-confirm-row input {flex:1 1 180px;min-width:0}
.im-profile-source-modal[data-recovery-kind="email"] [data-recovery-method="telegram"],.im-profile-source-modal[data-recovery-kind="telegram"] [data-recovery-method="email"] {display:none}
.im-profile-source-modal .recovery-unlink-confirm,.im-profile-source-modal .profile-password-recovery-passwords {padding-top:18px;border-color:var(--line);background:none}
.im-profile-source-modal .profile-password-recovery-form,.im-profile-source-modal #profile-password-recovery-form {display:flex;flex-direction:column;gap:14px}
.im-profile-source-modal .profile-password-recovery-channel .profile-password-recovery-channel-label {border-color:#80553b;background:#302018;color:var(--text)}
.im-profile-source-modal .profile-password-recovery-password-wrap {position:relative}
.im-profile-source-modal .profile-password-recovery-eye {position:absolute;right:8px;top:9px;width:30px;height:30px;padding:5px;border:0;background:transparent;color:var(--sub)}
.im-profile-source-modal .profile-password-recovery-eye svg {width:18px;height:18px}
.im-profile-source-modal .im-source-existing-form button:disabled {opacity:.6;cursor:not-allowed}
.im-profile-source-modal .im-source-real-card svg {width:18px;height:18px;flex:0 0 18px}
.im-profile-source-modal .recovery-method-card {text-align:left}
.im-profile-source-modal .recovery-method-head {display:flex;align-items:flex-start;gap:12px;margin-bottom:16px;text-align:left}
.im-profile-source-modal .recovery-method-head>div {display:flex;flex-direction:column;gap:4px}
.im-profile-source-modal .recovery-method-actions {justify-content:flex-start}
.im-profile-source-modal .profile-password-recovery-channels {display:flex;gap:10px}
.im-profile-source-modal .im-source-existing-form .profile-password-recovery-channel {display:flex;flex:1;flex-direction:row;align-items:center;gap:8px;padding:12px;border:1px solid #80553b;background:#302018;color:var(--text)}
.im-profile-source-modal .im-source-existing-form .profile-password-recovery-channel input[type="radio"] {width:16px;height:16px;padding:0;margin:0;flex:none}
.im-profile-source-modal .profile-password-recovery-channel-label {display:inline-flex;align-items:center;gap:8px}
.im-profile-source-modal .profile-password-recovery-channel:has(input:disabled) {opacity:.6;cursor:not-allowed}
.im-profile-source-modal .profile-password-recovery-send-row {display:flex;align-items:center;gap:10px}
.im-profile-source-modal .im-source-real-card svg {fill:none;stroke:currentColor;stroke-width:1.7}
.im-profile-source-modal .profile-password-recovery-channel-label svg:not(:has(rect)) {fill:currentColor;stroke:none}
.im-profile-source-modal .im-source-existing-form input {font-weight:400;letter-spacing:normal}

#main #profile-tab-privates .profile-private-empty-message,
#main #profile-tab-characters .profile-character-entry-empty{grid-column:1/-1;display:grid;place-items:center;width:100%;min-height:240px;padding:40px 16px;margin:0;text-align:center;background:none;border:0;box-shadow:none}
#main #profile-tab-privates .profile-private-empty-message p,
#main #profile-tab-characters .profile-character-entry-empty p{margin:0;color:inherit;font-weight:400}
