




* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}









[hidden] {
    display: none !important;
}

:root {
    --marble: #FAF9F6;
    --text-primary: #111111;
    --text-secondary: #6B6660;
    --gold: #D4AF37;
    --gold-light: #F4D03F;
    --gold-dark: #B2892D;
    --gold-gradient: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));



    --select-chevron: var(--gold-dark);
    --gold-gradient-horizontal: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-dark));






    --accent-rgb: 212, 175, 55;
    --accent-light-rgb: 244, 208, 63;
    --accent-dark-rgb: 178, 137, 45;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-strong: rgba(255, 255, 255, 0.88);
    --glass-blur: blur(32px);
    --glass-border: rgba(255, 255, 255, 0.5);
    --radius-panel: 24px;
    --radius-bubble: 20px;
    --radius-input: 16px;
    --radius-button: 16px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --shadow-gold: 0 4px 20px rgba(var(--accent-rgb), 0.25);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 250ms;
    --danger: #c0392b;

    --mesh-work: #4f7cac;
    --mesh-family: #b5677d;
    --mesh-belonging: #5c9a6e;
    --mesh-other: #8a7fb0;
}









html,
body {
    overscroll-behavior-y: none;



    overscroll-behavior-x: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: var(--marble);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(var(--accent-rgb), 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(var(--accent-light-rgb), 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(var(--accent-dark-rgb), 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 40% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 40%);
    background-attachment: fixed;
}



#app {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}






.shell-context #app-header {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
}

#app-header {


    padding: 14px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 20;
    overflow: hidden;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
}

#app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient-horizontal);
}

#app-header h1 {
    font-size: 20px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}




.header-tagline {
    display: block;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.75;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;


    -webkit-text-fill-color: var(--gold-text-fill);
}






#header-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}





.header-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}







.header-corner {
    position: absolute;
    right: 8px;
    bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.memo-slot[hidden] {
    display: none;
}




.report-slot {
    display: inline-block;
    flex: none;
    width: 44px;
    height: 44px;
}

.report-slot[hidden] {
    display: none;
}









#app-header:has(.assistant-slot:not([hidden])) #header-title {
    flex: 1 1 0;
    min-width: 0;
}

#app-header:has(.assistant-slot:not([hidden])) .header-community,
#app-header:has(.assistant-slot:not([hidden])) .header-community-name,
#app-header:has(.assistant-slot:not([hidden])) .header-tagline {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#app-header:has(.assistant-slot:not([hidden])) #header-actions {
    flex: none;
    margin-left: 8px;
}



.assistant-slot {
    position: relative;
    z-index: 1;
    display: flex;
    margin-right: max(0px, calc(var(--header-corner-width, 0px) - 8px));
}

.assistant-slot[hidden] {
    display: none;
}

.assistant-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 8px;
    background: none;
    border: none;
    border-radius: var(--radius-button);
    color: var(--gold-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .assistant-control:hover {
        background: rgba(var(--accent-rgb), 0.12);
    }
}

.assistant-control:active {
    background: rgba(var(--accent-rgb), 0.18);
}

.assistant-control-name {
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}






.assistant-control-figure {
    width: 28px;
    height: 28px;
    flex: none;
    object-fit: contain;
}




@media (max-width: 400px) {
    .assistant-control:has(> .assistant-control-figure:not(.look-neutral):not(.look-pending))
        > .assistant-control-name {
        display: none;
    }
}

