:root{
    --primary-color: #8ea4bf;
    --primary-color-dark: #6f8299;
    --primary-color-hover: #b2c2d7;
    --primary-color-light: #dde5ef;
    --border-color: #3b4148;
    --surface-elevated: #1b1d21;
    --surface-elevated-2: #23262b;
    --surface-muted: #2b3037;
    --surface-muted-2: #31363e;
    --button-border: rgba(142, 164, 191, 0.45);
    --button-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    --button-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.16);
    --button-bg: transparent;
    --button-bg-hover: rgba(142, 164, 191, 0.12);
    --button-bg-active: rgba(142, 164, 191, 0.2);
    --button-text: var(--primary-color-light);
    --button-danger-border: rgba(194, 103, 103, 0.48);
    --button-danger-bg: transparent;
    --button-danger-bg-hover: rgba(194, 103, 103, 0.14);
    --button-danger-text: #efb0b0;
    --scroll-track: rgba(19, 24, 30, 0.94);
    --scroll-track-border: rgba(87, 101, 117, 0.38);
    --scroll-thumb: linear-gradient(180deg, rgba(123, 162, 214, 0.84), rgba(92, 125, 170, 0.92));
    --scroll-thumb-hover: linear-gradient(180deg, rgba(152, 188, 236, 0.92), rgba(113, 151, 204, 0.96));
    --scroll-thumb-outline: rgba(24, 31, 40, 0.94);
    --scroll-corner: rgba(14, 18, 24, 0.98);
    --space: 10px;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #141619;
    color: #e7eaee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(123, 162, 214, 0.92) var(--scroll-track);
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border: 1px solid var(--scroll-track-border);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border: 2px solid var(--scroll-thumb-outline);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

*::-webkit-scrollbar-corner {
    background: var(--scroll-corner);
}

a {
    color: inherit;
}

hr {
    margin: calc(var(--space) * 0.2) 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

ul,
ol {
    margin: 0 0 var(--space);
    padding-left: 1.5rem;
    list-style-position: outside;
}

ul {
    list-style-type: disc;
}

ul ul {
    list-style-type: circle;
}

ol {
    list-style-type: decimal;
}

ol ol {
    list-style-type: lower-alpha;
}

li + li {
    margin-top: calc(var(--space) * 0.35);
}

li > ul,
li > ol {
    margin-top: calc(var(--space) * 0.35);
    margin-bottom: 0;
}

li::marker {
    color: #9fbde0;
}

[hidden] {
    display: none !important;
}

.global-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 17, 24, 0.82);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.global-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space);
    padding: var(--space) var(--space);
    border-radius: 16px;
    background: rgba(17, 22, 29, 0.78);
    border: 1px solid rgba(76, 85, 96, 0.72);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.site-footer {
    margin-top: auto;
    padding: calc(var(--space) * 3.5) var(--space) calc(var(--space) * 2.25);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(13, 17, 22, 0.96), rgba(10, 13, 18, 0.99));
}

.site-footer-inner {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.9fr);
    gap: calc(var(--space) * 4);
    align-items: start;
}

.site-footer-brand-panel {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space) * 1.5);
}

.site-footer-brand {
    display: grid;
    gap: 10px;
}

.site-footer-brand h2 {
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    color: #f0f5fb;
}

.site-footer-brand p {
    color: #adbac8;
    line-height: 1.8;
    max-width: 34rem;
}

.site-footer-brand-note {
    color: #93a4b6;
    line-height: 1.8;
    max-width: 34rem;
}

.site-footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space) * 1.2) calc(var(--space) * 2.2);
}

.site-footer-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.site-footer-stat-label {
    color: #95a5b7;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-footer-stat-value {
    color: #eef3fa;
    font-size: 1.1rem;
    line-height: 1.1;
    font-weight: 600;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: calc(var(--space) * 2.4);
    align-items: start;
}

.site-footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer-column h3 {
    font-size: 0.8rem;
    color: #f0f5fb;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-footer-column a {
    color: #bdc9d6;
    text-decoration: none;
    width: fit-content;
    line-height: 1.75;
    transition: color 0.18s ease, transform 0.18s ease;
}

.site-footer-column a:hover,
.site-footer-column a:focus-visible {
    color: #eef3fa;
    transform: translateX(2px);
}

.site-footer-column a:focus-visible {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 3px;
    border-radius: 4px;
}

body.page-loading .global-loading-overlay {
    opacity: 1;
    pointer-events: auto;
}

.global-loading-spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid rgba(199, 208, 219, 0.28);
    border-top-color: #eef3fa;
    animation: global-loading-spin 0.8s linear infinite;
}

.global-loading-status {
    color: #d7e0ea;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

@keyframes global-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 820px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: calc(var(--space) * 2.5);
    }

    .site-footer-links {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 560px) {
    .site-footer {
        padding-inline: var(--space);
    }

    .site-footer-stats {
        flex-direction: column;
        gap: var(--space);
    }

    .site-footer-links {
        grid-template-columns: 1fr;
        gap: calc(var(--space) * 1.8);
    }

    .home-quick-links-bar {
        padding-inline: 0;
    }

    .home-quick-link-list {
        flex-direction: column;
        align-items: stretch;
    }

    .home-quick-link-list .action-link {
        width: 100%;
    }
}

body.profile-body-background {
    background-color: #141619;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.site-compat-warning {
    width: min(1120px, calc(100% - (var(--space) * 2)));
    margin: var(--space) auto 0;
    padding: calc(var(--space) * 0.75) var(--space);
    border-radius: 10px;
    border: 1px solid rgba(236, 123, 123, 0.6);
    background: rgba(122, 54, 54, 0.2);
    color: #ffd1d1;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.site-compat-warning.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-compat-warning-message {
    text-align: left;
}

.site-compat-warning-dismiss {
    margin-left: auto;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 198, 198, 0.65);
    background: rgba(128, 44, 44, 0.35);
    color: #ffdede;
    font-size: 1.15rem;
    line-height: 1;
}

.site-compat-warning-dismiss:hover {
    background: rgba(150, 55, 55, 0.45);
    border-color: rgba(255, 220, 220, 0.85);
}

.site-compat-warning-dismiss:focus-visible {
    outline: 2px solid rgba(255, 214, 214, 0.7);
    outline-offset: 2px;
}

.weather-page {
    max-width: 1100px;
}

.weather-shell {
    gap: var(--space);
}

.weather-top-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
}

.weather-unit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #dce7f5;
    font-weight: 700;
}

.weather-unit-option {
    font-size: 0.9rem;
}

.weather-unit-switch {
    position: relative;
    width: 46px;
    height: 24px;
    display: inline-flex;
    align-items: center;
}

.weather-unit-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.weather-unit-knob {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 1px solid rgba(151, 174, 205, 0.6);
    background: #2c3f55;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    transition: background 180ms ease, border-color 180ms ease;
}

.weather-unit-knob::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #eef5ff;
    transition: transform 180ms ease;
}

.weather-unit-switch input:checked + .weather-unit-knob {
    background: #5a7ea8;
    border-color: rgba(184, 214, 255, 0.7);
}

.weather-unit-switch input:checked + .weather-unit-knob::after {
    transform: translateX(22px);
}

.weather-unit-switch input:focus-visible + .weather-unit-knob {
    outline: 2px solid rgba(172, 210, 255, 0.75);
    outline-offset: 2px;
}

.weather-location-line,
.weather-updated {
    color: #cfd8e2;
}

.weather-hero {
    display: flex;
    align-items: center;
    gap: var(--space);
}

.weather-hero-symbol {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 1;
}

.weather-current-main {
    display: flex;
    align-items: baseline;
    gap: calc(var(--space) * 0.75);
    flex-wrap: wrap;
}

.weather-current-temp {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #eef5ff;
}

.weather-current-condition {
    font-size: 1.05rem;
    color: #dce7f5;
}

.weather-current-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space);
}

.weather-metric-card,
.weather-forecast-card {
    background: #252525;
    border: 1px solid #3f3f3f;
    border-radius: 10px;
    padding: var(--space);
}

.weather-metric-card h3,
.weather-forecast-card h3 {
    margin-bottom: 0.35rem;
}

.weather-metric-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.weather-metric-card p {
    font-size: 1.05rem;
    color: #e6edf8;
}

.weather-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space);
}

.weather-forecast-symbol {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.weather-forecast-condition {
    color: #dce7f5;
}

.weather-forecast-temps {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    color: #e7f0fb;
}

.weather-forecast-rain {
    color: #cbd9ea;
}

#topBar {
    padding: 0;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(18, 21, 26, 0.94), rgba(13, 16, 21, 0.9));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.topbar-inner {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 54px;
}

#topBar #userLinks{
    margin-left: auto;
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#topBar #homeLink {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    min-width: 0;
    align-self: stretch;
    padding: 0 18px;
    border-width: 0 1px;
    border-radius: 0;
    border-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
}

#topBar #homeLink:hover {
    border-color: rgba(142, 164, 191, 0.32);
    background: rgba(142, 164, 191, 0.08);
}

#topBar .topbar-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    overflow: hidden;
}

#topBar .topbar-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

.topbar-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbar-brand-copy strong {
    color: #eef3fa;
    font-size: 0.98rem;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.topbar-brand-copy small {
    color: #98a7b8;
    font-size: 0.74rem;
    line-height: 1.2;
    white-space: nowrap;
}

#topBar .topbar-link {
    min-height: 100%;
    align-self: stretch;
    padding: 0 16px;
    border-width: 0 1px;
    border-radius: 0;
}

#topBar .topbar-link-muted {
    color: #dbe5ef;
}

#topBar .topbar-link-primary {
    border-color: rgba(133, 174, 233, 0.58);
    background: linear-gradient(180deg, rgba(76, 105, 149, 0.34), rgba(53, 75, 110, 0.28));
}

#topBar .topbar-link-primary:hover {
    background: linear-gradient(180deg, rgba(92, 124, 175, 0.42), rgba(63, 88, 129, 0.36));
}

#topBar .topbar-link-admin {
    border-color: rgba(227, 196, 105, 0.42);
    color: #f0e3b6;
    background: linear-gradient(180deg, rgba(92, 75, 28, 0.28), rgba(58, 46, 18, 0.22));
}

#topBar .topbar-link-admin:hover {
    background: linear-gradient(180deg, rgba(115, 94, 35, 0.34), rgba(72, 57, 22, 0.28));
}

#topBar .topbar-user-link {
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    text-align: left;
    min-width: 0;
    max-width: 260px;
}

#topBar .topbar-user-label {
    color: #91a0af;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#topBar .topbar-user-name {
    color: #eef3fa;
    font-size: 0.92rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#topBar .topbar-user-avatar {
    width: 32px;
    height: 32px;
    border-color: rgba(142, 164, 191, 0.34);
    background: rgba(18, 24, 31, 0.92);
}

#topBar .topbar-user-avatar .profile-avatar-fallback {
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.06em;
}

form{
    background: var(--surface-elevated-2);
    margin: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    max-width: 600px;
}
form h1{
    padding: var(--space);
    background: #2d3137;
    border-bottom: var(--border-color) solid 1px;
    border-radius: 5px 5px 0px 0px;
}
form p{
    padding-left: var(--space);
}
form .row{
    padding-left: var(--space);
    display: flex;
    flex-direction: row;
    gap: var(--space);
    width: 100%;
    align-items: center;
}
form .row span{
    min-width: 150px;
    text-align: right;
}
form .row #status{
    color: orange;
    border-left: yellow solid 2px;
    padding-left: var(--space);
}

input{
    padding: var(--space);
    background: #2a2e34;
    border: 1px solid #424850;
    border-radius: 10px;
    color: #fff;
    max-width: 500px;
    min-width: 300px;
}

select {
    appearance: none;
    padding: var(--space) var(--space) var(--space) var(--space);
    background-color: #2a2e34;
    background-image:
        linear-gradient(45deg, transparent 50%, #bcd7ff 50%),
        linear-gradient(135deg, #bcd7ff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    border: 1px solid #424850;
    border-radius: 10px;
    color: #eef3fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

select:hover {
    border-color: #596674;
}

select:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
    border-color: #7ba2d6;
}

select option {
    background: #1f242b;
    color: #eef3fa;
}
button, input[type="submit"], .action-link, #topBar a{
    appearance: none;
    border: 1px solid var(--button-border);
    background: var(--button-bg);
    color: var(--button-text);
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space);
    min-height: 34px;
    padding: var(--space) var(--space);
    border-radius: 8px;
    box-shadow: none;
    letter-spacing: 0.01em;
    font-size: 0.9rem;
}

button, input[type="submit"]{
    max-width: none;
    align-self: flex-end;
    margin-left: auto;
}

button:hover, input[type="submit"]:hover, .action-link:hover, #topBar a:hover{
    background: var(--button-bg-hover);
    border-color: var(--primary-color-hover);
    transform: translateY(0);
    box-shadow: var(--button-shadow-hover);
}

button:active, input[type="submit"]:active, .action-link:active, #topBar a:active{
    background: var(--button-bg-active);
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

button:focus-visible, input[type="submit"]:focus-visible, .action-link:focus-visible, #topBar a:focus-visible, .form-link:focus-visible {
    outline: 2px solid rgba(159, 197, 255, 0.85);
    outline-offset: 2px;
}

.form-link {
    color: var(--primary-color-hover);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.18s ease;
}

.form-link:hover {
    color: #d6e7ff;
    text-decoration: underline;
}

.auth-shell {
    width: min(100%, 720px);
    margin: var(--space) auto;
    padding: 0 var(--space);
}

.auth-card {
    background: var(--surface-elevated-2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.auth-header {
    padding: var(--space) var(--space) var(--space);
    background: #2a2e34;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-header h1 {
    margin-bottom: var(--space);
}

.auth-header p {
    color: #cfd6df;
    line-height: 1.5;
}

.auth-form {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin: 0;
    max-width: none;
    padding: var(--space);
    gap: var(--space);
}

.auth-fields {
    display: grid;
    gap: var(--space);
}

.auth-field {
    display: grid;
    gap: var(--space);
}

.auth-field span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e4ebf3;
}

.auth-checkbox-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    color: #d2dbe5;
    line-height: 1.5;
}

.auth-checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.auth-checkbox-field .form-link {
    display: inline;
}

.auth-form input {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.auth-status-row {
    min-height: 24px;
}

.auth-status {
    display: block;
    color: orange;
    border-left: yellow solid 2px;
    padding-left: var(--space);
    line-height: 1.4;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
    justify-content: flex-end;
}

.auth-actions button,
.auth-actions input[type="submit"] {
    margin-left: 0;
    align-self: auto;
    max-width: none;
    min-width: min(220px, 100%);
}

.auth-actions-split > * {
    flex: 1 1 220px;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space) var(--space);
    justify-content: space-between;
    padding: 0 var(--space) var(--space);
}

.auth-links .form-link {
    display: inline-flex;
    align-items: center;
}

.timeline-page {
    --timeline-item-surface: rgba(12, 18, 24, 0.72);
    --timeline-item-border: 1px solid rgba(255, 255, 255, 0.06);
    --timeline-item-radius: 14px;
    width: min(100%, 1680px);
    max-width: 1680px;
    margin: var(--space) auto;
    padding-inline: clamp(12px, 3vw, 40px);
    box-sizing: border-box;
    display: grid;
    gap: calc(var(--space) * 1.8);
    overflow-x: clip;
}

.timeline-page-heading {
    align-items: flex-end;
}

.timeline-header-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.timeline-inspector-controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-scale-control {
    min-width: min(320px, 100%);
    display: grid;
    gap: 8px;
}

.timeline-scale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #adbac8;
}

.timeline-scale-header strong {
    color: #eef3fa;
}

.timeline-scale-bar {
    width: 100%;
    margin: 0;
    accent-color: #7ba2d6;
}

.timeline-scale-marks {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.timeline-scale-mark {
    text-align: center;
    font-size: 0.76rem;
    color: #8ea1b5;
    transition: color 160ms ease;
}

.timeline-scale-mark.is-active {
    color: #eef3fa;
}

.timeline-inspector-controls .action-link.is-active {
    background: rgba(94, 234, 212, 0.16);
    border-color: rgba(94, 234, 212, 0.4);
}

.timeline-day-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.timeline-date-label,
.timeline-field {
    display: grid;
    gap: 8px;
    color: #adbac8;
}

.timeline-date-label input,
.timeline-field input,
.timeline-field textarea,
.timeline-field select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 15, 20, 0.75);
    color: #eef3fa;
}

.timeline-field textarea {
    resize: vertical;
    min-height: 88px;
}

.timeline-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: calc(var(--space) * 1.8);
    min-width: 0;
    align-items: start;
}

.timeline-main {
    min-width: 0;
}

.timeline-sidebar {
    min-width: 0;
}

.timeline-sidebar-panel {
    position: sticky;
    top: 82px;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.timeline-panel,
.timeline-panel.profile-card {
    display: grid;
    gap: calc(var(--space) * 1.25);
}

.timeline-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space);
}

.timeline-panel-header > div {
    display: grid;
    gap: 4px;
}

.timeline-panel-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #f0f5fb;
}

.timeline-panel-header p {
    margin: 0;
    color: #9eb0c2;
}

.timeline-category-item,
.timeline-recent-item {
    border-radius: var(--timeline-item-radius);
    border: var(--timeline-item-border);
    background: var(--timeline-item-surface);
}

.timeline-form {
    display: grid;
    gap: 12px;
}

.timeline-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.timeline-form-note {
    margin: -2px 0 0;
    color: #efb0b0;
    font-size: 0.86rem;
}

.timeline-field-inline {
    align-items: center;
}

.timeline-category-list {
    display: grid;
    gap: 10px;
}

.timeline-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.timeline-category-item.is-selected {
    border-color: rgba(123, 162, 214, 0.45);
    background: rgba(22, 31, 41, 0.86);
}

.timeline-category-item-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.timeline-category-item-copy > div,
.timeline-recent-item-copy > div,
.timeline-recent-item-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.timeline-category-item-copy strong,
.timeline-row-title strong {
    color: #eef3fa;
}

.timeline-category-item-copy span,
.timeline-row-meta span {
    color: #91a3b6;
    font-size: 0.9rem;
}