.assistant-figure {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.assistant-initial {
    display: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}


.assistant-count {
    display: inline-block;
    min-width: 1.4em;
    margin-left: auto;
    padding: 0 0.35em;
    border-radius: 999px;
    background: var(--gold-gradient);
    color: var(--text-on-gold, #111111);
    font-size: 12px;
    line-height: 1.4em;
    text-align: center;
}

.assistant-count[hidden] {
    display: none;
}



.version-display {
    font-family: inherit;
    font-size: 10px;
    line-height: normal;
    color: var(--text-secondary);
    opacity: 0.5;
    letter-spacing: 0.3px;
    background: none;
    border: none;
    padding: 0;
}












@media (max-width: 480px) {


    .version-display {
        min-width: 36px;
        text-align: right;
    }

    .version-display .version-release,
    .version-display .version-server {
        display: none;
    }
}

@media (max-width: 359px) {
    .version-display {
        display: none;
    }
}

.header-btn {
    background: transparent;
    color: var(--gold-ink);
    border: 2px solid var(--gold);
    padding: 6px 16px;
    border-radius: var(--radius-button);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
}

.header-btn:hover {
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    border-color: transparent;
    box-shadow: var(--shadow-gold);
}

.lang-picker {
    position: relative;
}

.lang-toggle {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.lang-menu {
    display: none;
    position: fixed;
    background: var(--marble);
    border: 1px solid var(--gold);
    border-radius: var(--radius-button);
    overflow: hidden;
    z-index: 1000;
    min-width: 140px;
    box-shadow: var(--shadow-lg);
}

.lang-menu.open {
    display: flex;
    flex-direction: column;
}

.lang-option {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--duration) var(--ease);
}

.lang-option:hover {
    background: rgba(var(--accent-rgb), 0.15);
}

.lang-option.lang-active {
    color: var(--gold-ink);
    font-weight: 600;
}



#app-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    overflow: hidden;
}

#main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;






    overflow-y: auto;





    overflow-x: hidden;
    overscroll-behavior-x: none;
}


.old-browser-line {
    max-width: 420px;
    margin: 48px auto 0;
    padding: 0 24px;
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.5;
    text-align: center;
}



#sidebar {
    width: 340px;
    flex-shrink: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    position: relative;
    overflow-y: auto;
}

#sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold-gradient);
}


@media (max-width: 768px) {
    #sidebar {
        display: none;
    }
}


#menu-btn {
    font-size: 20px;
    padding: 4px 10px;
    border: none;
    background: none;
    color: var(--gold);
    cursor: pointer;
}

@media (min-width: 769px) {
    #menu-btn {
        display: none !important;
    }
}



.auth-form {
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 440px;
    margin: 40px auto;
    width: 100%;
    position: relative;






    flex-shrink: 0;





    border: 2px solid transparent;
    background-image:
        linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)),
        var(--gold-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-md);
}

.auth-form h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 4px;
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 12px 14px;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    border-radius: var(--radius-input);
    font-size: 16px;
    outline: none;
    background: var(--glass-bg);


    color: var(--text-primary);
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}



.btn {
    padding: 12px;
    border: none;
    border-radius: var(--radius-button);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--duration) var(--ease),
                transform 150ms var(--ease);
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    box-shadow: var(--shadow-sm);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.5s var(--ease);
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: var(--shadow-gold);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary:disabled::after {
    display: none;
}

.auth-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--gold-ink);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--duration) var(--ease);
}

.auth-link a:hover {
    color: var(--gold-light-ink);


    text-decoration: underline;
}






.back-row {
    display: flex;
    margin: 0;
}

.back-row > a {
    display: flex;
    flex: 1;
    align-items: center;
    min-height: 44px;
}

button.back-row {
    align-items: center;
    align-self: stretch;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    text-align: left;
}

.auth-form .back-row > a,
.recovery-status .back-row > a {
    justify-content: center;
}

#offline-banner {
    background: var(--danger);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
}

.error-msg {
    color: var(--danger);
    font-size: 14px;
    padding: 10px 14px;
    background: rgba(192, 57, 43, 0.08);
    border-radius: 12px;
    border-left: 3px solid var(--danger);
    display: none;
}





.error-msg:not(:empty) {
    display: block;
}

.error-msg a {
    color: var(--gold-ink);
    font-weight: 600;
}

.field-hint {
    color: var(--gold-ink);
    font-size: 13px;
    margin-top: 4px;
}

.status-msg {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 10px 14px;
    text-align: center;
}


.gold-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.gold-loader .spinner {
    color: var(--gold);
    animation: ankhSpin 1.2s ease-in-out infinite;
}

@keyframes ankhSpin {
    0% { transform: rotate(0deg); opacity: 0.6; }
    50% { transform: rotate(180deg); opacity: 1; }
    100% { transform: rotate(360deg); opacity: 0.6; }
}






.switch-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 14px;
    cursor: pointer;
}










.switch-row input[role="switch"] {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    width: 44px;
    height: 26px;
    margin: 0;
    border: 0;
    border-radius: 13px;
    background-color: var(--text-secondary);
    background-image: radial-gradient(
        circle,
        var(--marble) 0 8.5px,
        var(--text-primary) 9px 10px,
        transparent 10.5px
    );
    background-repeat: no-repeat;
    background-size: 26px 26px;
    background-position: 0 0;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease),
                background-position var(--duration) var(--ease);
}

.switch-row input[role="switch"]:checked {
    background-color: var(--gold);
    background-position: 18px 0;
}

.switch-row input[role="switch"]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.switch-row input[role="switch"]:disabled {
    opacity: 0.5;
    cursor: default;
}






.switch-row .switch-row-state {
    flex: none;
    font-weight: 400;
    color: var(--text-secondary);
}





.select-row {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
}












input:where(:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="hidden"])),
textarea,
[contenteditable]:where(:not([contenteditable="false"])) {
    font-size: 16px;
}

















select {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 40px 10px 14px;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    border-radius: var(--radius-input);
    background-color: var(--glass-bg);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--select-chevron) 50%),
        linear-gradient(135deg, var(--select-chevron) 50%, transparent 50%);
    background-position: right 19px center, right 14px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

select:disabled {
    opacity: 0.6;
    cursor: default;
}


select[aria-invalid="true"] {
    border-color: var(--danger);
    outline: 1px solid var(--danger);
}




@media (hover: hover) {
    select:hover:not(:disabled):not(:focus):not([aria-invalid="true"]) {
        border-color: rgba(var(--accent-rgb), 0.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    select {
        transition: none;
    }
}


.select-row select {
    flex: none;
    max-width: 60%;
}

@media (prefers-reduced-motion: reduce) {
    .switch-row input[role="switch"] {
        transition: none;
    }
}
















:is(input, select).field-fits {
    flex: 0 1 auto;
    min-width: 0;
    width: fit-content;
    max-width: 100%;
}









input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-text {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-month-field {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-day-field {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

input[type="date"].date-empty:not(:focus)::-webkit-datetime-edit-year-field {
    color: transparent;
    -webkit-text-fill-color: transparent;
}



.conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}



.conversation-section {
    margin-bottom: 8px;
}

.conversation-section-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-dark-ink);
    padding: 10px 14px 4px;
}

.user-item {
    padding: 16px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: var(--radius-bubble);
    transition: background var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
    margin-bottom: 4px;
}

.user-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
    box-shadow: var(--shadow-sm);
}

.user-item:active {
    background: rgba(var(--accent-rgb), 0.18);
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}


.unread-badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-gradient);
    box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5);
    flex-shrink: 0;
}



.welcome-panel {
    flex: 1;




    background-image: var(--look-landing, none);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}



.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
}

.chat-back {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gold);

    min-width: 44px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background var(--duration) var(--ease);
}

.chat-back:hover {
    background: rgba(var(--accent-rgb), 0.12);
}

@media (min-width: 769px) {
    .chat-back {
        display: none;
    }
}

.chat-partner-name {
    font-size: 18px;
    font-weight: 600;




    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



@media (max-width: 480px) {
    .chat-header {
        flex-wrap: wrap;
        row-gap: 4px;
    }
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.message {


    max-width: 92%;
    padding: 12px 16px;
    border-radius: var(--radius-bubble);
    font-size: 15px;
    line-height: 1.45;
    word-wrap: break-word;
    position: relative;
}

.message-sent {
    align-self: flex-end;
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    border-bottom-right-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.message-sent::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.2), transparent 70%);
    pointer-events: none;
}

.message-received {
    align-self: flex-start;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    box-shadow: var(--shadow-sm);
}



.msg-content {
    position: relative;
}

.msg-content.msg-collapsed {
    max-height: 80px;
    overflow: hidden;
}

.msg-content.msg-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    pointer-events: none;
}

.message-sent .msg-content.msg-collapsed::after {
    background: linear-gradient(transparent, var(--gold));
}



.message-received .msg-content.msg-collapsed::after {
    background: linear-gradient(transparent, var(--bubble-received-fade));
}

.msg-expand-btn {
    display: block;
    background: none;
    border: none;
    color: var(--gold-ink);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0 0;
    font-family: inherit;
}