.timeline-category-swatch {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.timeline-category-swatch svg {
    display: block;
    width: 12px;
    height: 12px;
}

.timeline-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-inline-action {
    min-height: 36px;
    padding: 8px 12px;
}

.timeline-status {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 26, 0.72);
}

.timeline-status[data-kind="error"] {
    border-color: rgba(194, 103, 103, 0.45);
    color: #f2b4b4;
}

.timeline-status[data-kind="success"] {
    border-color: rgba(84, 183, 134, 0.45);
    color: #b7efc8;
}

.timeline-board-shell {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.timeline-recent-list {
    display: grid;
    align-content: start;
    gap: 10px;
    grid-auto-rows: max-content;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 4px;
}

.timeline-recent-item {
    width: 100%;
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    text-align: left;
    color: #eef3fa;
}

.timeline-recent-item:hover {
    border-color: rgba(123, 162, 214, 0.38);
    background: rgba(21, 29, 38, 0.88);
}

.timeline-recent-item.is-selected {
    border-color: rgba(123, 162, 214, 0.52);
    background: rgba(24, 34, 45, 0.94);
}

.timeline-recent-item-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.timeline-recent-item-copy strong,
.timeline-recent-item-meta strong {
    color: #eef3fa;
    font-weight: 600;
}

.timeline-recent-item-copy span,
.timeline-recent-item-meta span {
    color: #91a3b6;
    font-size: 0.88rem;
}

.timeline-recent-footer {
    display: flex;
    justify-content: center;
    padding: 2px 0 10px;
}

.timeline-recent-footer-text {
    color: #91a3b6;
    font-size: 0.82rem;
}

.timeline-flyout-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(4, 7, 11, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 39;
}

.timeline-flyout-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.timeline-flyout {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transform: translateX(100%);
    transition: transform 220ms ease;
    z-index: 40;
    pointer-events: none;
}

.timeline-flyout.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.timeline-flyout-panel {
    width: 100%;
    max-height: min(720px, calc(100vh - 36px));
    overflow: auto;
    align-content: start;
}

.timeline-flyout-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-bottom: 12px;
    background: inherit;
}

.timeline-flyout-close {
    min-height: 36px;
}

.timeline-main .timeline-panel {
    min-height: 0;
    height: auto;
    align-content: start;
}

.timeline-hour-header {
    display: grid;
    grid-template-columns: 180px minmax(960px, 1fr);
    gap: 0;
    align-items: end;
}

.timeline-hour-track {
    position: relative;
    min-width: 960px;
}

.timeline-hour-track--day-zoom-hourly {
    min-width: 2880px;
}

.timeline-hour-track--day-zoom-6-hours {
    min-width: 1920px;
}

.timeline-hour-track--day-zoom-12-hours {
    min-width: 1440px;
}

.timeline-hour-track--day-zoom-full-day {
    min-width: 960px;
}

.timeline-hour-svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.timeline-hour-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.timeline-hour-text {
    fill: #91a3b6;
    font-size: 18px;
    dominant-baseline: middle;
}

.timeline-hour-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

.timeline-hour-labels--segments {
    display: grid;
    align-items: center;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
}

.timeline-hour-label {
    color: #91a3b6;
    font-size: 18px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.timeline-rows {
    display: grid;
    gap: 14px;
}

.timeline-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
}

.timeline-row-meta {
    position: relative;
    display: grid;
    align-content: center;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(17, 22, 29, 0.9), rgba(12, 17, 23, 0.94));
}

.timeline-row-meta-dye {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.timeline-row-meta-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    padding: 10px 14px;
}

.timeline-row-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-lane {
    position: relative;
    min-width: 960px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(17, 22, 29, 0.88), rgba(12, 17, 23, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 0;
    overflow: hidden;
}

.timeline-lane--day-zoom-hourly {
    min-width: 2880px;
}

.timeline-lane--day-zoom-6-hours {
    min-width: 1920px;
}

.timeline-lane--day-zoom-12-hours {
    min-width: 1440px;
}

.timeline-lane--day-zoom-full-day {
    min-width: 960px;
}

.timeline-grid-line {
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 1;
}

.timeline-now-line {
    stroke: rgba(255, 108, 108, 0.96);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.timeline-now-header-badge {
    fill: rgba(91, 16, 16, 0.78);
    stroke: rgba(255, 113, 113, 0.48);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.timeline-now-header-text {
    fill: #ffd7d7;
    font-size: 10px;
    font-weight: 700;
    dominant-baseline: middle;
    pointer-events: none;
}

.timeline-row-dye,
.timeline-row-dye-accent {
    pointer-events: none;
}

.timeline-svg {
    display: block;
    width: 100%;
}

.timeline-entry-group {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.timeline-entry-group:hover .timeline-entry-rect {
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.22)) saturate(1.08) brightness(1.04);
}

.timeline-entry-group.is-dragging {
    cursor: grabbing;
}

.timeline-entry-group.is-draft {
    cursor: default;
    pointer-events: none;
}

.timeline-entry-group.is-draft .timeline-entry-rect {
    opacity: 0.42;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.16));
}

.timeline-entry-group.is-draft .timeline-entry-outline {
    stroke: rgba(255, 255, 255, 0.72);
    stroke-width: 2;
    stroke-dasharray: 6 4;
}

.timeline-entry-group.is-draft .timeline-entry-accent,
.timeline-entry-group.is-draft .timeline-entry-sheen {
    opacity: 0.45;
}

.timeline-entry-group.is-selected .timeline-entry-rect {
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.28)) saturate(1.1) brightness(1.06);
}

.timeline-entry-group.is-selected .timeline-entry-outline {
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 2;
}

.timeline-entry-group.is-dragging .timeline-entry-outline {
    stroke: rgba(255, 255, 255, 0.76);
}

.timeline-entry-rect {
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18));
    transition: filter 180ms ease;
}

.timeline-entry-outline {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 1;
    pointer-events: none;
}

.timeline-entry-accent {
    fill: rgba(255, 255, 255, 0.58);
    opacity: 0.88;
    pointer-events: none;
}

.timeline-entry-sheen {
    fill: rgba(255, 255, 255, 0.16);
    opacity: 0.7;
    pointer-events: none;
}

.timeline-entry-edge {
    fill: rgba(255, 255, 255, 0.001);
    pointer-events: all;
}

.timeline-entry-edge--start,
.timeline-entry-edge--end {
    cursor: ew-resize;
}

.timeline-entry-text {
    font-size: 0.82rem;
    fill: rgba(248, 251, 255, 0.82);
    dominant-baseline: hanging;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.timeline-entry-text-title {
    font-weight: 400;
    fill: rgba(255, 255, 255, 0.97);
}

.timeline-entry-text-subtitle {
    font-size: 0.82rem;
    font-weight: 400;
    fill: rgba(235, 242, 251, 0.72);
}

.timeline-entry-context-menu {
    position: fixed;
    z-index: 45;
    min-width: 220px;
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(123, 162, 214, 0.32);
    background: rgba(8, 13, 19, 0.96);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
}

.timeline-entry-context-menu .task-remove-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
}

.timeline-entry-context-menu-title {
    margin: 0;
    color: #eef3fa;
    font-size: 0.92rem;
    font-weight: 700;
}

.timeline-entry-context-menu-btn {
    width: 100%;
    justify-content: center;
}

.timeline-empty,
.timeline-empty-state,
.timeline-row-empty {
    color: #91a3b6;
}

.timeline-empty-state {
    padding: 24px;
    border-radius: 16px;
    background: rgba(12, 18, 24, 0.72);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.timeline-row-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.timeline-summary-grid {
    display: grid;
    gap: 12px;
}

.timeline-summary-grid-week {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
}

.timeline-summary-grid-month {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.timeline-summary-grid-year {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.timeline-summary-grid-years {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.timeline-summary-card {
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(17, 22, 29, 0.82);
    color: #e7edf5;
    padding: 14px;
    display: grid;
    gap: 8px;
    cursor: pointer;
}

.timeline-summary-card:hover {
    border-color: rgba(123, 162, 214, 0.4);
    background: rgba(22, 31, 41, 0.88);
}

.timeline-summary-card.is-muted {
    opacity: 0.55;
}

.timeline-summary-card-title {
    font-weight: 700;
}

.timeline-summary-card-count {
    color: #9bb0c5;
    font-size: 0.9rem;
}

.timeline-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.timeline-summary-list li {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(11, 15, 20, 0.52);
}

.timeline-summary-list li span,
.timeline-summary-empty {
    color: #9bb0c5;
    font-size: 0.88rem;
}

body.timeline-is-dragging,
body.timeline-is-dragging * {
    user-select: none;
}

@media (max-width: 980px) {
    .timeline-shell {
        grid-template-columns: 1fr;
    }

    .timeline-sidebar-panel {
        position: static;
        max-height: none;
    }

    .timeline-summary-grid-week,
    .timeline-summary-grid-month,
    .timeline-summary-grid-year,
    .timeline-summary-grid-years {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {
    .timeline-flyout {
        width: 100vw;
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        margin: var(--space) auto;
        padding: 0 var(--space);
    }

    .auth-header,
    .auth-form,
    .auth-links {
        padding-left: var(--space);
        padding-right: var(--space);
    }

    .auth-actions {
        justify-content: stretch;
    }

    .auth-actions > * {
        width: 100%;
        min-width: 0;
    }

    .auth-links {
        flex-direction: column;
    }
}

.tasks-page {
    width: min(1100px, calc(100% - 30px));
    margin: var(--space) auto;
    background: var(--surface-elevated-2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.tasks-page h1 {
    font-size: 1.6rem;
}

.tasks-page .page-header-row p {
    margin-top: 6px;
    color: #c7d0db;
}

.tasks-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space);
    align-items: start;
}

.tasks-main-column,
.tasks-tag-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.tasks-tag-column {
    min-width: 0;
}

.tasks-tag-panel {
    padding: calc(var(--space) * 1.1);
    border-radius: 14px;
    border: 1px solid rgba(76, 85, 96, 0.72);
    background: rgba(17, 22, 29, 0.68);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.tasks-tag-panel-copy p {
    margin-top: 6px;
    color: #c7d0db;
}

.policy-page {
    gap: var(--space);
}

.policy-card {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: calc(var(--space) * 1.5);
    border-radius: 16px;
    border: 1px solid rgba(76, 85, 96, 0.72);
    background: rgba(17, 22, 29, 0.68);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.policy-card h2 {
    color: #f0f5fb;
    font-size: 1.1rem;
}

.policy-card p {
    color: #c8d4e0;
    line-height: 1.6;
}

.policy-meta {
    color: #9fb0c2;
    font-size: 0.95rem;
}

.policy-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.policy-list {
    padding-left: 1.5rem;
    color: #c8d4e0;
    line-height: 1.6;
}

.tasks-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: var(--space);
    align-items: center;
}

.tasks-entry #taskInput,
.tasks-tag-entry #taskTagInput,
.tasks-entry #taskTagSelect {
    max-width: none;
    min-width: 0;
    width: 100%;
}

.tasks-entry #addTaskBtn,
.tasks-tag-entry #addTaskTagBtn {
    margin-left: 0;
    align-self: auto;
}

.tasks-page #status {
    color: orange;
    min-height: 1.25rem;
}

.home-feed-header p {
    color: #c7d0db;
    margin-top: var(--space);
}

.home-feed-page {
    background: transparent;
    border: 0;
    padding: var(--space) 0 0;
    gap: var(--space);
    width: calc(100% - (var(--space) * 2));
    max-width: none;
    margin: var(--space) var(--space) 0;
}

.home-feed-header {
    padding: 0 var(--space);
}

.home-feed-header h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    letter-spacing: -0.02em;
}

.home-feed-header p {
    max-width: 42rem;
    color: #cfd8e2;
}

.home-feed-main > #status,
.home-feed-main > .profile-posts-empty,
.home-feed-main > .profile-posts-list {
    margin-inline: var(--space);
}

.home-feed-columns {
    display: flex;
    justify-content: center;
    gap: 0;
    align-items: start;
    width: 100%;
}

.home-feed-main {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    flex: 1 1 980px;
    min-width: 0;
    width: 100%;
    max-width: 980px;
}

.home-feed-sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 min(320px, 100%);
    gap: var(--space);
    position: static;
}

.home-online-card {
    padding: calc(var(--space) * 1.1);
    position: static;
}

.home-online-card h3 {
    margin: 0;
}

.home-online-card p {
    margin: 6px 0 0;
    color: #c4ceda;
}

.home-online-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: var(--space);
}

.home-online-user {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.home-online-user:hover {
    border-color: rgba(120, 187, 255, 0.45);
    background: rgba(120, 187, 255, 0.12);
}

.home-online-user-name {
    color: #eef3fa;
    font-weight: 600;
    line-height: 1.2;
}

.home-online-user-meta,
.home-online-empty {
    color: #aeb8c4;
    font-size: 0.88rem;
}

.home-online-empty {
    margin: 0;
    padding: 8px 2px;
}

@media (max-width: 980px) {
    .home-feed-columns {
        flex-direction: column;
    }

    .home-online-card {
        position: static;
    }

    .home-feed-sidebar {
        position: static;
        flex: 1 1 auto;
    }
}

.home-quick-links-bar {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(21, 24, 29, 0.92);
    backdrop-filter: blur(12px);
}

.home-quick-link-list {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
    min-height: 42px;
}

.home-quick-link-list .action-link {
    margin-left: 0;
    align-self: stretch;
    min-width: 42px;
    max-width: 42px;
    min-height: 100%;
    padding: 0;
    gap: 0;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    border-width: 0 1px;
    border-radius: 0;
    transition: max-width 240ms ease, gap 200ms ease, padding 200ms ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-quick-link-list .action-link > span:not(.home-quick-link-icon) {
    max-width: 0;
    opacity: 0;
    transform: translateX(-6px);
    overflow: hidden;
    transition: max-width 220ms ease, opacity 180ms ease, transform 220ms ease;
}

.home-quick-link-list .action-link:hover,
.home-quick-link-list .action-link:focus-visible {
    max-width: 180px;
    padding: 0 14px;
    gap: var(--space);
    justify-content: flex-start;
}

.home-quick-link-list .action-link:hover > span:not(.home-quick-link-icon),
.home-quick-link-list .action-link:focus-visible > span:not(.home-quick-link-icon) {
    max-width: 120px;
    opacity: 1;
    transform: translateX(0);
}

.home-quick-link-icon {
    display: inline-grid;
    place-items: center;
    width: 1rem;
    font-size: 0.92rem;
    line-height: 1;
    flex: 0 0 auto;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.tasks-list p {
    padding-left: 0;
}

.tasks-tag-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space);
    align-items: center;
}

.tasks-tag-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.task-tag-item.is-active {
    border-color: rgba(120, 187, 255, 0.42);
    background: rgba(120, 187, 255, 0.12);
}

.task-tag-item.is-system {
    justify-content: flex-start;
}

.task-tag-focus-btn {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.task-tag-item.is-system .task-tag-focus-btn {
    width: 100%;
}

.task-tag-focus-btn:focus-visible .task-tag-pill,
.task-tag-focus-btn:hover .task-tag-pill,
.task-tag-item.is-active .task-tag-pill {
    border-color: rgba(120, 187, 255, 0.54);
    background: rgba(120, 187, 255, 0.24);
}

.task-tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(93, 147, 214, 0.18);
    border: 1px solid rgba(93, 147, 214, 0.34);
    color: #d9ebff;
    font-size: 0.82rem;
    line-height: 1;
}

.task-tag-pill--task {
    flex: 0 0 auto;
}

.task-tag-pill.is-muted {
    background: rgba(118, 128, 142, 0.14);
    border-color: rgba(118, 128, 142, 0.28);
    color: #c6d0db;
}

.task-tag-remove-btn {
    margin-left: auto;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(194, 103, 103, 0.35);
    background: rgba(85, 24, 24, 0.58);
    color: #f6d5d5;
    cursor: pointer;
}

.task-tag-remove-btn:hover {
    background: rgba(102, 29, 29, 0.7);
}

.task-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: var(--space);
    align-items: center;
    padding: var(--space) var(--space);
    background: #282c31;
    border: 1px solid #3b4047;
    border-radius: 10px;
    cursor: grab;
    user-select: none;
}

.task-item:hover {
    border-color: var(--primary-color);
    background: #2d3238;
}

.task-item.is-dragging {
    opacity: 0.55;
}

.task-item.is-filtered-view {
    cursor: default;
}

.task-item.is-filtered-view .task-grab {
    opacity: 0.45;
}

.task-item.drop-target {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color) inset;
}

.task-grab {
    color: var(--primary-color);
    letter-spacing: 1px;
    font-weight: 700;
}