.message-sent .msg-expand-btn {
    color: rgba(var(--text-on-gold-rgb), 0.8);
    text-align: right;
    width: 100%;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}






.message-sent .message-time {
    text-align: right;
    color: rgba(var(--text-on-gold-rgb), 0.75);
}



.copy-msg-btn {
    position: absolute;
    top: 6px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 200ms ease;
    color: inherit;
    line-height: 0;
    z-index: 1;
}

.copy-msg-btn svg {
    width: 14px;
    height: 14px;
}

.copy-msg-btn:hover,
.copy-msg-btn:active {
    opacity: 0.8;
}

.copy-msg-done {
    opacity: 0.8;
}

.message-sent .copy-msg-btn {
    left: 6px;
}

.message-sent .msg-content {
    padding-left: 22px;
}

.message-received .copy-msg-btn {
    right: 6px;
}

.message-received .msg-content {
    padding-right: 22px;
}



.delete-msg-btn {
    position: absolute;
    top: 24px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 200ms ease;
    color: inherit;
    line-height: 0;
    z-index: 1;
}

.delete-msg-btn:hover,
.delete-msg-btn:active {
    opacity: 0.8;
}

.delete-msg-btn svg {
    width: 14px;
    height: 14px;
}

.message-sent .delete-msg-btn {
    left: 6px;
}

.message-received .delete-msg-btn {
    right: 6px;
}



.date-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
    user-select: none;
}

.date-separator::before,
.date-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.35), transparent);
}

.date-separator span {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-ink);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}



.message-grouped {
    margin-top: -6px;
}

.message-sent.message-grouped {
    border-top-right-radius: 6px;
}

.message-received.message-grouped {
    border-top-left-radius: 6px;
}


.animate-in {
    animation: messageSlideUp 300ms var(--ease) both;
}

@keyframes messageSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.chat-compose {
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.chat-compose::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-gradient-horizontal);
}

.chat-compose textarea {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    background: var(--glass-bg);
    color: var(--text-primary);
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
    resize: none;






    min-height: 52px;
    max-height: 160px;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.4;
}

.chat-compose textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.chat-compose button#chat-send {
    background: none;
    color: var(--text-primary);
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: 4px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.send-scarab-img {
    width: 36px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    transition: box-shadow var(--duration) var(--ease),
                transform 150ms var(--ease);
}

.chat-compose button#chat-send::after {
    display: none;
}

.chat-compose button#chat-send:hover .send-scarab-img {
    transform: scale(1.1);
    filter: brightness(1.15);
}

.chat-compose button#chat-send:active:not(:disabled) {
    transform: scale(0.92);
}

.chat-compose button#chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-compose button#chat-send:disabled::after {
    display: none;
}



.compose-attach-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 8px;
    flex-shrink: 0;
    color: var(--gold);
    opacity: 0.65;
    border-radius: 8px;
    transition: opacity var(--duration) var(--ease),
                background var(--duration) var(--ease);
}

.compose-attach-btn:hover {
    opacity: 1;
    background: none;
}

.compose-attach-btn:hover .attach-icon-img {
    transform: scale(1.1);
    filter: brightness(1.15);
}



.voice-recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-sm);
}

.recording-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulseGlow 1s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 8px 4px rgba(192, 57, 43, 0.2); }
}

.recording-timer {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--danger);
    min-width: 32px;
}

.recording-label {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.recording-cancel-btn {
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    flex-shrink: 0;
}



.context-warning {
    background: var(--warning-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--warning-text);
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 2px solid var(--gold);
}

.context-warning strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.context-warning p {
    margin: 0;
}




.info-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-link {
    background: none;
    border: none;
    color: var(--gold-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    transition: color var(--duration) var(--ease);
}

.btn-link:hover {
    color: var(--gold-light-ink);
    text-decoration: underline;
}









.settings-surface-title {
    margin: 0 0 8px;
    color: var(--gold-dark);
}








.settings-in-main,
.settings-surface-frame,
.community-settings-page,
.community-members-page {
    box-sizing: border-box;
    padding: 16px;
}

.settings-page-back {
    margin: 0;
    text-align: left;
}

.key-actions-group {
    display: block;
    max-width: 320px;
    text-align: left;
}

.key-actions-group .btn-link {
    display: block;
    width: 100%;
    text-align: left;
}





.menu-slot {
    display: block;
}














.group-block {
    border-top: 1px solid var(--hairline);
    padding-top: 4px;
}

h3.group-block-heading,
.group-block-heading > button {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-dark-ink);
}

.group-block-rows {
    padding: 0 0 12px 8px;
}






.btn-link.recovery-needs-setup {
    color: var(--danger);
}

.btn-link.recovery-needs-setup:hover {
    color: var(--danger);
    opacity: 0.8;
}

.recovery-community-card .recovery-intro {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.recovery-community-card .recovery-partner-names {
    font-weight: 700;
    color: var(--gold-dark-ink);
    margin: 6px 0;
}

.import-instructions {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}



@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.transfer-overlay,
.recovery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--scrim);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn var(--duration) var(--ease);
}

.transfer-card,
.recovery-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-panel);
    padding: 36px 28px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 350ms var(--ease);
    position: relative;







    border: 2px solid transparent;
    background-image:
        linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)),
        var(--gold-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.transfer-card h2,
.recovery-card h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.transfer-code {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 8px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;



    -webkit-text-fill-color: var(--gold-text-fill);
    background-clip: text;
    padding: 16px;
    margin-bottom: 16px;
    font-family: monospace;
}

.transfer-card p,
.recovery-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}








.lock-info {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}



.partner-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    max-height: 40vh;
    overflow-y: auto;
}

.partner-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease),
                background var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

.partner-checkbox-item:hover {
    border-color: var(--gold);
    background: rgba(var(--accent-rgb), 0.06);
    box-shadow: var(--shadow-sm);
}

.partner-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
}




.partner-checkbox-item .partner-name {
    font-size: 15px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}



.threshold-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.threshold-selector label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}





.recovery-status {
    text-align: center;
    padding: 24px;
}

.recovery-status .transfer-code {
    margin: 16px auto;
    max-width: 280px;
}

.recovery-status .partner-list {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 12px 0;
}

.recovery-status .contribution-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--gold-ink);
    margin: 8px 0;
}



.attachment-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--inset-bg);
    border-radius: 12px;
    cursor: default;
}

.message-sent .attachment-bubble {
    background: rgba(255, 255, 255, 0.18);
}

.attachment-icon {
    font-size: 24px;
    flex-shrink: 0;
    color: var(--gold);
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-size {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.attachment-download-btn {
    background: var(--gold-gradient);
    color: var(--text-on-gold);
    border: none;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--duration) var(--ease),
                opacity var(--duration) var(--ease);
}

.attachment-download-btn:hover {
    box-shadow: var(--shadow-gold);
}

.attachment-download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



.voice-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--inset-bg);
    border-radius: 12px;
    min-width: 200px;
}

.message-sent .voice-bubble {
    background: rgba(255, 255, 255, 0.18);
}

.voice-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: box-shadow var(--duration) var(--ease),
                transform 150ms var(--ease);
}

.voice-play-btn:hover {
    box-shadow: var(--shadow-gold);
    transform: scale(1.05);
}

.voice-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.voice-play-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--text-on-gold);
}

.voice-info {
    flex: 1;
    min-width: 0;
}

.voice-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.voice-preview-play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.voice-duration {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.voice-progress {
    height: 3px;
    background: rgba(var(--accent-rgb), 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.voice-progress-fill {
    height: 100%;
    background: var(--gold-gradient-horizontal);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}





.upload-progress {
    padding: 12px 16px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.upload-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-filename {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 12px;
}

.upload-cancel-btn {
    color: var(--danger);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
}



@keyframes shineSweep {
    from { left: -100%; }
    to { left: 100%; }
}



#sidebar .user-item.active {
    background: rgba(var(--accent-rgb), 0.15);
    box-shadow: var(--shadow-sm);
}



@media (min-width: 769px) {
    #app {
        box-shadow: none;
    }
}



@media (max-width: 480px) {
    .auth-form {
        margin: 16px;
        padding: 28px 20px;



        width: auto;
    }
}



@keyframes headerShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

#app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-light-rgb), 0.12), rgba(255, 255, 255, 0.18), rgba(var(--accent-light-rgb), 0.12), transparent);
    animation: headerShimmer 1.5s var(--ease) 0.3s 1 forwards;
    pointer-events: none;
    z-index: 1;
}



::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}