.task-check {
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.task-text {
    text-align: left;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.task-text-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.task-text-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-meta {
    font-size: 0.82rem;
    color: #9fb1c8;
}

.task-item.is-done .task-text {
    opacity: 0.75;
    text-decoration: line-through;
}

.task-remove-btn {
    margin-left: auto;
    align-self: center;
    max-width: none;
    min-height: 36px;
    padding: var(--space) var(--space);
    background: var(--button-danger-bg);
    border-color: var(--button-danger-border);
    color: var(--button-danger-text);
}

.task-remove-btn:hover {
    background: var(--button-danger-bg-hover);
}

.notes-page {
    width: min(1180px, calc(100% - 30px));
    margin: var(--space) auto;
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.notes-page-heading {
    align-items: flex-end;
}

.notes-page-heading p {
    margin-top: 6px;
    color: #c7d0db;
}

.notes-status {
    min-height: 1.25rem;
    color: #9fb1c8;
}

.notes-status[data-kind="error"] {
    color: #efb0b0;
}

.notes-shell {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: var(--space);
    min-height: 620px;
}

.notes-sidebar,
.notes-editor-panel {
    background: var(--surface-elevated-2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.notes-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.notes-sidebar-header {
    padding: calc(var(--space) * 1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notes-sidebar-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
}

.notes-count {
    min-width: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(142, 164, 191, 0.24);
    background: rgba(24, 31, 40, 0.84);
    color: #dce7f4;
    text-align: center;
    font-size: 0.85rem;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--space);
    overflow: auto;
}

.notes-list-empty {
    color: #9fb1c8;
    padding: 4px;
}

.notes-list-item {
    width: 100%;
    max-width: none;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(24, 28, 34, 0.92);
    text-align: left;
}

.notes-list-item:hover,
.notes-list-item:focus-visible,
.notes-list-item.is-active {
    border-color: var(--primary-color);
    background: rgba(31, 38, 47, 0.96);
}

.notes-list-title {
    font-weight: 700;
    color: #eef3fa;
}

.notes-list-preview,
.notes-list-meta,
.notes-subtle {
    color: #9fb1c8;
}

.notes-list-preview {
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.notes-list-meta {
    font-size: 0.8rem;
}

.notes-editor-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: calc(var(--space) * 1.2);
    gap: var(--space);
}

.notes-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.notes-toolbar-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notes-toolbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
}

.editor-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.editor-mode-switch-label {
    color: #b8c6d6;
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 0.16s ease, opacity 0.16s ease;
}

.editor-mode-switch[data-mode="edit"] .editor-mode-switch-label[data-side="edit"],
.editor-mode-switch[data-mode="preview"] .editor-mode-switch-label[data-side="preview"] {
    color: #eef3fa;
}

.editor-mode-switch[data-mode="edit"] .editor-mode-switch-label[data-side="preview"],
.editor-mode-switch[data-mode="preview"] .editor-mode-switch-label[data-side="edit"] {
    opacity: 0.74;
}

.editor-mode-switch-track {
    position: relative;
    width: 58px;
    height: 32px;
    appearance: none;
    border: 1px solid rgba(76, 87, 100, 0.76);
    border-radius: 999px;
    background: rgba(19, 24, 30, 0.82);
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.editor-mode-switch-track:focus-visible {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 2px;
}

.editor-mode-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dbe5ef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.editor-mode-switch[data-mode="preview"] .editor-mode-switch-track {
    background: rgba(123, 162, 214, 0.26);
    border-color: rgba(123, 162, 214, 0.6);
}

.editor-mode-switch[data-mode="preview"] .editor-mode-switch-track::after {
    transform: translateX(26px);
    background: #eef3fa;
}

.editor-mode-switch-track:disabled {
    cursor: default;
    opacity: 0.68;
}

.notes-body-panel {
    display: flex;
    flex-direction: column;
}

.notes-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    border: 1px dashed rgba(142, 164, 191, 0.22);
    border-radius: 14px;
    color: #9fb1c8;
    background: rgba(16, 20, 25, 0.45);
}

.notes-editor {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    flex: 1 1 auto;
    min-height: 0;
}

.notes-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notes-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
}

.notes-field-counter {
    color: #9fb1c8;
    font-size: 0.85rem;
}

.notes-field-counter.is-near-limit {
    color: #f0d48a;
}

.notes-field-counter.is-at-limit {
    color: #efb0b0;
}

.notes-field-grow {
    flex: 1 1 auto;
    min-height: 0;
}

.notes-field input,
.notes-field textarea {
    width: 100%;
    max-width: none;
}

.notes-field input {
    background: rgba(27, 31, 37, 0.92);
    border: 1px solid rgba(90, 103, 117, 0.92);
    color: #eef3fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.notes-field input::placeholder,
.notes-field textarea::placeholder {
    color: #8e9aa7;
}

.notes-field input:focus,
.notes-field textarea:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
    border-color: #7ba2d6;
}

.notes-field textarea {
    min-height: 420px;
    flex: 1 1 auto;
    resize: none;
    font: inherit;
    line-height: 1.5;
    padding: var(--space) var(--space);
    border-radius: 10px;
    border: 1px solid rgba(90, 103, 117, 0.92);
    background: rgba(27, 31, 37, 0.92);
    color: #eef3fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
}

.notes-rich-text-toolbar,
.profile-post-editor-toolbar {
    margin-bottom: 8px;
}

.notes-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(76, 87, 100, 0.76);
    border-radius: 14px;
    background: rgba(18, 23, 29, 0.62);
}

.notes-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.notes-body-preview {
    min-height: 120px;
}

.profile-showcase {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(91, 109, 129, 0.85);
    min-height: 220px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

.profile-showcase-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.profile-showcase-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 17, 24, 0.18), rgba(11, 17, 24, 0.72)),
        linear-gradient(90deg, rgba(11, 17, 24, 0.2), rgba(11, 17, 24, 0.08));
}

.profile-showcase-surface {
    position: relative;
    z-index: 1;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    padding: var(--space);
}

.profile-header-row {
    align-items: center;
    width: 100%;
}

.profile-shell {
    width: min(1100px, calc(100% - 30px));
    margin: var(--space) auto;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: var(--space);
    align-items: start;
}

.profile-main-column,
.profile-side-column {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    min-width: 0;
}

.profile-card {
    width: 100%;
    margin: 0;
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
    background: rgba(21, 24, 30, 0.58);
    border: 1px solid rgba(109, 122, 138, 0.5);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
}

.profile-card h1 {
    font-size: 1.6rem;
}

.profile-page {
    min-width: 0;
}

.profile-page #status {
    color: orange;
    min-height: 1.25rem;
}

.profile-panel {
    min-width: 0;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: var(--space);
    min-width: 0;
}

.profile-title-block {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    min-width: 0;
}

.profile-title-row {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
    min-width: 0;
}

.profile-title-row h1 {
    margin: 0;
}

.standalone-post-page-title-link {
    display: inline-block;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.2;
}

.standalone-home-host-card {
    margin-bottom: var(--space);
}

.standalone-post-avatar-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.profile-custom-status-row {
    min-height: 1.4rem;
}

.profile-custom-status-display,
.profile-custom-status-input {
    font: inherit;
    font-size: 0.96rem;
    line-height: 1.4;
}

.profile-custom-status-display {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: none;
    color: #c7d0db;
    text-align: left;
    max-width: min(100%, 420px);
    overflow-wrap: anywhere;
}

.profile-custom-status-display:not(:disabled) {
    cursor: text;
}

.profile-custom-status-display:not(:disabled):hover {
    color: #e2ebf7;
}

.profile-custom-status-display:disabled {
    opacity: 1;
    cursor: default;
}

.profile-custom-status-display.is-placeholder {
    color: #8e9aa7;
    font-style: italic;
}

.profile-custom-status-display.is-readonly {
    pointer-events: none;
}

.profile-custom-status-row.is-saving .profile-custom-status-display {
    opacity: 0.74;
}

.profile-custom-status-input {
    width: min(100%, 420px);
    padding: var(--space) var(--space);
    border-radius: 8px;
    border: 1px solid rgba(90, 103, 117, 0.92);
    background: rgba(27, 31, 37, 0.86);
    color: #eef3fa;
}

.profile-custom-status-input:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
    border-color: #7ba2d6;
}

.profile-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    overflow: hidden;
    background: #22272e;
    border: 1px solid #414851;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-large {
    width: 88px;
    height: 88px;
}

.profile-avatar-small {
    width: 30px;
    height: 30px;
}

.profile-avatar-xl {
    width: 120px;
    height: 120px;
}

.profile-avatar-fallback {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary-color-light);
    letter-spacing: 0.04em;
}

.error-page {
    max-width: 760px;
}

.error-card {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.error-card p {
    color: #c7d0db;
    line-height: 1.45;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space);
}

.profile-reactions-item {
    display: grid;
    gap: var(--space);
}

.profile-reaction-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space);
}

.profile-reaction-total-count {
    color: #d7e0ea;
}

.profile-reaction-total-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
}

.profile-reaction-total-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    padding: var(--space) var(--space);
    border-radius: 999px;
    border: 1px solid rgba(90, 103, 117, 0.92);
    background: rgba(27, 31, 37, 0.86);
    color: #dbe5ef;
}

.profile-bio-panel {
    gap: var(--space);
}

.profile-media-panel {
    gap: var(--space);
}

.profile-media-panel[hidden] {
    display: none;
}

.profile-media-player {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    width: 100%;
    max-width: 100%;
    padding: var(--space);
    border-radius: 14px;
    border: 1px solid rgba(90, 103, 117, 0.78);
    background: linear-gradient(180deg, rgba(24, 28, 35, 0.94), rgba(16, 20, 27, 0.98));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.profile-media-player[hidden] {
    display: none;
}

.profile-media-player-controls,
.profile-media-player-timeline {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: nowrap;
}

.profile-media-player-header {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    min-width: 0;
    overflow: hidden;
}

.profile-media-player-controls {
    width: 100%;
}

.profile-media-player-timeline {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    align-items: center;
    column-gap: var(--space);
    row-gap: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.profile-media-player-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    flex: 0 0 auto;
}

.profile-media-player-title {
    color: #eef3fa;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-media-player-subtitle {
    color: #97a6b5;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-media-player-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    margin-left: 0;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(110, 167, 255, 0.55);
    background: linear-gradient(180deg, rgba(64, 94, 140, 0.36), rgba(38, 56, 84, 0.5));
    color: #eef3fa;
    white-space: nowrap;
    flex: 0 0 auto;
}

.profile-media-player-toggle:hover:not(:disabled) {
    border-color: #89b6ff;
    background: linear-gradient(180deg, rgba(78, 112, 165, 0.46), rgba(47, 69, 101, 0.62));
}

.profile-media-player-toggle:disabled {
    opacity: 0.65;
    cursor: default;
}

.profile-media-player-toggle.is-playing .profile-media-player-toggle-icon {
    width: 12px;
    height: 12px;
}

.profile-media-player-toggle-icon {
    position: relative;
    display: inline-block;
    width: 13px;
    height: 13px;
    color: currentColor;
    flex: 0 0 auto;
}

.profile-media-player-toggle-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.profile-media-player-toggle.is-playing .profile-media-player-toggle-icon::before,
.profile-media-player-toggle.is-playing .profile-media-player-toggle-icon::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 999px;
    background: currentColor;
    clip-path: none;
}

.profile-media-player-toggle.is-playing .profile-media-player-toggle-icon::before {
    left: 1px;
    inset: 0 auto 0 1px;
}

.profile-media-player-toggle.is-playing .profile-media-player-toggle-icon::after {
    right: 1px;
}

.profile-media-player-time,
.profile-media-player-volume-value {
    color: #c7d0db;
    font-size: 0.85rem;
    white-space: nowrap;
}

.profile-media-player-time {
    min-width: 2.35rem;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    flex: 0 0 auto;
}

.profile-media-player-volume-value {
    min-width: 2rem;
    text-align: center;
    flex: 0 0 auto;
}

.profile-media-player-volume-control {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.profile-media-player-volume-control::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 44px;
    height: 8px;
}

.profile-media-player-volume-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(110, 167, 255, 0.45);
    background: rgba(29, 37, 50, 0.88);
    color: #eef3fa;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.profile-media-player-volume-trigger:hover,
.profile-media-player-volume-trigger:focus-visible {
    border-color: #89b6ff;
    background: rgba(39, 50, 66, 0.96);
}

.profile-media-player-volume-trigger:focus-visible {
    outline: 2px solid rgba(110, 167, 255, 0.45);
    outline-offset: 2px;
}

.profile-media-player-volume-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% - 2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space);
    padding: var(--space) var(--space);
    border-radius: 16px;
    border: 1px solid rgba(110, 167, 255, 0.28);
    background: rgba(17, 24, 35, 0.96);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
    z-index: 2;
}

.profile-media-player-volume-control:hover .profile-media-player-volume-popover,
.profile-media-player-volume-control:focus-within .profile-media-player-volume-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.profile-media-player-range {
    --player-range-fill: 0%;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(
        90deg,
        #6ea7ff 0%,
        #6ea7ff var(--player-range-fill),
        rgba(61, 71, 84, 0.94) var(--player-range-fill),
        rgba(61, 71, 84, 0.94) 100%
    );
    outline: none;
    align-self: center;
    box-sizing: border-box;
    display: block;
    justify-self: stretch;
}

.profile-media-player-seek-range {
    width: 100%;
    max-width: none;
}

.profile-media-player-range::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(187, 212, 255, 0.95);
    background: #eef3fa;
    box-shadow: 0 0 0 2px rgba(33, 41, 54, 0.8);
    cursor: pointer;
}

.profile-media-player-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(187, 212, 255, 0.95);
    background: #eef3fa;
    box-shadow: 0 0 0 2px rgba(33, 41, 54, 0.8);
    cursor: pointer;
}

.profile-media-player-range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: transparent;
}

.profile-media-player-volume-range {
    width: 14px;
    min-width: 14px;
    max-width: 14px;
    height: 72px;
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    direction: rtl;
    flex: 0 0 auto;
}

.profile-media-player-volume-icon {
    color: #c7d0db;
    font-size: 0.92rem;
    line-height: 1;
}

.profile-bio-panel[hidden] {
    display: none;
}

.profile-bio-panel h2 {
    font-size: 1.05rem;
    color: var(--primary-color-light);
    margin: 0;
}

.profile-bio-content,
.rich-text-content {
    color: #d7e0ea;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-bio-content [data-bio-color="blue"],
.rich-text-content [data-bio-color="blue"] {
    color: #7ba2d6;
}

.profile-bio-content [data-bio-color="coral"],
.rich-text-content [data-bio-color="coral"] {
    color: coral;
}

.profile-bio-content [data-bio-color="gold"],
.rich-text-content [data-bio-color="gold"] {
    color: gold;
}

.profile-bio-content [data-bio-color="green"],
.rich-text-content [data-bio-color="green"] {
    color: #98c379;
}

.profile-bio-content [data-bio-color="violet"],
.rich-text-content [data-bio-color="violet"] {
    color: violet;
}

.profile-bio-content [data-bio-color="light"],
.rich-text-content [data-bio-color="light"] {
    color: #eef3fa;
}

.profile-bio-content > :first-child,
.rich-text-content > :first-child {
    margin-top: 0;
}

.profile-bio-content > :last-child,
.rich-text-content > :last-child {
    margin-bottom: 0;
}

.profile-bio-content p,
.rich-text-content p,
.profile-bio-content h1,
.rich-text-content h1,
.profile-bio-content h2,
.rich-text-content h2,
.profile-bio-content h3,
.rich-text-content h3,
.profile-bio-content h4,
.rich-text-content h4,
.profile-bio-content h5,
.rich-text-content h5,
.profile-bio-content h6,
.rich-text-content h6,
.profile-bio-content ul,
.rich-text-content ul,
.profile-bio-content ol,
.rich-text-content ol,
.profile-bio-content blockquote,
.rich-text-content blockquote,
.profile-bio-content pre,
.rich-text-content pre {
    margin: 0 0 var(--space);
}

.profile-bio-content h1,
.rich-text-content h1,
.profile-bio-content h2,
.rich-text-content h2,
.profile-bio-content h3,
.rich-text-content h3,
.profile-bio-content h4,
.rich-text-content h4,
.profile-bio-content h5,
.rich-text-content h5,
.profile-bio-content h6,
.rich-text-content h6 {
    line-height: 1.2;
    color: #f1f6fc;
}

.profile-bio-content h1,
.rich-text-content h1 {
    font-size: 1.6rem;
}

.profile-bio-content h2,
.rich-text-content h2 {
    font-size: 1.4rem;
}

.profile-bio-content h3,
.rich-text-content h3 {
    font-size: 1.22rem;
}

.profile-bio-content h4,
.rich-text-content h4 {
    font-size: 1.08rem;
}

.profile-bio-content h5,
.rich-text-content h5 {
    font-size: 0.98rem;
}

.profile-bio-content h6,
.rich-text-content h6 {
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-bio-content ul,
.rich-text-content ul,
.profile-bio-content ol,
.rich-text-content ol {
    padding-left: 1.5rem;
    white-space: normal;
}

.profile-bio-content li,
.rich-text-content li {
    margin: 0;
    white-space: normal;
}

.profile-bio-content li + li,
.rich-text-content li + li {
    margin-top: 0.2rem;
}

.profile-bio-content li > ul,
.rich-text-content li > ul,
.profile-bio-content li > ol,
.rich-text-content li > ol {
    margin-top: 0.2rem;
}

.profile-bio-content a,
.rich-text-content a {
    color: #8fc7ff;
}

.profile-bio-content a:hover,
.rich-text-content a:hover {
    color: #b7deff;
}

.profile-bio-content blockquote,
.rich-text-content blockquote {
    padding-left: var(--space);
    border-left: 3px solid rgba(123, 162, 214, 0.55);
    color: #c9d4de;
}

.profile-bio-content hr,
.rich-text-content hr {
    border-top: 1px solid rgba(123, 162, 214, 0.35);
}

.profile-bio-content code,
.rich-text-content code,
.profile-bio-content pre,
.rich-text-content pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: rgba(18, 22, 27, 0.72);
    border-radius: 8px;
}

.profile-bio-content code,
.rich-text-content code {
    padding: var(--space) var(--space);
}

.profile-bio-content pre,
.rich-text-content pre {
    padding: var(--space) var(--space);
    white-space: pre-wrap;
}

.profile-posts-panel {
    gap: var(--space);
}

.profile-posts-panel[hidden] {
    display: none;
}

.profile-posts-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-posts-panel-header h2 {
    font-size: 1.05rem;
    color: var(--primary-color-light);
    margin: 0;
}

.profile-posts-compose-link {
    margin-left: 0;
    align-self: auto;
}

.profile-posts-summary {
    margin: 0;
    color: #9eabb8;
    font-size: 0.92rem;
}

.profile-post-attachment-button,
.profile-post-attachment-remove {
    appearance: none;
    border: 1px solid rgba(90, 103, 117, 0.92);
    border-radius: 999px;
    background: rgba(27, 31, 37, 0.86);
    color: #dbe5ef;
    padding: var(--space) var(--space);
    font: inherit;
    cursor: pointer;
}

.profile-post-attachment-button:hover,
.profile-post-attachment-remove:hover {
    border-color: #7ba2d6;
    color: #eef3fa;
}

.profile-post-attachment-button:disabled,
.profile-post-attachment-remove:disabled {
    opacity: 0.7;
    cursor: default;
}

.profile-post-attachment-hint {
    color: #9eabb8;
    font-size: 0.88rem;
}

.profile-post-attachment-preview {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: var(--space);
    border-radius: 12px;
    border: 1px solid rgba(76, 85, 96, 0.72);
    background: rgba(17, 22, 29, 0.62);
}

.profile-post-attachment-preview[hidden] {
    display: none;
}

.profile-post-attachment-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(11, 17, 24, 0.9);
}