.attach-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform var(--duration) var(--ease), filter var(--duration) var(--ease);
}


.avatar-coin-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter var(--duration) var(--ease), transform var(--duration) var(--ease);
}





.avatar-coin-img.unread {
    object-fit: initial;
    width: 110%;
    height: auto;
    margin-left: -5%;
    margin-top: -34%;
}

.user-item:hover .avatar-coin-img {
    filter: brightness(1.15);
    transform: scale(1.1);
}

.user-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    outline: none;
    overflow: visible;
    padding: 0;
    border-radius: 0;
}




.welcome-text {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 0.05em;
    backdrop-filter: blur(6px);
}


.auth-hero {
    width: 160px;
    height: auto;
    margin: 0 auto 12px;
    border-radius: 0;
    object-fit: contain;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}



.auth-hero.look-uploaded {
    display: block;
    height: 160px;
}


.empty-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-chat-icon {
    width: 100px;
    height: auto;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-chat p {
    font-size: 15px;
    color: var(--text-secondary);
}



.user-item {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.user-item-held {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.3);
    transition: transform 150ms var(--ease), box-shadow 150ms var(--ease);
}



.user-avatar {
    position: relative;
}

.user-item-selected {
    background: rgba(var(--accent-rgb), 0.15);
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}






.user-item-selected .user-avatar::after,
.user-item-selected:has(> .user-avatar > .avatar-coin-img.look-neutral:not(.unread))::after {
    content: '\2713';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--gold-gradient);
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-gold);
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}





.user-item-selected:has(> .user-avatar > .avatar-coin-img.look-neutral:not(.unread)) {
    position: relative;
}

.user-item-selected:has(> .user-avatar > .avatar-coin-img.look-neutral:not(.unread))::after {
    top: 50%;
    bottom: auto;
    right: 14px;
    transform: translateY(-50%);
}

.multiselect-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 2px solid var(--gold);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    animation: slideUp 250ms var(--ease);
    z-index: 30;
}

.multiselect-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-dark-ink);
}

.multiselect-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}



.compose-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--scrim);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn var(--duration) var(--ease);
}

.compose-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-panel);
    padding: 28px 24px;
    max-width: 440px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 350ms var(--ease);
    position: relative;

    border: 2px solid transparent;
    background-image:
        linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)),
        var(--gold-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.compose-card h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.compose-recipients {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
}

.broadcast-header-recipients {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}

.broadcast-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--gold-dark-ink);
    flex-shrink: 0;
}

.broadcast-header-recipients .compose-recipients {
    margin: 0;
    flex-wrap: nowrap;
}

.compose-recipient-chip {
    padding: 4px 12px;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-dark-ink);
}

.compose-card textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    border-radius: var(--radius-input);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: var(--glass-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

.compose-card textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

.compose-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

.compose-progress {
    margin-top: 12px;
}

.compose-progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: center;
}



.feedback-card {
    max-width: 440px;
    text-align: left;
}

.feedback-card p {
    text-align: left;
}

.feedback-category {
    margin-bottom: 12px;
}


.feedback-category select {
    width: 100%;
}

.feedback-card textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    border-radius: var(--radius-input);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: var(--glass-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

.feedback-card textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}


.feedback-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 8px;
    color: var(--text-primary);
    cursor: pointer;
}

.feedback-contact input {
    width: 20px;
    height: 20px;
    accent-color: var(--gold);
}



.user-item-drag-clone {
    position: fixed;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 4px 20px rgba(var(--accent-rgb), 0.3);
    transform: scale(1.04);
    opacity: 0.95;
    background: var(--glass-bg-strong);
    border-radius: var(--radius-bubble);
}

.user-item-placeholder {
    opacity: 0.25;
    border: 2px dashed rgba(var(--accent-rgb), 0.4);
    background: transparent !important;
    pointer-events: none;
}

.user-item-shifting {
    transition: transform 200ms var(--ease);
}



.msg-security-icon {
    margin-right: 3px;
    vertical-align: middle;
}

.msg-locked {
    color: var(--text-on-gold);
}

.msg-unlocked {
    color: #e23b3b;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    margin-right: 3px;
    vertical-align: middle;
    cursor: help;
}

.msg-translate-toggle {
    background: none;
    border: none;
    padding: 2px 6px;
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.msg-translate-toggle:hover {
    color: var(--gold);
    background: rgba(var(--accent-rgb), 0.1);
}

.msg-translate-toggle.translate-showing-alt {
    color: var(--gold);
    background: rgba(var(--accent-rgb), 0.15);
}

.translate-icon-sm {
    width: 12px;
    height: 12px;
}

.msg-translated-preview {
    margin-top: 4px;
}

.msg-translated-divider {
    border-top: 1px solid var(--hairline);
    margin: 4px 0;
}

.msg-translated-text {
    font-size: 0.85em;
    color: var(--text-muted);
    line-height: 1.4;
}





.chat-call-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    color: var(--gold);
    display: flex;
    align-items: center;
    border-radius: var(--radius-button);
    transition: background 0.2s ease, color 0.2s ease;
}

.chat-call-btn:hover {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--gold-dark);
}

.chat-call-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-call-btn svg {
    width: 20px;
    height: 20px;
}


.message-call-invite {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gold-gradient);
    border-radius: var(--radius-bubble);
    color: var(--text-on-gold);
}

.message-call-invite.expired {
    background: var(--expired-bg);
    color: var(--text-secondary);
}

.message-call-invite.error {
    background: var(--expired-bg);
    color: var(--text-secondary);
    font-style: italic;
}





.message-sent .message-call-invite.expired,
.message-sent .message-call-invite.error {
    color: var(--text-on-gold);
    opacity: 0.85;
}

.message-sent .message-call-invite.expired .call-invite-icon svg {
    stroke: var(--text-on-gold);
}

.call-invite-icon {
    flex-shrink: 0;
}

.call-invite-icon svg {
    stroke: var(--text-on-gold);
}

.message-call-invite.expired .call-invite-icon svg {
    stroke: var(--text-secondary);
}

.call-invite-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.call-invite-label {
    font-weight: 600;
    font-size: 0.95em;
}

.call-expired-label {
    font-size: 0.85em;
    font-style: italic;
}

.call-join-btn,
.audio-call-join-btn {
    background: #111;
    color: var(--gold-light);
    border: none;
    border-radius: var(--radius-button);
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.2s ease;
    align-self: flex-start;
}

.call-join-btn:hover,
.audio-call-join-btn:hover {
    background: #222;
}

.call-join-btn:disabled,
.audio-call-join-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.call-fallback-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--gold-dark-ink);
    font-weight: 600;
    text-decoration: underline;
    font-size: 0.9em;
}


.message-sent .call-fallback-link {
    color: var(--text-on-gold);
}



.call-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}




.call-overlay[hidden] {
    display: none;
}


button.call-view-back {
    margin: -20px 0 6px -24px;
    width: calc(100% + 24px);
    padding: 0 8px;
    border: none;
    background: none;
    color: var(--gold-light);
    font: inherit;
    cursor: pointer;
}

.call-panel {
    background: #16130c;
    border: 1px solid var(--gold-dark);
    border-radius: 14px;
    padding: 32px 40px;
    text-align: center;
    min-width: 240px;




    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}


.call-panel > .call-view-back {
    margin-bottom: auto;
}

.call-peer-name {
    color: var(--gold-light);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
}

.call-status {
    color: var(--gold);
    font-size: 0.95em;
    min-height: 1.3em;
}

.call-status[data-status="encrypted_active"]::before {
    content: "🔒 ";
}


.call-path {
    color: var(--gold-dark);
    font-size: 0.8em;
    margin-top: 2px;
}

.call-timer {
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
    margin-top: 6px;
    font-size: 1.1em;
}

.call-actions {
    display: flex;


    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;



    flex-shrink: 0;

    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 8px 0;
    background: #16130c;
}

.call-mute-btn,
.call-hangup-btn {
    border: none;
    border-radius: var(--radius-button, 8px);
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
}

.call-mute-btn {
    background: #2a2415;
    color: var(--gold-light);
}