.profile-post-attachment-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-attachment-name {
    color: #d7e0ea;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.profile-post-input {
    min-height: 96px;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
    width: 100%;
    padding: var(--space) var(--space);
    border-radius: 12px;
    border: 1px solid rgba(90, 103, 117, 0.92);
    background: rgba(27, 31, 37, 0.9);
    color: #eef3fa;
    box-sizing: border-box;
}

.profile-post-input::placeholder {
    color: #8e9aa7;
}

.profile-post-input:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
    border-color: #7ba2d6;
}

.profile-post-composer-footer {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-status {
    color: #cbd5e1;
    min-height: 1.2rem;
    flex: 1 1 180px;
}

.profile-post-counter {
    color: #aeb8c4;
    font-size: 0.9rem;
    margin-left: auto;
}

.profile-post-counter.is-limit {
    color: #e4b35f;
}

.profile-post-submit {
    flex-shrink: 0;
}

.profile-posts-empty {
    margin: 0;
    color: #aeb8c4;
}

.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-post-card {
    position: relative;
    overflow: hidden;
    padding: var(--space) var(--space);
    border-radius: 12px;
    border: 1px solid rgba(76, 85, 96, 0.72);
    background: rgba(17, 22, 29, 0.62);
}

.profile-post-card.is-reaction-menu-open {
    overflow: visible;
    z-index: 6;
}

.home-feed-post-card {
    background: rgba(12, 17, 24, 0.76);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.14);
}

.home-feed-post-card-backdrop {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(20px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.92;
    pointer-events: none;
}

.home-feed-post-card-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 12, 18, 0.16), rgba(8, 12, 18, 0.56)),
        rgba(7, 11, 17, 0.28);
}

.home-feed-post-card-surface {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-post-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    margin-bottom: var(--space);
}

.profile-post-card-author-wrap {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    min-width: 0;
}

.profile-post-card-author-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.profile-post-card-author-link:hover .profile-post-card-author {
    color: #dceaff;
}

.profile-post-card-avatar {
    flex-shrink: 0;
}

.profile-post-card-author {
    color: var(--primary-color-light);
    font-weight: 700;
}

.profile-post-card-time {
    color: #9eabb8;
    font-size: 0.88rem;
}

.profile-post-card-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.standalone-post-card-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space);
}

.standalone-post-card-meta {
    width: 100%;
    justify-content: flex-end;
}

.profile-post-card-text {
    margin: 0;
    color: #dbe5ef;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-post-card-text.rich-text-content {
    white-space: normal;
}

.profile-post-reference {
    display: grid;
    gap: 8px;
    margin-top: var(--space);
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(76, 85, 96, 0.76);
    background: rgba(23, 28, 35, 0.78);
}

.profile-post-reference.is-removed {
    border-style: dashed;
    background: rgba(43, 48, 55, 0.4);
}

.profile-post-reference-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-reference-label {
    color: #9eabb8;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-post-reference-link {
    color: var(--primary-color-light);
    font-size: 0.88rem;
    text-decoration: none;
}

.profile-post-reference-link:hover,
.profile-post-reference-link:focus-visible {
    color: #eef3fa;
}

.profile-post-reference-meta {
    margin: 0;
    color: var(--primary-color-light);
    font-size: 0.92rem;
    font-weight: 600;
}

.profile-post-reference-text {
    margin: 0;
    color: #dbe5ef;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-post-card-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space);
    margin-top: var(--space);
    align-items: flex-start;
}

.profile-post-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
    margin-top: var(--space);
    align-items: flex-start;
}

.profile-post-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
    margin-top: var(--space);
}

.profile-post-reaction-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
}

.profile-post-reaction-pill,
.profile-post-reaction-add,
.profile-post-reaction-option {
    appearance: none;
    border: 1px solid rgba(90, 103, 117, 0.92);
    border-radius: 999px;
    background: rgba(27, 31, 37, 0.86);
    color: #dbe5ef;
    font: inherit;
    cursor: pointer;
}

.profile-post-reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    padding: var(--space) var(--space);
}

.profile-post-reaction-pill.is-reacted {
    border-color: rgba(123, 162, 214, 0.92);
    background: rgba(43, 67, 99, 0.42);
}

.profile-post-reaction-add,
.profile-post-reaction-option {
    padding: var(--space) var(--space);
}

.profile-post-reaction-pill:hover:not(:disabled),
.profile-post-reaction-add:hover:not(:disabled),
.profile-post-reaction-option:hover:not(:disabled) {
    border-color: #7ba2d6;
    color: #eef3fa;
}

.profile-post-reaction-pill:disabled,
.profile-post-reaction-add:disabled,
.profile-post-reaction-option:disabled {
    opacity: 0.7;
    cursor: default;
}

.profile-post-reaction-picker-wrap {
    position: relative;
}

.profile-post-reaction-picker {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 7;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
    min-width: 180px;
    max-width: min(calc(100vw - 24px), 320px);
    padding: var(--space);
    border-radius: 12px;
    border: 1px solid rgba(76, 85, 96, 0.88);
    background: rgba(17, 22, 29, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.profile-post-reaction-picker[hidden] {
    display: none;
}

.profile-post-card-remove-button {
    appearance: none;
    border: 1px solid var(--button-danger-border);
    border-radius: 999px;
    background: var(--button-danger-bg);
    color: var(--button-danger-text);
    font: inherit;
    padding: var(--space) var(--space);
    cursor: pointer;
}

.profile-post-card-remove-button:hover:not(:disabled) {
    background: var(--button-danger-bg-hover);
}

.profile-post-card-remove-button.is-armed {
    background: rgba(194, 103, 103, 0.16);
    border-color: rgba(239, 176, 176, 0.72);
}

.profile-post-card-remove-button:disabled {
    opacity: 0.7;
    cursor: default;
}

.profile-post-comments-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-post-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-comments-header h2,
.profile-post-comments-summary,
.profile-post-comments-empty,
.profile-post-comment-login-card p {
    margin: 0;
}

.profile-post-comments-summary,
.profile-post-comments-empty {
    color: #aeb8c4;
}

.profile-post-comment-form {
    gap: var(--space);
}

.profile-post-comment-textarea {
    min-height: 112px;
}

.profile-post-comment-footer {
    align-items: center;
}

.profile-post-comment-footer #postCommentStatus {
    min-height: 1.25rem;
    color: orange;
}

.profile-post-comment-footer button {
    margin-left: auto;
}

.profile-post-comment-login-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
    padding: var(--space);
    border-radius: 12px;
    border: 1px solid rgba(76, 85, 96, 0.72);
    background: rgba(17, 22, 29, 0.48);
}

.profile-post-comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.home-feed-post-comments {
    margin-top: var(--space);
}

.profile-post-comments-load-more-wrap {
    display: flex;
    justify-content: center;
}

.profile-post-comments-load-more {
    text-align: center;
}

.profile-post-comment-card {
    background: rgba(12, 17, 24, 0.58);
}

.profile-post-comment-remove-button {
    padding: 8px 14px;
}

.profile-post-card-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 360px;
    margin-top: 0;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(11, 17, 24, 0.9);
    justify-self: start;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 980px) {
    .profile-shell {
        width: min(1100px, calc(100% - 24px));
    }

    .profile-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-side-column {
        margin-top: 6px;
    }
}

@media (max-width: 640px) {
    .profile-card {
        padding: var(--space);
    }

    .profile-hero {
        align-items: flex-start;
    }

    .profile-grid {
        gap: var(--space);
    }

    .profile-post-composer-footer {
        align-items: flex-start;
    }

    .profile-post-counter {
        margin-left: 0;
    }

    .profile-post-attachment-preview-meta {
        align-items: flex-start;
    }

    .profile-post-editor-preview-meta,
    .profile-posts-panel-header {
        align-items: flex-start;
    }

    .profile-post-reaction-picker {
        position: static;
        min-width: 0;
        width: 100%;
    }
}

.profile-item {
    padding: var(--space) var(--space);
    background: rgba(27, 31, 37, 0.72);
    border: 1px solid rgba(76, 85, 96, 0.78);
    border-radius: 10px;
}

.profile-item strong {
    color: var(--primary-color-light);
}

.profile-presence {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-status-block {
    display: inline-flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-status-meta {
    color: #aeb8c4;
    font-size: 0.9rem;
    line-height: 1.4;
}

.presence-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.presence-active {
    background: #57c26d;
}

.presence-away {
    background: #d1aa4b;
}

.presence-offline {
    background: #5f6873;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    padding: var(--space) var(--space);
    border-radius: 999px;
    border: 1px solid #48515c;
    background: #23272d;
    color: #d6dde6;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.rank-badge-symbol {
    color: #e3c469;
    font-size: 0.9rem;
    line-height: 1;
}

.rank-admin {
    border-color: rgba(227, 196, 105, 0.4);
    color: #f0e3b6;
}

.rank-user {
    color: #c9d1db;
}

.rank-nav-link {
    gap: var(--space);
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
}

.profile-actions .action-link,
.profile-actions button {
    margin-left: 0;
    align-self: auto;
}

.profile-owner-controls-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-owner-controls-copy {
    color: #c7d0db;
    line-height: 1.5;
}

.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space);
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
}

.page-header-row p {
    color: #c7d0db;
    margin-top: var(--space);
}

.profile-edit-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space);
}

.profile-edit-card {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: var(--space) var(--space);
    border: 1px solid #3a4047;
    border-radius: 12px;
    background: #262a2f;
    color: #eef1f5;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.profile-edit-card:hover {
    border-color: var(--primary-color);
    background: #2d3137;
    transform: translateY(-1px);
}

.profile-edit-card.profile-edit-card-danger {
    border-color: rgba(194, 103, 103, 0.24);
}

.profile-edit-card.profile-edit-card-danger strong {
    color: #ffd4d4;
}

.profile-edit-card.profile-edit-card-danger:hover {
    border-color: var(--button-danger-border);
    background: rgba(59, 35, 35, 0.72);
}

.profile-edit-card strong {
    color: var(--primary-color-light);
    font-size: 1rem;
}

.profile-edit-card span {
    color: #b8c1cb;
    line-height: 1.35;
}

.profile-edit-page {
    gap: var(--space);
}

.profile-post-compose-page {
    background: transparent;
    border: 0;
    padding: var(--space) 0 0;
    gap: var(--space);
}

.profile-post-compose-header {
    padding: 0 var(--space);
}

.profile-post-compose-header h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    letter-spacing: -0.02em;
}

.profile-post-compose-header p {
    max-width: 42rem;
    color: #cfd8e2;
}

.profile-avatar-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-avatar-page {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-avatar-overview-card {
    display: flex;
    align-items: center;
    gap: calc(var(--space) * 2);
    padding: calc(var(--space) * 1.5);
    border: 1px solid #3a4047;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(36, 40, 45, 0.96), rgba(28, 32, 37, 0.92));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}

.profile-avatar-overview-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.profile-avatar-overview-copy h2 {
    font-size: 1.2rem;
    color: #eef3fa;
}

.profile-avatar-overview-copy p {
    margin: 0;
    color: #c7d0db;
    line-height: 1.5;
}

.profile-avatar-overview-note {
    color: #9dabb9;
    max-width: 44rem;
}

.profile-background-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-background-page {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-media-editor-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-background-preview {
    min-height: 240px;
}

.profile-background-preview-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}

.profile-background-preview-header {
    display: flex;
    align-items: center;
    gap: var(--space);
}

.profile-avatar-panel-header {
    display: flex;
    align-items: center;
    gap: var(--space);
    padding: var(--space);
    background: #24282d;
    border: 1px solid #3a4047;
    border-radius: 12px;
}

.profile-media-summary-card {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: var(--space);
    background: #24282d;
    border: 1px solid #3a4047;
    border-radius: 12px;
}

.profile-avatar-summary {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-avatar-summary h2 {
    font-size: 1.2rem;
}

.profile-avatar-summary p {
    color: #c7d0db;
    line-height: 1.45;
}

.profile-avatar-editor {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: 0 var(--space);
}

.profile-avatar-upload-form {
    padding-bottom: var(--space);
}

.profile-avatar-upload-fields {
    grid-template-columns: 1fr;
}

.profile-avatar-editor-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    margin: 0 var(--space);
    padding: var(--space);
    border: 1px solid #3a4047;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 34, 39, 0.94), rgba(22, 26, 31, 0.92));
}

.profile-avatar-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space);
}

.profile-avatar-editor-header h3 {
    color: #eef3fa;
    font-size: 1rem;
}

.profile-avatar-editor-header p {
    padding: 0;
    color: #aeb8c4;
}

.profile-avatar-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(220px, 1fr);
    gap: calc(var(--space) * 1.5);
    align-items: stretch;
}

.profile-avatar-editor-layout.is-preview-only {
    grid-template-columns: minmax(0, 1fr);
}

.profile-avatar-crop-stage {
    position: relative;
    width: min(100%, 280px);
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #3a4047;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
    background-position: 0 0, 12px 12px;
    background-size: 24px 24px;
    background-color: #1d2126;
    cursor: grab;
    touch-action: none;
}

.profile-avatar-crop-stage.is-dragging {
    cursor: grabbing;
}

.profile-avatar-crop-stage.is-static {
    cursor: default;
}

.profile-avatar-crop-stage img {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    max-width: none;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.profile-avatar-crop-guide {
    position: absolute;
    inset: 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 999px rgba(5, 10, 16, 0.44);
    pointer-events: none;
}

.profile-avatar-editor-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space);
}

.profile-avatar-preview-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space);
    padding: calc(var(--space) * 1.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(17, 21, 26, 0.72);
    min-height: 100%;
}

.profile-avatar-preview-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-avatar-preview-copy strong {
    color: #eef3fa;
}

.profile-avatar-preview-copy span {
    color: #aeb8c4;
    line-height: 1.45;
}

.profile-avatar-editor-sidebar p {
    margin: 0;
    color: #d1d9e2;
    line-height: 1.45;
}

.profile-avatar-editor-controls {
    padding: 0;
}

.profile-avatar-editor-controls input[type="range"] {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.profile-avatar-editor-footer {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-avatar-editor-footer .profile-background-actions-copy {
    color: #aeb8c4;
}

.profile-avatar-submit-row {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
    padding: 0 var(--space);
}

.profile-avatar-submit-row #avatarStatus {
    color: #cbd5e1;
    min-height: 1.2rem;
    flex: 1 1 220px;
}

.profile-avatar-submit-row #avatarUploadBtn {
    margin-left: auto;
}

.profile-edit-form {
    margin: 0;
    max-width: none;
}

.profile-edit-form p {
    padding: 0 var(--space) var(--space);
    color: #c7d0db;
}

.profile-background-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space);
    padding: 0 var(--space);
}

.profile-background-form {
    padding-bottom: var(--space);
}

.profile-background-editor-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    margin: 0 var(--space);
    padding: var(--space);
    border: 1px solid #3a4047;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(30, 34, 39, 0.94), rgba(22, 26, 31, 0.92));
}

.profile-background-section {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: calc(var(--space) * 1.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(17, 21, 26, 0.72);
}

.profile-background-section-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-background-section-heading h3 {
    color: #eef3fa;
    font-size: 1rem;
}

.profile-background-section-heading p {
    padding: 0;
    color: #aeb8c4;
    line-height: 1.45;
}

.profile-background-editor-shell .profile-background-fields,
.profile-background-editor-shell .profile-background-actions-row {
    padding: 0;
}

.profile-background-image-fields {
    grid-template-columns: 1fr;
}

.profile-background-fields input[type="color"],
.profile-background-fields input[type="file"],
.profile-background-fields select {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.profile-background-slider {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.profile-background-actions-row {
    display: flex;
    align-items: center;
    gap: var(--space);
    padding: 0 var(--space);
    color: #d9e0e8;
    flex-wrap: wrap;
}

.profile-background-remove-button {
    margin-left: 0;
    align-self: auto;
    border-color: var(--button-danger-border);
    color: var(--button-danger-text);
}

.profile-background-remove-button:hover:not(:disabled) {
    background: var(--button-danger-bg-hover);
}

.profile-background-remove-button:disabled {
    opacity: 0.7;
    cursor: default;
}

.profile-background-actions-copy {
    color: #c7d0db;
}

.profile-background-submit-row {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
    padding: 0 var(--space);
}

.profile-background-submit-row #backgroundStatus {
    color: #cbd5e1;
    min-height: 1.2rem;
    flex: 1 1 220px;
}

.profile-background-submit-row button {
    margin-left: auto;
}

.profile-media-form {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.profile-media-progress {
    position: relative;
    flex: 1 1 220px;
    min-width: min(100%, 220px);
    max-width: 320px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(27, 31, 37, 0.92);
    border: 1px solid rgba(90, 103, 117, 0.72);
}

.profile-media-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6ea7ff, #7b2cbf);
    transition: width 0.15s ease;
}

.profile-media-progress-label {
    color: #c7d0db;
    font-size: 0.9rem;
    min-width: 3rem;
}

.settings-toggle-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 100px;
    align-items: stretch;
    gap: var(--space);
    padding: 0 var(--space);
}

.settings-toggle-list--single {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
}

.settings-toggle-list--single .settings-toggle {
    height: auto;
    max-height: none;
    min-height: 100px;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    position: relative;
    height: 100px;
    max-height: 100px;
    padding: var(--space) var(--space);
    border: 1px solid #3a4047;
    border-radius: 12px;
    background: rgba(27, 31, 37, 0.72);
    color: #dbe5ef;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.settings-toggle:hover {
    border-color: rgba(110, 167, 255, 0.42);
    background: linear-gradient(180deg, rgba(34, 39, 47, 0.96), rgba(27, 31, 37, 0.88));
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.settings-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-toggle-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space);
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.settings-toggle-copy strong {
    color: #eef3fa;
    letter-spacing: 0.01em;
}

.settings-toggle-copy small {
    color: #aeb8c4;
    line-height: 1.45;
    overflow: hidden;
}

.settings-toggle-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 56px;
    min-width: 56px;
    height: 32px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(78, 88, 101, 0.96);
    background: linear-gradient(180deg, rgba(20, 25, 31, 0.98), rgba(36, 43, 52, 0.92));
    box-sizing: border-box;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.28),
        0 6px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.settings-toggle-control::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(110, 167, 255, 0.22), rgba(123, 44, 191, 0.2));
    opacity: 0.18;
    transition: opacity 0.22s ease, background 0.22s ease;
}

.settings-toggle-thumb {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(225, 233, 243, 0.92);
    background: linear-gradient(180deg, #f9fbff, #d4dce6);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transform: translateX(0);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    z-index: 1;
}

.settings-toggle-thumb::after {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(125, 138, 154, 0.48), rgba(83, 95, 110, 0.16));
    opacity: 0.55;
    transition: opacity 0.22s ease, background 0.22s ease;
}

.settings-toggle-input:checked ~ .settings-toggle-control {
    border-color: rgba(145, 188, 255, 0.92);
    background: linear-gradient(90deg, rgba(49, 90, 150, 0.96), rgba(111, 55, 175, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 10px 22px rgba(57, 93, 150, 0.22);
}

.settings-toggle-input:checked ~ .settings-toggle-control::before {
    background: linear-gradient(90deg, rgba(166, 210, 255, 0.34), rgba(224, 192, 255, 0.3));
    opacity: 0.9;
}

.settings-toggle-input:checked ~ .settings-toggle-control .settings-toggle-thumb {
    transform: translateX(24px);
    border-color: rgba(231, 240, 255, 0.98);
    background: linear-gradient(180deg, #ffffff, #dce9ff);
    box-shadow:
        0 10px 22px rgba(39, 60, 96, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.settings-toggle-input:checked ~ .settings-toggle-control .settings-toggle-thumb::after {
    background: linear-gradient(180deg, rgba(110, 167, 255, 0.72), rgba(123, 44, 191, 0.42));
    opacity: 1;
}

.settings-toggle-input:focus-visible ~ .settings-toggle-control {
    outline: 2px solid rgba(110, 167, 255, 0.45);
    outline-offset: 2px;
}

.settings-toggle-input:disabled ~ .settings-toggle-copy,
.settings-toggle-input:disabled ~ .settings-toggle-control {
    opacity: 0.65;
}

.settings-toggle-input:disabled ~ .settings-toggle-control {
    filter: saturate(0.7);
}

@media (max-width: 640px) {
    .profile-hero,
    .profile-avatar-panel-header,
    .profile-avatar-overview-card,
    .profile-background-preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-showcase-surface {
        min-height: 200px;
        padding: var(--space);
    }

    .profile-media-player-controls,
    .profile-media-player-timeline {
        flex-wrap: nowrap;
        gap: var(--space);
    }

    .profile-media-player-timeline {
        column-gap: var(--space);
    }

    .profile-media-player {
        gap: var(--space);
    }

    .profile-media-player-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .profile-media-player-header {
        gap: var(--space);
    }

    .profile-media-player-title {
        font-size: 0.92rem;
    }

    .profile-media-player-subtitle {
        display: none;
    }

    .profile-media-player-time,
    .profile-media-player-volume-value {
        font-size: 0.78rem;
    }

    .profile-media-player-time {
        min-width: 2.1rem;
    }

    .profile-media-player-volume-value {
        min-width: 1.8rem;
    }

    .profile-media-player-range::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
    }

    .profile-media-player-range::-moz-range-thumb {
        width: 12px;
        height: 12px;
    }

    .profile-media-player-volume-range {
        width: 12px;
        min-width: 12px;
        max-width: 12px;
        height: 64px;
    }

    .profile-media-player-volume-trigger {
        width: 34px;
        min-width: 34px;
        height: 34px;
    }

    .profile-media-player-volume-popover {
        padding: var(--space) var(--space);
        border-radius: 14px;
        gap: var(--space);
    }

    .profile-media-player-volume-icon {
        font-size: 0.82rem;
    }

    #topBar {
        padding: 0;
    }

    .topbar-inner {
        flex-wrap: wrap;
    }

    #topBar #userLinks {
        gap: 0;
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    #topBar #homeLink {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-brand-copy small {
        display: none;
    }

    #topBar a,
    .action-link,
    button,
    input[type="submit"] {
        width: auto;
    }

    .profile-background-fields {
        grid-template-columns: 1fr;
    }

    .profile-background-editor-shell {
        margin: 0;
    }

    .profile-background-submit-row button {
        width: 100%;
        margin-left: 0;
    }

    .settings-toggle-list {
        grid-template-columns: 1fr;
    }

    .profile-avatar-editor-layout {
        grid-template-columns: 1fr;
    }

    .profile-avatar-crop-stage {
        width: 100%;
    }

    .profile-avatar-editor-shell {
        margin: 0;
    }

    .profile-avatar-submit-row #avatarUploadBtn {
        width: 100%;
        margin-left: 0;
    }
}

.profile-email-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: var(--space);
    background: #24282d;
    border: 1px solid #3a4047;
    border-radius: 12px;
}

.profile-email-panel h2 {
    font-size: 1.2rem;
}

.profile-delete-page {
    max-width: 760px;
}

.profile-delete-panel {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space) * 1.2);
    padding: calc(var(--space) * 1.4);
    background: linear-gradient(180deg, rgba(40, 25, 25, 0.96), rgba(27, 16, 16, 0.98));
    border: 1px solid rgba(194, 103, 103, 0.34);
    border-radius: 14px;
}

.profile-delete-panel h2 {
    color: #ffe3e3;
}

.profile-delete-copy,
.profile-delete-warning {
    color: #e8c8c8;
    line-height: 1.7;
}

.profile-delete-warning {
    padding: var(--space);
    border-radius: 12px;
    border: 1px solid rgba(194, 103, 103, 0.28);
    background: rgba(53, 29, 29, 0.56);
}

.profile-delete-fields {
    display: grid;
    gap: var(--space);
}

.profile-delete-fields input {
    width: 100%;
    max-width: none;
}

.profile-delete-actions {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-delete-actions #deleteAccountStatus {
    flex: 1 1 240px;
    min-width: 0;
}

.profile-delete-button {
    background: var(--button-danger-bg);
    border-color: var(--button-danger-border);
    color: var(--button-danger-text);
}

.profile-delete-button:hover:not(:disabled) {
    background: var(--button-danger-bg-hover);
}

.profile-delete-button:disabled {
    opacity: 0.65;
}

.profile-email-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space);
}

.profile-email-field {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    color: #c8dcfb;
    font-weight: 700;
}

.profile-email-field input {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.profile-bio-editor-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: var(--space);
    background: #24282d;
    border: 1px solid #3a4047;
    border-radius: 12px;
}

.profile-bio-editor-page {
    max-width: 760px;
}

.profile-bio-editor-copy {
    padding: 0;
    color: #c7d0db;
}

.profile-bio-editor-help {
    display: block;
    margin-top: 0.35rem;
    color: #aeb8c4;
    font-size: 0.94rem;
}

.profile-bio-mode-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.profile-bio-editor-panel h2 {
    font-size: 1.2rem;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(79, 91, 105, 0.92);
    background: rgba(21, 25, 31, 0.94);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.editor-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    padding-right: 0.2rem;
}

.editor-toolbar-group + .editor-toolbar-group {
    border-left: 1px solid rgba(87, 101, 117, 0.5);
    padding-left: 0.4rem;
}

.editor-toolbar-button,
.editor-toolbar-select {
    border-radius: 7px;
    border: 1px solid rgba(87, 101, 117, 0.88);
    background: rgba(33, 38, 46, 0.96);
    color: #eef3fa;
    font: inherit;
    line-height: 1.2;
    font-size: 0.84rem;
}

.editor-toolbar-button {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.3rem 0.45rem;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.editor-toolbar-button:hover,
.editor-toolbar-button:focus-visible {
    border-color: rgba(123, 162, 214, 0.96);
    background: rgba(42, 48, 58, 0.98);
}

.editor-toolbar-button:focus-visible,
.editor-toolbar-select:focus-visible {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
}

.editor-toolbar-select {
    min-width: 5.25rem;
    padding: 0.3rem 1.6rem 0.3rem 0.45rem;
}

.editor-toolbar-select-compact {
    min-width: 4rem;
}

.editor-toolbar-select option {
    background: #20252c;
}

.editor-toolbar-select option[value="blue"] {
    color: #7ba2d6;
}

.editor-toolbar-select option[value="coral"] {
    color: coral;
}

.editor-toolbar-select option[value="gold"] {
    color: gold;
}

.editor-toolbar-select option[value="green"] {
    color: #98c379;
}

.editor-toolbar-select option[value="violet"] {
    color: violet;
}

.editor-toolbar-select option[value="light"] {
    color: #eef3fa;
}

.editor-toolbar-select[data-selected-color="blue"] {
    color: #7ba2d6;
}

.editor-toolbar-select[data-selected-color="coral"] {
    color: coral;
}

.editor-toolbar-select[data-selected-color="gold"] {
    color: gold;
}

.editor-toolbar-select[data-selected-color="green"] {
    color: #98c379;
}

.editor-toolbar-select[data-selected-color="violet"] {
    color: violet;
}

.editor-toolbar-select[data-selected-color="light"] {
    color: #eef3fa;
}

.profile-bio-toolbar {
    margin-top: 0.35rem;
}

.profile-bio-body-panel {
    display: flex;
    flex-direction: column;
}

.profile-bio-textarea {
    min-height: 220px;
    width: 100%;
    max-width: none;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
    padding: var(--space) var(--space);
    border-radius: 10px;
    border: 1px solid rgba(90, 103, 117, 0.92);
    background: rgba(27, 31, 37, 0.92);
    color: #eef3fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.profile-bio-textarea::placeholder {
    color: #8e9aa7;
}

.profile-bio-textarea:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
    border-color: #7ba2d6;
}

.profile-bio-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0.35rem;
    padding: 14px 16px;
    border: 1px solid rgba(76, 87, 100, 0.76);
    border-radius: 14px;
    background: rgba(18, 23, 29, 0.62);
}

.profile-bio-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-bio-preview-content {
    min-height: 140px;
}

.profile-bio-counter {
    min-height: 1.25rem;
    color: #b8c1cb;
}

.profile-bio-editor-actions {
    align-items: center;
    gap: var(--space);
}

.profile-bio-status {
    min-height: 1.25rem;
    color: orange;
}

.profile-bio-editor-links {
    justify-content: flex-start;
}

.profile-bio-editor-info-panel {
    margin-top: var(--space);
}

.profile-bio-editor-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space);
}

.profile-bio-editor-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.profile-bio-editor-info-block h3 {
    margin: 0;
    font-size: 1rem;
    color: #eef3fa;
}

.profile-bio-editor-info-block p {
    margin: 0;
    color: #c7d0db;
}

.profile-bio-counter.is-near-limit {
    color: #f0d48a;
}

.profile-post-editor-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: var(--space);
    background:
        linear-gradient(180deg, rgba(39, 45, 53, 0.96), rgba(29, 34, 40, 0.98));
    border: 1px solid rgba(76, 87, 100, 0.92);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.profile-post-editor-panel h2 {
    font-size: 1.45rem;
}

.profile-post-editor-panel > p {
    padding: 0;
    color: #d0d9e4;
    line-height: 1.55;
    max-width: 46rem;
}

.profile-post-editor-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    gap: var(--space);
}

.profile-post-editor-field {
    gap: var(--space);
    color: #d8e5f3;
}

.profile-post-editor-field span {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.profile-post-editor-textarea {
    min-height: 180px;
    width: 100%;
    max-width: none;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
    padding: var(--space) var(--space);
    border-radius: 10px;
    border: 1px solid rgba(90, 103, 117, 0.92);
    background: rgba(27, 31, 37, 0.92);
    color: #eef3fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
}

.profile-post-editor-textarea::placeholder {
    color: #8e9aa7;
}

.profile-post-editor-textarea:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 1px;
    border-color: #7ba2d6;
}

.profile-post-editor-actions {
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
    padding: 0;
}

.profile-post-editor-hint {
    color: #9eabb8;
    font-size: 0.88rem;
}

.profile-post-mode-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.45rem;
}

.profile-post-editor-body-panel {
    display: flex;
    flex-direction: column;
}

.profile-post-editor-preview {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    margin: 0;
    padding: var(--space);
    border-radius: 12px;
    border: 1px solid rgba(76, 85, 96, 0.72);
    background: rgba(17, 22, 29, 0.62);
}

.profile-post-editor-preview[hidden] {
    display: none;
}

.profile-post-editor-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-editor-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-editor-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
    align-items: flex-start;
}

.profile-post-editor-preview-card {
    display: flex;
    flex-direction: column;
    gap: var(--space);
    max-width: min(100%, 240px);
}

.profile-post-editor-preview-card img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 220px;
    border-radius: 10px;
    background: rgba(11, 17, 24, 0.9);
}

.profile-post-editor-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-editor-preview-tag {
    color: #9eabb8;
    font-size: 0.86rem;
    font-weight: 600;
}

.profile-post-editor-text-preview-content {
    min-height: 140px;
}

.profile-post-editor-remove-button {
    appearance: none;
    border: 1px solid rgba(90, 103, 117, 0.92);
    border-radius: 999px;
    background: rgba(27, 31, 37, 0.86);
    color: #dbe5ef;
    padding: var(--space) var(--space);
    font: inherit;
    cursor: pointer;
}

.profile-post-editor-remove-button:hover {
    border-color: #7ba2d6;
    color: #eef3fa;
}

.profile-email-actions {
    align-items: center;
}

.profile-email-actions #mediaStatus {
    min-height: 1.25rem;
    color: orange;
    flex: 1 1 220px;
}

.profile-email-actions #mediaSaveBtn {
    margin-left: auto;
}

.profile-post-editor-footer {
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: var(--space);
    flex-wrap: wrap;
}

.profile-post-editor-footer #postStatus {
    min-height: 1.25rem;
    color: orange;
}

.profile-post-editor-footer button {
    margin-left: auto;
}

#emailStatus {
    min-height: 1.25rem;
    color: orange;
}

.admin-page {
    max-width: 980px;
}

.admin-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space);
}

.admin-links a {
    margin-left: 0;
}

.admin-link-card {
    min-height: 132px;
    justify-content: center;
}

.admin-users-page {
    max-width: 1100px;
    border-radius: 0;
    background: #08111f;
    border-color: #15263d;
    box-shadow: 0 0 0 9999px #06101d;
}

.admin-uptime-page {
    max-width: 1100px;
    background: transparent;
    border: 0;
    padding: var(--space) 0 0;
    gap: var(--space);
}

.admin-uptime-header {
    padding: 0 var(--space);
}

.admin-uptime-header h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    letter-spacing: -0.02em;
}

.admin-uptime-header p {
    max-width: 42rem;
    color: #cfd8e2;
}

.admin-uptime-page > .uptime-slo,
.admin-uptime-page > .uptime-grid,
.admin-uptime-page > .uptime-incidents,
.admin-uptime-page > .uptime-feedback,
.admin-uptime-page > #status {
    margin-inline: var(--space);
}

.admin-events-page {
    max-width: 1100px;
}

.admin-ip-intelligence-page {
    width: calc(100% - 30px);
    max-width: none;
    border-radius: 0;
    background: #08111f;
    border-color: #15263d;
    box-shadow: 0 0 0 9999px #06101d;
}

.admin-ip-traces-page {
    max-width: 1100px;
}

.admin-retention-page {
    max-width: 1100px;
}

.admin-xeo-page {
    max-width: 1100px;
}

.admin-fileshare-page {
    width: calc(100% - 30px);
    max-width: none;
    min-height: calc(100vh - 140px);
    border-radius: 0;
    background: #08111f;
    border-color: #15263d;
    box-shadow: 0 0 0 9999px #06101d;
}

.admin-fileshare-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    gap: var(--space);
    align-items: start;
    flex: 1;
    min-height: 0;
}

.admin-fileshare-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.admin-fileshare-header {
    align-items: flex-start;
    gap: var(--space);
}

.admin-fileshare-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-fileshare-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space);
}

.admin-fileshare-stat-card {
    min-height: 120px;
    justify-content: center;
}

.admin-fileshare-stat-card span {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
}

.admin-fileshare-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.admin-fileshare-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-fileshare-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.admin-fileshare-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-fileshare-dropzone {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem;
    border: 1px dashed rgba(130, 165, 255, 0.45);
    border-radius: 14px;
    background: rgba(17, 29, 51, 0.7);
    cursor: pointer;
}

.admin-fileshare-dropzone.is-dragover {
    border-color: #7ea7ff;
    background: rgba(31, 50, 84, 0.85);
}

.admin-fileshare-dropzone small {
    color: #9db1d1;
}

.admin-fileshare-upload-form input[type="file"] {
    color: #d6e3ff;
}

.admin-fileshare-upload-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-fileshare-upload-progress-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(110, 142, 204, 0.18);
    background: rgba(10, 19, 35, 0.52);
}

.admin-fileshare-upload-progress-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.admin-fileshare-upload-progress-header span {
    color: #a8bbd8;
    font-size: 0.9rem;
}

.admin-fileshare-upload-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-fileshare-upload-grid-head,
.admin-fileshare-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(90px, 0.8fr) minmax(160px, 1fr) minmax(90px, 0.7fr) minmax(72px, auto);
    gap: 0.75rem;
    align-items: center;
}

.admin-fileshare-upload-grid-head {
    color: #a8bbd8;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-fileshare-upload-row {
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    background: rgba(14, 25, 44, 0.74);
    border: 1px solid rgba(110, 142, 204, 0.14);
}

.admin-fileshare-upload-name,
.admin-fileshare-upload-progress-cell {
    min-width: 0;
}

.admin-fileshare-upload-name strong,
.admin-fileshare-upload-name span,
.admin-fileshare-upload-target,
.admin-fileshare-upload-progress-cell small,
.admin-fileshare-upload-status {
    display: block;
    overflow-wrap: anywhere;
}

.admin-fileshare-upload-name span,
.admin-fileshare-upload-target,
.admin-fileshare-upload-progress-cell small {
    color: #a8bbd8;
    font-size: 0.84rem;
}