.call-hangup-btn {
    background: #7c1f1f;
    color: #fff;
}





.call-mute-btn[data-microphone="off"] {
    background: #fff;
    color: #7c1f1f;
    box-shadow: 0 0 0 2px #7c1f1f inset;
}






.call-muted-indicator {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-shrink: 0;
    margin: -32px -40px 24px;
    padding: 12px 16px;
    border-radius: 14px 14px 0 0;
    background: #7c1f1f;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.call-muted-indicator[hidden] {
    display: none;
}



.call-fingerprint {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--accent-dark-rgb), 0.4);
}

.call-fingerprint-label {
    color: var(--gold);
    font-size: 0.78em;
    max-width: 20em;
    margin: 0 auto;
}

.call-fingerprint-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 6px;
}

.call-fingerprint-word {
    color: var(--gold-light);
    font-size: 1.05em;
    font-weight: 700;
}

.call-fingerprint-numbers {
    color: var(--gold-dark);
    font-size: 0.72em;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}





.call-invite-label-own {
    color: var(--text-on-gold);
    opacity: 0.8;
    font-size: 0.85em;
}

.call-key-change-banner {
    background: #7c1f1f;
    color: #fff;
    font-size: 0.8em;
    padding: 6px 10px;
    border-radius: 8px;
    margin-left: 8px;
    max-width: 60%;
}




.key-trust-notice {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 90vw;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #fff;
    background: #7c1f1f;
    border-radius: 10px;
}

.key-trust-notice-close,
.key-trust-notice-action {
    min-height: 44px;
    color: #fff;
}



.call-incoming-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;


    z-index: 1400;
}

.call-incoming-panel {
    background: #16130c;
    border: 1px solid var(--gold-dark);
    border-radius: 18px;
    padding: 40px 34px 32px;
    text-align: center;
    min-width: 260px;
    max-width: 90vw;
}

.call-incoming-icon {
    color: var(--gold-light);
    animation: call-ring-shake 1.4s ease-in-out infinite;
}

@keyframes call-ring-shake {
    0%, 60%, 100% { transform: rotate(0deg); }
    10%, 30%, 50% { transform: rotate(-12deg); }
    20%, 40% { transform: rotate(12deg); }
}

.call-incoming-title {
    color: var(--gold);
    font-size: 0.95em;
    margin-top: 10px;
}

.call-incoming-caller {
    color: var(--gold-light);
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 4px;
    word-break: break-word;
}


.call-incoming-place {
    color: var(--gold);
    font-size: 0.95em;
    margin-top: 6px;
    word-break: break-word;
}

.call-incoming-warning {
    background: #7c1f1f;
    color: #fff;
    font-size: 0.82em;
    padding: 8px 10px;
    border-radius: 8px;
    margin-top: 14px;
}

.call-incoming-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 26px;
}

.call-answer-btn,
.call-decline-btn {
    border: none;
    border-radius: var(--radius-button, 8px);
    padding: 14px 26px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    min-width: 110px;
}

.call-answer-btn {
    background: #1f6b30;
    color: #fff;
}

.call-decline-btn {
    background: #7c1f1f;
    color: #fff;
}

.call-notice {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    background: #16130c;
    border: 1px solid var(--gold-dark);
    color: var(--gold-light);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9em;
    z-index: 1500;
    max-width: 86vw;
    text-align: center;
}



.call-attention-box {
    position: fixed;
    left: 50%;
    top: 18px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1550;
    max-width: 90vw;
}

.call-attention {
    background: #16130c;
    border: 1px solid var(--gold-dark);
    color: var(--gold-light);
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}



.call-attention[hidden] {
    display: none;
}

.call-attention button {
    background: var(--gold-dark);
    color: #16130c;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 1em;
    font-weight: 600;
    min-height: 44px;
    cursor: pointer;
}












@media (max-width: 480px) {
    .chat-compose {
        padding: 10px 8px;
        gap: 6px;
    }

    .compose-attach-btn {
        padding: 4px;
    }

    .attach-icon-img {
        width: 32px;
        height: 32px;
    }

    .chat-compose button#chat-send {
        padding: 4px;
    }

    .send-scarab-img {
        width: 32px;
    }
}





.autofill-username {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