.admin-fileshare-upload-progress-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-fileshare-upload-progress-bar {
    display: block;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(35, 51, 80, 0.85);
    border: 1px solid rgba(110, 142, 204, 0.16);
    appearance: none;
}

.admin-fileshare-upload-progress-bar::-webkit-progress-bar {
    background: rgba(35, 51, 80, 0.85);
    border-radius: 999px;
}

.admin-fileshare-upload-progress-bar::-webkit-progress-value {
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(94, 146, 255, 0.82), rgba(129, 181, 255, 0.96));
    transition: width 0.18s ease;
}

.admin-fileshare-upload-progress-bar::-moz-progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(94, 146, 255, 0.82), rgba(129, 181, 255, 0.96));
}

.admin-fileshare-upload-status.is-error {
    color: #ffb6b6;
}

.admin-fileshare-upload-action {
    display: flex;
    justify-content: flex-end;
}

.admin-fileshare-upload-abort-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
}

.admin-fileshare-upload-action-empty {
    color: #7f93b1;
    font-size: 0.9rem;
}

.admin-fileshare-recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-fileshare-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(10, 19, 35, 0.7);
    border: 1px solid rgba(110, 142, 204, 0.18);
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.admin-fileshare-recent-item strong {
    min-width: 0;
    display: block;
    overflow-wrap: anywhere;
}

.admin-fileshare-recent-item:hover,
.admin-fileshare-recent-item:focus-visible {
    border-color: rgba(139, 180, 255, 0.42);
    background: rgba(17, 31, 56, 0.86);
}

.admin-fileshare-recent-item:focus-visible {
    outline: 2px solid rgba(139, 180, 255, 0.3);
    outline-offset: 2px;
}

.admin-fileshare-recent-meta {
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
    color: #a8bbd8;
    font-size: 0.9rem;
}

.admin-fileshare-browser-panel {
    margin-top: 0;
    min-height: 0;
}

.admin-fileshare-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    color: #b8cae6;
    margin: 0;
}

.admin-fileshare-browser-note {
    margin-top: 0.35rem;
    color: #9db1d1;
    font-size: 0.9rem;
}

.admin-fileshare-crumb,
.admin-fileshare-open-btn {
    border: 0;
    background: transparent;
    color: #dce7ff;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-align: left;
}

.admin-fileshare-crumb:hover,
.admin-fileshare-open-btn:hover {
    color: #8bb4ff;
}

.admin-fileshare-browser {
    flex: 1;
    min-height: 60vh;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid rgba(132, 159, 212, 0.16);
    background: rgba(10, 19, 35, 0.56);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-fileshare-browser.is-upload-dragover {
    border-color: rgba(126, 167, 255, 0.5);
    box-shadow: inset 0 0 0 1px rgba(126, 167, 255, 0.28);
    background: rgba(18, 33, 58, 0.72);
}

.admin-fileshare-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-fileshare-table th,
.admin-fileshare-table td {
    padding: 0.8rem 0.65rem;
    border-bottom: 1px solid rgba(132, 159, 212, 0.16);
    vertical-align: top;
}

.admin-fileshare-table th {
    text-align: left;
    color: #a8bbd8;
    font-weight: 600;
}

.admin-fileshare-browser-row {
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.admin-fileshare-browser-row:hover,
.admin-fileshare-browser-row:focus-within {
    background: rgba(24, 42, 74, 0.4);
    box-shadow: inset 0 0 0 1px rgba(126, 167, 255, 0.18);
}

.admin-fileshare-drag-row {
    cursor: grab;
}

.admin-fileshare-drag-row:active {
    cursor: grabbing;
}

.admin-fileshare-drop-row {
    position: relative;
}

.admin-fileshare-drop-row td:first-child {
    position: relative;
}

.admin-fileshare-drop-row td:first-child::after {
    content: "Drop here to move";
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(168, 187, 216, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.admin-fileshare-drop-active {
    background: rgba(31, 58, 102, 0.48);
    box-shadow: inset 0 0 0 1px rgba(126, 167, 255, 0.45);
}

.admin-fileshare-drop-active td:first-child::after {
    opacity: 1;
}

.admin-fileshare-drag-active {
    opacity: 0.55;
}

.admin-fileshare-entry-icon {
    display: inline-block;
    width: 1.4rem;
}

.admin-fileshare-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.admin-fileshare-actions button {
    font-size: 0.82rem;
    padding: 0.35rem 0.55rem;
}

.admin-fileshare-actions button.is-delete-confirm {
    border-color: rgba(194, 103, 103, 0.62);
    background: rgba(194, 103, 103, 0.18);
    color: #ffd2d2;
}

.admin-fileshare-empty {
    color: #a8bbd8;
    margin: 0;
}

.admin-fileshare-duplicate-pill {
    display: inline-flex;
    margin-left: 0.45rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(88, 135, 255, 0.18);
    color: #bdd4ff;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.ip-intel-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.ip-objects-toolbar {
    display: table;
    width: 100%;
    table-layout: fixed;
    padding: var(--space);
    border: 1px solid #1a2d48;
    border-radius: 0;
    background: #091423;
    overflow-x: auto;
}

.ip-objects-toolbar .users-search-field {
    display: table-cell;
    width: 100%;
    min-width: 320px;
    padding-right: var(--space);
    vertical-align: bottom;
}

.ip-objects-toolbar-controls {
    display: table-cell;
    width: 300px;
    white-space: nowrap;
    padding-right: var(--space);
    vertical-align: bottom;
}

.ip-objects-control-field {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    min-width: 132px;
    color: #d7e2ef;
    font-weight: 700;
}

.ip-objects-control-field + .ip-objects-control-field {
    margin-left: var(--space);
}

.ip-objects-control-field input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #1a2d48;
    background: #091423;
    color: #eef3fa;
    border-radius: 0;
}

.ip-objects-toolbar-actions {
    display: table-cell;
    width: 1%;
    white-space: nowrap;
    vertical-align: bottom;
    text-align: right;
}

.ip-objects-toolbar-actions button + button {
    margin-left: var(--space);
}

.ip-object-grid {
    margin-top: var(--space);
}

.ip-objects-table {
    width: 100%;
    border-collapse: collapse;
}

.ip-objects-row:hover td {
    background: #0d1d31;
}

.ip-objects-last-seen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ip-objects-ip {
    color: #d6e6ff;
    font-weight: 700;
}

.ip-objects-expand-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8ec0ff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.ip-objects-expand-button:hover {
    color: #d7e9ff;
}

.ip-objects-expander-row td {
    background: #08111d;
    border-bottom: 1px solid #162842;
}

.ip-objects-expander-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ip-objects-expander-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ip-object-detail-section {
    padding: 0.9rem 1rem;
    border: 1px solid #162842;
    background: #0a1523;
}

.ip-object-detail-section h3 {
    margin: 0 0 0.7rem;
    color: #dceaff;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ip-object-detail-section p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.ip-object-detail-section p + p {
    margin-top: 0.65rem;
}

.ip-object-detail-section span {
    color: #d6e4fb;
    font-size: 0.95rem;
}

.ip-object-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ip-object-options label {
    color: #c7daf7;
    font-weight: 700;
}

.ip-object-options textarea,
.ip-object-options input {
    width: 100%;
    max-width: none;
    margin-top: 0.3rem;
    border: 1px solid #1f476f;
    border-radius: 0;
    background: #081726;
    color: #dceaff;
    box-shadow: inset 0 0 0 1px rgba(8, 33, 56, 0.55);
}

.ip-object-options textarea::placeholder,
.ip-object-options input::placeholder {
    color: #7f9fc3;
}

.ip-object-options textarea:focus,
.ip-object-options input:focus {
    outline: 1px solid #4d82b8;
    outline-offset: 0;
    border-color: #4d82b8;
    background: #0a1b2d;
}

.ip-object-options textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.5;
}

.ip-object-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ip-object-actions button {
    margin-left: 0;
}

.ip-object-ban {
    background: #5a1c2a;
    border-color: #8a3347;
    color: #ffe1e7;
}

.ip-object-unban {
    background: #122b20;
    border-color: #2f6b52;
    color: #d7ffe8;
}

.status-pill-warning {
    background: #2a1730;
    border-color: #51306a;
    color: #ffd2f0;
}

.status-pill-warning-subtle {
    background: #12263f;
    border-color: #244a7a;
    color: #a9d3ff;
}

.status-pill-manual-ban {
    background: #35161f;
    border-color: #733247;
    color: #ffd8e1;
}

.status-pill-manual-ban-subtle {
    background: #1a2139;
    border-color: #2f4674;
    color: #c9d9ff;
}

.status-pill-intel-ready {
    background: #10263c;
    border-color: #1f476f;
    color: #b5d5ff;
}

.status-pill-intel-pending,
.status-pill-trace-pending {
    background: #2f2412;
    border-color: #6f5724;
    color: #ffd99a;
}

.status-pill-intel-partial,
.status-pill-trace-running {
    background: #1f2237;
    border-color: #414b7a;
    color: #d7dcff;
}

.status-pill-intel-failed,
.status-pill-trace-failed {
    background: #35161f;
    border-color: #733247;
    color: #ffd8e1;
}

.status-pill-intel-muted {
    background: #0a1728;
    border-color: #182a43;
    color: #87a7cc;
}

.status-pill-trace {
    background: #10263c;
    border-color: #1f476f;
    color: #b5d5ff;
}

.status-pill-trace-ready {
    background: #122b20;
    border-color: #2f6b52;
    color: #d7ffe8;
}

.ip-intel-card textarea,
.ip-intel-card input {
    width: 100%;
    max-width: none;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.ip-intel-card button {
    margin-left: 0;
}

.ip-trace-hop-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.35rem;
}

.ip-trace-hop-list li {
    display: grid;
    grid-template-columns: 64px minmax(120px, 1fr) 90px minmax(150px, 1fr);
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 900px) {
    .ip-objects-expander-columns {
        grid-template-columns: 1fr;
    }

    .ip-objects-last-seen {
        flex-direction: column;
        align-items: flex-start;
    }

    .ip-trace-hop-list li {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.retention-job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space);
}

.retention-job-card {
    border: 1px solid #3f3f3f;
    border-radius: 10px;
    padding: var(--space);
    background: #252525;
}

.retention-job-card h3 {
    margin-bottom: 0.45rem;
}

.retention-job-card p {
    margin: 0.25rem 0;
}

.retention-table-wrap {
    overflow-x: auto;
}

.retention-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.retention-table th,
.retention-table td {
    border: 1px solid #3f3f3f;
    padding: 0.45rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.retention-table th {
    background: #2f2f2f;
}

.retention-row-notes td {
    color: #cfd8e2;
    font-size: 0.92rem;
    background: #292929;
}

.retention-error {
    color: #ff8f8f;
}

.retention-migration-controls {
    display: grid;
    grid-template-columns: auto 120px auto auto;
    align-items: center;
    gap: var(--space);
    margin-bottom: var(--space);
}

.retention-migration-controls input {
    width: 100%;
    max-width: 120px;
}

.retention-migration-controls button {
    margin-left: 0;
}

.retention-migration-card pre {
    background: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: var(--space);
    overflow: auto;
    max-height: 360px;
}

.event-card {
    background: #2a2a2a;
    border: 1px solid #3f3f3f;
    border-left: 4px solid #4b4b4b;
    border-radius: 10px;
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.event-card.is-warn {
    border-left-color: #d38d2d;
}

.event-card.is-error {
    border-left-color: #c13f3f;
}

.event-card.is-info {
    border-left-color: #3f7bc1;
}

.event-card.is-debug {
    border-left-color: #6e5ac9;
}

.event-card header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
    align-items: center;
    color: #c7daf7;
}

.event-level {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.4px;
}

.event-id {
    padding: var(--space) var(--space);
    border-radius: 999px;
    background: #1f3a61;
    font-size: 0.78rem;
}

.event-id-warning {
    background: #3a1d2a;
    color: #ffc3d0;
}

.event-card time {
    margin-left: auto;
    font-size: 0.85rem;
    color: #9fb1c8;
}

.event-card pre {
    margin: 0;
    padding: var(--space);
    border-radius: 8px;
    background: #1b1b1b;
    border: 1px solid #333;
    color: #d6e6ff;
    overflow-x: auto;
}

.xeo-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space);
}

.xeo-form,
.xeo-panel,
.xeo-chat-shell {
    padding: var(--space);
    border-radius: 12px;
    border: 1px solid #3f3f3f;
    background: #2a2a2a;
}

.xeo-panel,
.xeo-chat-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.xeo-panel h2 {
    color: #dce9f8;
    font-size: 1.05rem;
}

.xeo-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--space) * 0.75);
}

.xeo-pill,
.xeo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(142, 164, 191, 0.28);
    background: rgba(31, 58, 97, 0.35);
    color: #dbe8f8;
    font-size: 0.88rem;
}

.xeo-pill.is-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #c8d2de;
}

.xeo-form {
    margin: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: var(--space);
    padding: 0;
    border: 0;
    background: transparent;
}

.xeo-form label {
    color: #bdd4f7;
    font-weight: 700;
}

.xeo-chat-shell {
    gap: calc(var(--space) * 1.25);
    height: min(720px, calc(100vh - 260px));
    overflow: hidden;
}

.xeo-chat-shell > #xeoChatView,
.xeo-chat-shell > #xeoDebugView {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.xeo-shell-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.xeo-shell-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xeo-shell-copy strong {
    color: #eef4fb;
}

.xeo-shell-copy span {
    color: #b7c4d2;
    line-height: 1.5;
}

.xeo-chat-thread {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space) * 1.1);
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 4px;
}

.xeo-message {
    display: flex;
    align-items: flex-start;
    gap: calc(var(--space) * 0.9);
    padding: 10px 6px;
    border-radius: 12px;
    transition: background 0.18s ease;
}

.xeo-message:hover {
    background: rgba(255, 255, 255, 0.03);
}

.xeo-message-meta {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--space) * 0.55);
    color: #d8e4f3;
    flex-wrap: wrap;
}

.xeo-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(70, 122, 196, 0.55), rgba(48, 81, 129, 0.72));
    border: 1px solid rgba(142, 164, 191, 0.26);
    color: #eef4fb;
    font-size: 0.92rem;
    font-weight: 700;
    flex: 0 0 auto;
    overflow: hidden;
}

.xeo-avatar.is-assistant {
    background: linear-gradient(180deg, rgba(122, 90, 201, 0.55), rgba(83, 62, 137, 0.72));
}

.xeo-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xeo-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.xeo-message-main {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xeo-message-meta strong {
    color: #f1f5fb;
    font-size: 0.98rem;
}

.xeo-message-tag {
    color: #9aaabd;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.xeo-chat-text {
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    color: #d8e5f4;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.68;
    font-size: 0.98rem;
}

.xeo-message-user .xeo-chat-text {
    color: #eef4fb;
}

.xeo-chat-text-assistant {
    min-height: 140px;
}

.xeo-thread-placeholder {
    display: flex;
    flex-direction: column;
    gap: calc(var(--space) * 0.65);
    padding: 18px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.xeo-thread-placeholder h2 {
    color: #eef4fb;
    font-size: 1rem;
}

.xeo-thread-placeholder p {
    color: #b7c4d2;
    line-height: 1.6;
}

.xeo-chat-shell .xeo-form {
    flex: 0 0 auto;
    padding-top: calc(var(--space) * 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.xeo-input-shell {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.xeo-form input[type="text"] {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(142, 164, 191, 0.24);
    background: rgba(14, 18, 24, 0.88);
    color: #edf4ff;
    padding: 12px 104px 12px 14px;
    font: inherit;
    line-height: 1.55;
}

.xeo-form input[type="text"]::placeholder {
    color: #8f9dad;
}

.xeo-form input[type="text"]:focus {
    outline: 2px solid rgba(123, 162, 214, 0.45);
    outline-offset: 2px;
    border-color: rgba(142, 164, 191, 0.42);
}

.xeo-form-actions,
.xeo-output-header {
    display: flex;
    align-items: center;
    gap: var(--space);
}

.xeo-form-actions {
    flex-wrap: nowrap;
}

.xeo-form-actions button {
    flex: 0 0 auto;
}

.xeo-state-panel {
    min-height: 0;
    overflow: hidden;
}

.xeo-character-count {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #9fb1c8;
    font-size: 0.9rem;
    pointer-events: none;
    white-space: nowrap;
}

.xeo-response {
    min-height: 120px;
    height: 100%;
    padding: 14px;
    border-radius: 10px;
    background: #1b1b1b;
    border: 1px solid #333;
    color: #d6e6ff;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92rem;
    overflow: auto;
}

.terminal-modal-open {
    overflow: hidden;
}

.terminal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(4, 6, 8, 0.84);
}

.terminal-modal-window {
    width: min(100%, 616px);
    border: 1px solid #3a4047;
    background: #030704;
    color: #cfe9d5;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.terminal-modal-header {
    padding: 8px 10px 6px;
    border-bottom: 1px solid rgba(92, 125, 99, 0.32);
    background: #050906;
}

.terminal-modal-title,
.terminal-modal-message,
.terminal-modal-hint,
.terminal-modal-status {
    margin: 0;
}

.terminal-modal-title {
    color: #8af5a9;
    font-size: 0.85rem;
}

.terminal-modal-body {
    padding: 0;
}

.terminal-modal-screen {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 176px;
    background: #020402;
    padding: 8px 10px;
}

.terminal-modal-transcript {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.terminal-modal-form {
    margin-top: auto;
    background: transparent;
    border: none;
    margin: 0px;
}

.terminal-modal-prompt {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #8af5a9;
    min-width: 0;
}

.terminal-modal-cursor {
    color: #74af83;
}

.terminal-modal-prompt input {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    appearance: none;
    color: #f3fff5;
    border-radius: 0;
    font: inherit;
}

.terminal-modal-prompt input:focus {
    outline: 0;
}

.terminal-modal-line,
.terminal-modal-hint {
    margin: 0;
    line-height: 1.35;
}

.terminal-modal-line {
    color: #dbe9df;
    white-space: pre-wrap;
}

.terminal-modal-line--dim {
    color: #86a18d;
}

.terminal-modal-line--input {
    color: #8af5a9;
}

.terminal-modal-line--success {
    color: #9ef4ae;
}

.terminal-modal-line--warn {
    color: #ffb37f;
}

.terminal-modal-hint {
    color: #71927a;
    font-size: 0.74rem;
}

.users-table-toolbar {
    display: flex;
    justify-content: flex-start;
}

.users-search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: min(100%, 320px);
    color: #d7e2ef;
    font-weight: 700;
}

.users-search-field input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #1a2d48;
    background: #091423;
    color: #eef3fa;
    border-radius: 0;
}

.users-search-field input::placeholder {
    color: #8fa0b3;
}

.users-table-shell {
    overflow-x: auto;
    border: 1px solid #1a2d48;
    background: #091423;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #162842;
    text-align: left;
    vertical-align: middle;
}

.users-table th {
    color: #eef3fa;
    background: #0d1a2d;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.users-table td {
    background: #0a1422;
}

.users-table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.users-table-sort-button:hover {
    color: #b9d8ff;
}

.users-table-sort-indicator {
    color: #6ea4de;
    font-size: 0.95rem;
    line-height: 1;
}

.users-table tbody tr:hover {
    background: #0d1d31;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.users-table-empty {
    color: #aeb8c4;
    text-align: center;
}

.user-row-identity {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    min-width: 0;
    flex-wrap: wrap;
}

.user-row-identity a {
    color: #d6e6ff;
    text-decoration: none;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.user-row-identity a:hover {
    text-decoration: underline;
}

.users-table-actions {
    text-align: right;
}

.users-table-muted {
    color: #aeb8c4;
    font-size: 0.92rem;
}

.user-card-delete-button {
    min-height: 36px;
    padding: 0 12px;
    background: var(--button-danger-bg);
    border: 1px solid var(--button-danger-border);
    border-radius: 0;
    color: var(--button-danger-text);
}

.user-card-delete-button:hover:not(:disabled) {
    background: var(--button-danger-bg-hover);
}

.user-card-delete-button:disabled {
    opacity: 0.65;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 8px;
    border: 1px solid #1d314d;
    border-radius: 0;
    line-height: 1;
}

.status-pill.is-verified {
    background: #0f1d31;
    color: #b5d7ff;
}

.status-pill.is-unverified {
    background: #0a1728;
    color: #87a7cc;
    border-color: #182a43;
}

.uptime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space);
}

.uptime-card {
    background: rgba(17, 22, 29, 0.62);
    border: 1px solid rgba(76, 85, 96, 0.72);
    border-radius: 10px;
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.uptime-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space);
}

.uptime-card h2 {
    font-size: 1.05rem;
}

.uptime-card-hero {
    font-size: 1.35rem;
    color: #f0f5fb;
}

.uptime-blocks-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.uptime-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10px, 1fr));
    gap: var(--space);
}

.uptime-block {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 2px;
    border: 1px solid rgba(76, 85, 96, 0.58);
}

.uptime-block.is-up {
    background: #2f965a;
}

.uptime-block.is-down {
    background: #9a3c3c;
}

.uptime-block.is-unknown {
    background: rgba(27, 31, 37, 0.78);
}

.uptime-legend {
    color: #b7c9de;
    font-size: 0.82rem;
}

.uptime-stat-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space);
}

.uptime-stat-pill {
    display: grid;
    gap: var(--space);
    padding: var(--space) var(--space);
    border-radius: 10px;
    background: rgba(18, 23, 29, 0.55);
    border: 1px solid rgba(76, 85, 96, 0.72);
}

.uptime-stat-pill-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #98a8ba;
}

.uptime-stat-pill-value {
    color: #eef3fa;
}

.uptime-event-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space);
}

.uptime-event-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space);
    padding: var(--space) var(--space);
    border-radius: 999px;
    background: rgba(18, 23, 29, 0.55);
    border: 1px solid rgba(76, 85, 96, 0.72);
    color: #c8d4e0;
    font-size: 0.85rem;
}

.uptime-feedback {
    background: var(--surface-elevated-2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.uptime-feedback h2 {
    font-size: 1.05rem;
}

.uptime-slo,
.uptime-incidents {
    background: var(--surface-elevated-2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: var(--space);
}

.uptime-slo h2,
.uptime-incidents h2 {
    font-size: 1.05rem;
}

.uptime-meter-list,
.uptime-feedback-list,
.uptime-incident-list {
    display: grid;
    gap: var(--space);
}

.uptime-meter {
    display: grid;
    gap: var(--space);
}

.uptime-meter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
}

.uptime-meter-label {
    color: #dbe5ef;
    font-weight: 600;
}

.uptime-meter-value {
    color: #f0f5fb;
}

.uptime-meter-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(17, 22, 29, 0.9);
    overflow: hidden;
    border: 1px solid rgba(76, 85, 96, 0.72);
}

.uptime-meter-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #4d86d8;
}

.uptime-meter-fill.is-good {
    background: linear-gradient(90deg, #3f8f66, #53bb80);
}

.uptime-meter-fill.is-warn {
    background: linear-gradient(90deg, #a97c37, #e0b45c);
}

.uptime-meter-fill.is-danger {
    background: linear-gradient(90deg, #944b4b, #d66a6a);
}

.uptime-meter-fill.is-neutral {
    background: linear-gradient(90deg, #4e6c95, #6f9ad4);
}

.uptime-meter-hint {
    color: #aebbc8;
    font-size: 0.84rem;
}

.uptime-incident-card,
.uptime-feedback-card {
    display: grid;
    gap: var(--space);
    padding: var(--space);
    border-radius: 10px;
    background: rgba(18, 23, 29, 0.55);
    border: 1px solid rgba(76, 85, 96, 0.72);
}

.uptime-feedback-card h3 {
    font-size: 0.98rem;
    color: #eef3fa;
}

.uptime-feedback-card p {
    color: #c7d0db;
    line-height: 1.45;
}

.uptime-incident-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
}

.uptime-incident-severity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space) var(--space);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    font-weight: 800;
    background: rgba(76, 85, 96, 0.4);
    color: #e7edf4;
}

.uptime-incident-severity.is-high,
.uptime-incident-severity.is-critical {
    background: rgba(154, 60, 60, 0.25);
    color: #f4c2c2;
}

.uptime-incident-severity.is-medium {
    background: rgba(169, 124, 55, 0.25);
    color: #f0d48a;
}

.uptime-incident-severity.is-low {
    background: rgba(63, 143, 102, 0.25);
    color: #bfe4c8;
}

.uptime-incident-window,
.uptime-incident-gaps {
    color: #c7d0db;
}

@media (max-width: 640px) {
    .tasks-page {
        width: calc(100% - 14px);
        margin: var(--space) auto;
        padding: var(--space);
    }

    .tasks-workspace {
        grid-template-columns: 1fr;
    }

    .tasks-entry {
        grid-template-columns: 1fr;
    }

    .tasks-tag-entry {
        grid-template-columns: 1fr;
    }

    .tasks-entry #addTaskBtn,
    .tasks-tag-entry #addTaskTagBtn {
        width: 100%;
        max-width: none;
    }

    .task-item {
        grid-template-columns: auto auto 1fr auto;
        gap: var(--space);
        padding: var(--space);
    }

    .profile-actions button {
        width: 100%;
        max-width: none;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .events-filter-row,
    .events-filter-row.actions {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .xeo-status-grid {
        grid-template-columns: 1fr;
    }

    .xeo-chat-shell {
        height: min(680px, calc(100vh - 220px));
    }

    .xeo-form-actions {
        flex-wrap: wrap;
    }

    .xeo-form-actions button {
        width: 100%;
    }

    .xeo-message {
        gap: calc(var(--space) * 0.75);
    }

    .xeo-avatar {
        width: 36px;
        height: 36px;
    }

    .admin-fileshare-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-fileshare-workspace {
        grid-template-columns: 1fr;
    }

    .admin-fileshare-stats {
        grid-template-columns: 1fr;
    }

    .admin-fileshare-upload-actions,
    .admin-fileshare-recent-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-fileshare-recent-meta {
        text-align: left;
    }

    .event-card time {
        margin-left: 0;
    }
}

.runeinfo-table-shell {
    overflow-x: auto;
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 18px;
    background: rgba(21, 25, 31, 0.82);
}

.runeinfo-search-shell {
    display: grid;
    gap: var(--space);
}

.runeinfo-search-shell form {
    display: grid;
    gap: var(--space);
}

#runeInfoStatus {
    min-height: 1.25rem;
}

#runeInfoGeStatus {
    min-height: 1.25rem;
}

.runeinfo-search-meta {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.runeinfo-search-last {
    margin: 0;
    color: #b2c5d8;
}

@keyframes runeinfo-fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes runeinfo-meter-in {
    from {
        opacity: 0.55;
        transform: scaleX(0.9);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.runeinfo-search-recents {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: #9fb0c2;
    font-size: 0.86rem;
}

.runeinfo-search-recents > span {
    flex: 0 0 auto;
}

.runeinfo-ge-results-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space);
}

.runeinfo-history-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
    line-height: 1.2;
    max-width: 100%;
    transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.runeinfo-history-button:hover {
    transform: translateY(-1px);
}

.runeinfo-history-button.is-secondary {
    opacity: 0.92;
}

.runeinfo-history-avatar {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(90, 103, 117, 0.42);
    background: rgba(17, 21, 27, 0.7);
    object-fit: cover;
    flex: 0 0 auto;
}

.runeinfo-history-text {
    display: inline-block;
    max-width: 16ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.runeinfo-result-hero {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.runeinfo-result-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.runeinfo-result-copy h2,
.runeinfo-result-copy p,
.runeinfo-insight-value,
.runeinfo-activity-title,
.runeinfo-skill-subtle {
    overflow-wrap: anywhere;
}

.runeinfo-result-copy h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.runeinfo-result-title-name {
    min-width: 0;
}

.runeinfo-visibility-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(142, 164, 191, 0.45);
    background: rgba(65, 97, 140, 0.2);
    color: #dbe9f8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    padding: 0.2rem 0.55rem;
}

.runeinfo-visibility-pill.is-public {
    border-color: rgba(120, 190, 130, 0.55);
    background: rgba(66, 122, 71, 0.22);
    color: #cbf7d0;
}

.runeinfo-visibility-pill.is-private {
    border-color: rgba(236, 123, 123, 0.55);
    background: rgba(122, 54, 54, 0.22);
    color: #ffd1d1;
}

.tasks-page#runeInfoPage .page-header-row {
    flex-wrap: wrap;
}

.tasks-page#runeInfoPage .page-header-row > * {
    min-width: 0;
}

.tasks-page#runeInfoPage .page-header-row > :first-child {
    flex: 1 1 260px;
}

.tasks-page#runeInfoPage .page-header-row > :last-child {
    flex: 0 1 auto;
}

.tasks-page#runeInfoPage {
    width: calc(100% - (var(--space) * 2));
    max-width: none;
    margin: var(--space) var(--space) 0;
}

.runeinfo-avatar-chat {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    border: 1px solid rgba(90, 103, 117, 0.52);
    background: rgba(17, 21, 27, 0.7);
    object-fit: cover;
    flex: 0 0 auto;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.runeinfo-avatar-chat.is-default,
.runeinfo-avatar-full-tab.is-default {
    opacity: 0.75;
}

.runeinfo-avatar-panel {
    display: grid;
    place-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.82);
    padding: 1rem;
    min-height: 220px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.runeinfo-avatar-full-tab {
    width: 120px;
    height: 200px;
    border-radius: 12px;
    border: 1px solid rgba(90, 103, 117, 0.52);
    background: rgba(17, 21, 27, 0.7);
    object-fit: contain;
    padding: 4px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.runeinfo-avatar-empty {
    margin: 0;
    color: #a9bed4;
    text-align: center;
}

.runeinfo-tab-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.35rem;
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 999px;
    background: rgba(17, 21, 27, 0.7);
    margin-bottom: 0.2rem;
}

.runeinfo-tab-button {
    border: 1px solid transparent;
    background: transparent;
    color: #c7d6e6;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.runeinfo-tab-button:hover {
    color: #eaf3ff;
    border-color: rgba(142, 164, 191, 0.32);
    transform: translateY(-1px);
}

.runeinfo-tab-button.is-active {
    color: #f5f9ff;
    border-color: rgba(142, 164, 191, 0.45);
    background: rgba(90, 159, 255, 0.2);
}

.runeinfo-tab-button:focus-visible {
    outline: 2px solid rgba(142, 164, 191, 0.92);
    outline-offset: 2px;
}

.runeinfo-tab-panel {
    display: grid;
    gap: var(--space);
    animation: runeinfo-fade-up 0.22s ease;
}

#runeInfoResultPanel {
    display: grid;
    gap: var(--space);
}

#runeInfoSummary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
}

#runeInfoSummary .profile-item {
    margin: 0;
    height: 100%;
}

.runeinfo-section-card {
    display: grid;
    gap: var(--space);
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.82);
    padding: 0.95rem;
}

.runeinfo-insight-section,
.runeinfo-activity-section {
    display: grid;
    gap: var(--space);
}

.runeinfo-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: var(--space);
    align-items: stretch;
}

.runeinfo-insight-card {
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.82);
    padding: 0.9rem;
    display: grid;
    gap: 0.35rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.runeinfo-insight-card h4 {
    margin: 0;
    font-size: 0.92rem;
    color: #d7e5f5;
}

.runeinfo-insight-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f0f6ff;
}

.runeinfo-mini-meter-group {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.55rem;
    align-items: center;
}

.runeinfo-mini-meter-label {
    font-size: 0.78rem;
    color: #9fb0c2;
}

.runeinfo-mini-meter {
    display: block;
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(24, 29, 35, 0.9);
    animation: runeinfo-meter-in 0.45s ease;
    transform-origin: left center;
}

.runeinfo-mini-meter::-webkit-progress-bar {
    background: rgba(24, 29, 35, 0.9);
}

.runeinfo-mini-meter.is-completed::-webkit-progress-value,
.runeinfo-mini-meter.is-completed::-moz-progress-bar {
    background: #58c47d;
}

.runeinfo-mini-meter.is-started::-webkit-progress-value,
.runeinfo-mini-meter.is-started::-moz-progress-bar {
    background: #d9ad58;
}

.runeinfo-mini-meter.is-not-started::-webkit-progress-value,
.runeinfo-mini-meter.is-not-started::-moz-progress-bar {
    background: #5b6572;
}

.runeinfo-mini-meter.is-melee::-webkit-progress-value,
.runeinfo-mini-meter.is-melee::-moz-progress-bar {
    background: #ec7b7b;
}

.runeinfo-mini-meter.is-ranged::-webkit-progress-value,
.runeinfo-mini-meter.is-ranged::-moz-progress-bar {
    background: #6dc39f;
}

.runeinfo-mini-meter.is-magic::-webkit-progress-value,
.runeinfo-mini-meter.is-magic::-moz-progress-bar {
    background: #719cff;
}

.runeinfo-rank-movement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: var(--space);
}

.runeinfo-rank-card {
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.82);
    padding: 0.9rem;
    display: grid;
    gap: 0.65rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.runeinfo-rank-card h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #d7e5f5;
}

.runeinfo-rank-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.runeinfo-rank-columns h5 {
    margin: 0 0 0.25rem;
    color: #cfd9e5;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.runeinfo-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}

.runeinfo-rank-list li {
    margin: 0;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    background: rgba(17, 21, 27, 0.7);
    display: grid;
    align-items: center;
    grid-template-columns: minmax(90px, 1fr) minmax(70px, 1.2fr) auto;
    gap: 0.55rem;
    transition: background-color 0.2s ease, transform 0.16s ease;
}

.runeinfo-rank-skill {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.runeinfo-rank-meter {
    display: block;
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(24, 29, 35, 0.9);
    animation: runeinfo-meter-in 0.45s ease;
    transform-origin: left center;
}

.runeinfo-rank-meter::-webkit-progress-bar {
    background: rgba(24, 29, 35, 0.9);
}

.runeinfo-rank-meter.is-gain::-webkit-progress-value,
.runeinfo-rank-meter.is-gain::-moz-progress-bar {
    background: #58c47d;
}

.runeinfo-rank-meter.is-loss::-webkit-progress-value,
.runeinfo-rank-meter.is-loss::-moz-progress-bar {
    background: #ec7b7b;
}

.runeinfo-rank-empty {
    color: #9fb0c2;
}

#runeInfoStatus.is-error {
    color: #ff8a8a;
}

.runeinfo-activity-timeline {
    display: grid;
    gap: 0.65rem;
}

.runeinfo-activity-item {
    border: 1px solid rgba(90, 103, 117, 0.32);
    border-radius: 12px;
    background: rgba(17, 21, 27, 0.7);
    padding: 0.75rem 0.85rem;
    display: grid;
    gap: 0.25rem;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    height: 100%;
}

.runeinfo-activity-title {
    margin: 0;
    color: #e6eef8;
    font-weight: 700;
}

.runeinfo-activity-date {
    color: #9fb0c2;
    font-size: 0.83rem;
}

.runeinfo-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: var(--space);
}

.runeinfo-chart-card {
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.82);
    padding: 0.9rem;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.runeinfo-ge-results {
    display: grid;
    gap: 0.55rem;
}

.runeinfo-ge-results-meta {
    margin: 0;
    color: #9fb0c2;
    font-size: 0.85rem;
}

.runeinfo-ge-result-item {
    width: 100%;
    border: 1px solid rgba(90, 103, 117, 0.36);
    border-radius: 12px;
    background: rgba(17, 21, 27, 0.7);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.7rem;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.runeinfo-ge-result-item:hover {
    transform: translateY(-1px);
    border-color: rgba(142, 164, 191, 0.5);
    background: rgba(24, 29, 37, 0.84);
}

.runeinfo-ge-result-item.is-active {
    border-color: rgba(142, 164, 191, 0.65);
    background: rgba(65, 97, 140, 0.22);
}

.runeinfo-ge-result-icon {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(90, 103, 117, 0.4);
    background: rgba(17, 21, 27, 0.82);
    object-fit: contain;
    padding: 2px;
    flex: 0 0 auto;
}

.runeinfo-ge-result-copy {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.runeinfo-ge-result-copy strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.runeinfo-ge-recommended-badge {
    margin-left: auto;
    border-radius: 999px;
    border: 1px solid rgba(120, 190, 130, 0.55);
    background: rgba(66, 122, 71, 0.25);
    color: #c4efc8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    line-height: 1.2;
    flex: 0 0 auto;
}

.runeinfo-ge-detail-hero {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.runeinfo-ge-detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 1px solid rgba(90, 103, 117, 0.52);
    background: rgba(17, 21, 27, 0.7);
    object-fit: contain;
    padding: 4px;
}

.runeinfo-ge-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 0.6rem;
}

.runeinfo-ge-stat-card {
    padding: 0.7rem;
}

.runeinfo-ge-stat-card.is-positive {
    border-color: rgba(57, 160, 109, 0.38);
    background: linear-gradient(180deg, rgba(26, 53, 38, 0.84) 0%, rgba(17, 21, 27, 0.96) 100%);
    color: #d9fae7;
}

.runeinfo-ge-stat-card.is-negative {
    border-color: rgba(191, 93, 93, 0.38);
    background: linear-gradient(180deg, rgba(57, 29, 29, 0.84) 0%, rgba(17, 21, 27, 0.96) 100%);
    color: #ffe3e3;
}

.runeinfo-ge-stat-card.is-neutral {
    border-color: rgba(90, 103, 117, 0.38);
    background: linear-gradient(180deg, rgba(21, 28, 36, 0.84) 0%, rgba(17, 21, 27, 0.96) 100%);
    color: #eef6ff;
}

.runeinfo-ge-stat-card h4,
.runeinfo-ge-stat-card .runeinfo-insight-value {
    color: inherit;
}

.runeinfo-ge-stat-card .runeinfo-insight-value {
    font-size: 0.95rem;
}

.runeinfo-chart-card h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #d7e5f5;
}

.runeinfo-ge-trend-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.55rem;
}

.runeinfo-ge-trend-insight-card {
    border: 1px solid rgba(90, 103, 117, 0.36);
    border-radius: 10px;
    background: rgba(17, 21, 27, 0.68);
    padding: 0.55rem 0.65rem;
    display: grid;
    gap: 0.2rem;
}

.runeinfo-ge-trend-insight-card h5 {
    margin: 0;
    font-size: 0.72rem;
    color: #a9bed4;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.runeinfo-ge-trend-insight-card p {
    margin: 0;
    font-size: 0.92rem;
    color: #eef6ff;
    font-weight: 700;
}

.runeinfo-ge-indicator-card {
    border-color: rgba(70, 140, 180, 0.3);
    background: rgba(17, 30, 40, 0.7);
}

.runeinfo-ge-indicator-card h5 {
    color: #5ba8d9;
}

.runeinfo-ge-indicator-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #d4e8f7;
}

.runeinfo-ge-indicator-strength {
    font-size: 0.75rem;
    color: #8ab0cc;
    margin-top: 0.3rem !important;
}

.runeinfo-ge-calculator-card {
    margin: 0 0 1.2rem 0;
    padding: 1rem;
}

.runeinfo-ge-calculator-form {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.runeinfo-ge-calculator-form .notes-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 0 1 auto;
}

.runeinfo-ge-calculator-form .notes-field span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a9bed4;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.runeinfo-ge-calculator-form .notes-field input {
    width: 140px;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(90, 103, 117, 0.5);
    border-radius: 6px;
    background: rgba(17, 21, 27, 0.6);
    color: #eef6ff;
    font-size: 0.95rem;
    font-family: inherit;
}

.runeinfo-ge-calculator-form .notes-field input:focus {
    outline: none;
    border-color: #5c8dd1;
    background: rgba(17, 21, 27, 0.8);
    box-shadow: 0 0 0 2px rgba(92, 141, 209, 0.15);
}

.runeinfo-ge-calc-result {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.runeinfo-ge-calc-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a9bed4;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.runeinfo-ge-calc-value {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #eef6ff;
}

#runeInfoOverallChart,
#runeInfoSkillChart,
#runeInfoGeTrendChart {
    width: 100% !important;
    height: 210px !important;
}

.runeinfo-chart-empty {
    margin: 0;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    border: 1px solid rgba(90, 103, 117, 0.42);
    background: rgba(17, 21, 27, 0.7);
    color: #a9bed4;
}

.runeinfo-skill-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.runeinfo-skill-table th,
.runeinfo-skill-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(90, 103, 117, 0.28);
    text-align: left;
    vertical-align: middle;
}

.runeinfo-skill-table th {
    color: #cfd9e5;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(17, 21, 27, 0.94);
    position: sticky;
    top: 0;
    z-index: 1;
}

.runeinfo-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.profile-post-card-view-button {
    padding: calc(var(--space) * 0.7) var(--space);
}

.runeinfo-sort-button:hover {
    color: #e6edf6;
}

.runeinfo-sort-button:focus-visible {
    outline: 2px solid rgba(142, 164, 191, 0.92);
    outline-offset: 2px;
    border-radius: 6px;
}

.runeinfo-sort-button.is-active {
    color: #f1f6fd;
}

.runeinfo-sort-indicator {
    font-size: 0.74rem;
    color: #9fb0c2;
}

.runeinfo-sort-button.is-active .runeinfo-sort-indicator {
    color: #d7e5f5;
}

.runeinfo-skill-table tbody tr:hover {
    background: rgba(142, 164, 191, 0.08);
}

.runeinfo-insight-card:hover,
.runeinfo-rank-card:hover,
.runeinfo-chart-card:hover,
.runeinfo-activity-item:hover,
.runeinfo-avatar-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(142, 164, 191, 0.5);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.runeinfo-rank-list li:hover {
    background: rgba(26, 33, 42, 0.86);
    transform: translateX(1px);
}

.runeinfo-result-hero:hover .runeinfo-avatar-chat,
.runeinfo-avatar-panel:hover .runeinfo-avatar-full-tab {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.runeinfo-skill-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 180px;
}

.runeinfo-skill-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
}

.runeinfo-skill-name,
.runeinfo-skill-stat,
.runeinfo-skill-progress-wrap {
    display: grid;
    gap: 0.3rem;
}

.runeinfo-skill-subtle {
    color: #9fb0c2;
    font-size: 0.84rem;
}

.runeinfo-skill-progress {
    position: relative;
    width: min(100%, 260px);
    height: 14px;
    background: rgba(50, 60, 72, 0.82);
    border: 1px solid rgba(142, 164, 191, 0.5);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(19, 24, 31, 0.9);
    overflow: hidden;
}

.runeinfo-skill-progress-meter {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: 999px;
    background: transparent;
    overflow: hidden;
    animation: runeinfo-meter-in 0.45s ease;
    transform-origin: left center;
}

.runeinfo-skill-progress-meter::-webkit-progress-bar {
    background: transparent;
}

.runeinfo-skill-progress-meter::-webkit-progress-value {
    background: #5a9fff;
    border-radius: 999px;
}

.runeinfo-skill-progress-meter::-moz-progress-bar {
    background: #5a9fff;
    border-radius: 999px;
}

.runeinfo-skill-progress-value {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    font-weight: 700;
    color: #e9f2ff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.78);
    letter-spacing: 0.01em;
    pointer-events: none;
}

.runeinfo-skill-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    align-items: center;
}

@media (min-width: 1160px) {
    #runeInfoModeGe {
        grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
        align-items: start;
    }

    #runeInfoModeGe > .runeinfo-search-shell {
        grid-column: 1 / -1;
    }

    #runeInfoGeResultsPanel {
        grid-column: 1;
    }

    #runeInfoGeDetailPanel {
        grid-column: 2;
    }

    .runeinfo-ge-results {
        max-height: calc(100vh - 320px);
        overflow-y: auto;
        padding-right: 0.2rem;
    }

    #runeInfoOverallChart,
    #runeInfoSkillChart,
    #runeInfoGeTrendChart {
        height: 240px !important;
    }
}

.luck-page {
    gap: var(--space);
}

.luck-shell {
    display: grid;
    gap: var(--space);
}

.luck-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.03em;
}

.luck-chip {
    align-self: start;
    border-radius: 999px;
    border: 1px solid rgba(142, 164, 191, 0.35);
    background: rgba(90, 159, 255, 0.18);
    color: #eaf3ff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
    white-space: nowrap;
}

.luck-question-form {
    display: grid;
    gap: var(--space);
}

.luck-help {
    margin: 0;
    color: #9fb0c2;
}

.luck-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.luck-preset-button,
.luck-actions button {
    border-radius: 999px;
    border: 1px solid rgba(142, 164, 191, 0.34);
    background: rgba(17, 21, 27, 0.72);
    color: #dce9f6;
    padding: 0.4rem 0.78rem;
    font-size: 0.79rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.luck-preset-button:hover,
.luck-actions button:hover {
    border-color: rgba(110, 180, 255, 0.6);
    background: rgba(48, 72, 103, 0.5);
}

.luck-preset-button:active,
.luck-actions button:active {
    transform: translateY(1px);
}

.luck-machine {
    display: grid;
    gap: var(--space);
}

.luck-machine.is-spinning {
    animation: luck-machine-pulse 660ms ease-in-out infinite;
}

.luck-machine-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space);
    flex-wrap: wrap;
}

.luck-machine-top h2 {
    margin: 0;
    font-size: 1.05rem;
}

.luck-subtle {
    margin: 0;
    color: #9fb0c2;
}

.luck-fate-pill {
    border-radius: 999px;
    border: 1px solid rgba(142, 164, 191, 0.35);
    background: rgba(17, 21, 27, 0.72);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #d7e5f5;
}

.luck-fate-pill.is-yes {
    border-color: rgba(120, 190, 130, 0.55);
    background: rgba(66, 122, 71, 0.22);
    color: #cbf7d0;
}

.luck-fate-pill.is-no {
    border-color: rgba(236, 123, 123, 0.55);
    background: rgba(122, 54, 54, 0.22);
    color: #ffd1d1;
}

.luck-fate-pill.is-maybe,
.luck-fate-pill.is-spinning {
    border-color: rgba(247, 199, 110, 0.45);
    background: rgba(92, 74, 34, 0.22);
    color: #ffe9bf;
}

.luck-reels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space);
}

.luck-reel {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border-radius: 18px;
    border: 1px solid rgba(90, 103, 117, 0.42);
    background: radial-gradient(circle at top, rgba(52, 61, 75, 0.92), rgba(17, 21, 27, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.luck-reel.is-settling {
    border-color: rgba(104, 173, 247, 0.45);
}

.luck-reel.is-landed {
    border-color: rgba(143, 205, 154, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(80, 138, 91, 0.22);
}

.luck-reel-label {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9fb0c2;
}

.luck-reel-window {
    height: 64px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(142, 164, 191, 0.24);
    background: linear-gradient(180deg, rgba(12, 15, 20, 0.95), rgba(24, 29, 35, 0.95));
    position: relative;
}

.luck-reel-window::before,
.luck-reel-window::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 18px;
    pointer-events: none;
    z-index: 1;
}

.luck-reel-window::before {
    top: 0;
    background: linear-gradient(180deg, rgba(17, 21, 27, 0.92), rgba(17, 21, 27, 0));
}

.luck-reel-window::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(17, 21, 27, 0.92), rgba(17, 21, 27, 0));
}

.luck-reel-strip {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.luck-reel-symbol {
    height: 64px;
    display: grid;
    place-items: center;
    gap: 0.1rem;
    color: #eef3fa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.luck-reel-glyph {
    font-size: 1.85rem;
    line-height: 1;
}

.luck-reel-name {
    font-size: 0.72rem;
    color: #9fb0c2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.luck-orb-shell {
    display: grid;
    place-items: center;
    padding: 0.5rem 0;
}

.luck-orb {
    width: min(100%, 380px);
    border-radius: 22px;
    border: 1px solid rgba(142, 164, 191, 0.42);
    background:
        radial-gradient(circle at 12% 18%, rgba(112, 171, 244, 0.16), rgba(112, 171, 244, 0) 36%),
        radial-gradient(circle at 84% 82%, rgba(143, 205, 154, 0.12), rgba(143, 205, 154, 0) 42%),
        linear-gradient(160deg, rgba(22, 28, 37, 0.97), rgba(10, 13, 18, 0.96));
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.36), 0 14px 20px rgba(0, 0, 0, 0.22);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.1rem 1.25rem;
    min-height: 160px;
    gap: 0.45rem;
    transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms ease;
    position: relative;
    overflow: hidden;
}

.luck-orb::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 16px;
    border: 1px solid rgba(154, 177, 205, 0.2);
    pointer-events: none;
}

.luck-orb.is-yes {
    border-color: rgba(112, 192, 126, 0.62);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.36), 0 0 24px rgba(90, 177, 107, 0.16), 0 14px 20px rgba(0, 0, 0, 0.22);
}

.luck-orb.is-no {
    border-color: rgba(226, 111, 111, 0.62);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.36), 0 0 24px rgba(214, 74, 74, 0.16), 0 14px 20px rgba(0, 0, 0, 0.22);
}

.luck-orb.is-maybe {
    border-color: rgba(245, 192, 106, 0.62);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 22px rgba(0, 0, 0, 0.36), 0 0 24px rgba(245, 192, 106, 0.16), 0 14px 20px rgba(0, 0, 0, 0.22);
}

.luck-orb.is-landing {
    animation: luck-orb-land 480ms ease-out 1;
}

.luck-orb-sigil {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px solid rgba(142, 164, 191, 0.42);
    background: linear-gradient(150deg, rgba(54, 71, 90, 0.8), rgba(20, 25, 31, 0.95));
    color: #dbe8f8;
    font-size: 1.55rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(230, 239, 250, 0.12);
}

.luck-orb strong {
    font-size: 1.55rem;
    letter-spacing: 0.02em;
}

.luck-orb-tone {
    color: #cfd8e2;
    font-size: 0.9rem;
}

.luck-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space);
}

.luck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.luck-history-shell {
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.72);
    padding: 0.95rem;
    display: grid;
    gap: 0.8rem;
}

.luck-history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.7rem;
}

.luck-history-item {
    border-radius: 12px;
    border: 1px solid rgba(142, 164, 191, 0.22);
    background: rgba(14, 18, 24, 0.86);
    padding: 0.65rem 0.7rem;
    display: grid;
    gap: 0.35rem;
}

.luck-history-item.is-yes {
    border-color: rgba(120, 190, 130, 0.45);
}

.luck-history-item.is-no {
    border-color: rgba(236, 123, 123, 0.45);
}

.luck-history-item.is-maybe {
    border-color: rgba(247, 199, 110, 0.42);
}

.luck-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin: 0;
    color: #dce9f6;
}

.luck-history-top span {
    font-size: 0.76rem;
    color: #9fb0c2;
}

.luck-history-question,
.luck-history-symbols {
    margin: 0;
    color: #d7e5f5;
    overflow-wrap: anywhere;
}

.luck-history-question {
    font-size: 0.88rem;
}

.luck-history-symbols {
    font-size: 0.8rem;
    color: #afbfce;
}

.luck-reading-card {
    border: 1px solid rgba(90, 103, 117, 0.42);
    border-radius: 14px;
    background: rgba(21, 25, 31, 0.82);
    padding: 0.9rem;
    display: grid;
    gap: 0.35rem;
}

.luck-reading-card h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #d7e5f5;
}

.luck-reading-value {
    margin: 0;
    color: #f0f6ff;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.luck-fate-meter {
    width: 100%;
    height: 14px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(24, 29, 35, 0.9);
}

.luck-fate-meter::-webkit-progress-bar {
    background: rgba(24, 29, 35, 0.9);
}

.luck-fate-meter::-webkit-progress-value {
    background: linear-gradient(90deg, #ec7b7b, #f7c76e, #58c47d);
    border-radius: 999px;
}

.luck-fate-meter::-moz-progress-bar {
    background: linear-gradient(90deg, #ec7b7b, #f7c76e, #58c47d);
    border-radius: 999px;
}

.luck-status {
    margin: 0;
    color: #9fb0c2;
    font-size: 0.9rem;
}

@keyframes luck-orb-land {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes luck-machine-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
    100% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .luck-reel-strip {
        transition: none !important;
    }

    .luck-machine,
    .luck-orb {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .luck-reels,
    .luck-result-grid {
        grid-template-columns: 1fr;
    }

    .luck-orb {
        width: min(100%, 360px);
    }

    .luck-history-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .runeinfo-tab-panel,
    .runeinfo-mini-meter,
    .runeinfo-rank-meter,
    .runeinfo-skill-progress-meter {
        animation: none !important;
    }

    .runeinfo-history-button,
    .runeinfo-avatar-chat,
    .runeinfo-avatar-full-tab,
    .runeinfo-avatar-panel,
    .runeinfo-tab-button,
    .runeinfo-insight-card,
    .runeinfo-rank-card,
    .runeinfo-rank-list li,
    .runeinfo-activity-item,
    .runeinfo-chart-card,
    .runeinfo-ge-result-item {
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .runeinfo-tab-bar {
        border-radius: 12px;
    }

    .runeinfo-tab-button {
        flex: 1 1 auto;
        min-width: 0;
    }

    .runeinfo-chart-grid {
        grid-template-columns: 1fr;
    }

    .runeinfo-insight-grid {
        grid-template-columns: 1fr;
    }

    .runeinfo-ge-stat-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .runeinfo-rank-movement-grid {
        grid-template-columns: 1fr;
    }

    .runeinfo-rank-columns {
        grid-template-columns: 1fr;
    }

    .runeinfo-rank-list li {
        grid-template-columns: 1fr;
    }

    .runeinfo-skill-table {
        min-width: 760px;
    }
}

@media (max-width: 640px) {
    .tasks-page#runeInfoPage {
        width: calc(100% - 14px);
        margin: var(--space) auto;
    }

    .runeinfo-result-hero {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .runeinfo-ge-detail-hero {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .runeinfo-avatar-chat {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .tasks-page#runeInfoPage .page-header-row > :last-child {
        flex: 1 1 100%;
        width: 100%;
    }

    .tasks-page#runeInfoPage .page-header-row > :last-child button,
    .tasks-page#runeInfoPage .page-header-row > :last-child select {
        width: 100%;
        max-width: 100%;
    }
}
