/* HiFiPeople Classic Mobile WAP Theme */
:root {
    --hifi-blue: #2A5DB0;
    --hifi-blue-dark: #004A99;
    --hifi-blue-link: #0000CD;
    --hifi-border: #A0C0D0;
    --hifi-input-border: #ADD8E6;
    --hifi-header-bg: #E1E8F0;
    --hifi-bg: #f4f7ff;
    --hifi-bg-alt: #F0F4F8;
    --hifi-bg-page: #f4f7ff;
    --hifi-text: #000000;
    --hifi-red: #CC0000;
    --hifi-orange: #CC6600;
    --hifi-magenta: #880E4F;
    --hifi-purple: #7F00FF;
    --hifi-btn-bg: #E8E8E8;
    --hifi-btn-border: #808080;
    --hifi-star: #FFD700;
}

* { box-sizing: border-box; }

body.hifi-mobile {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: var(--hifi-bg-page);
    color: var(--hifi-text);
    line-height: 1.45;
    max-width: 480px;
    margin: 0 auto;
}

body.hifi-mobile a { color: var(--hifi-blue-link); text-decoration: none; }
body.hifi-mobile a:hover { text-decoration: underline; }

/* App header — light blue bar + logo left (screenshot) */
.hifi-app-header {
    background: #fff;
    margin: -8px -10px 0;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #d0e0f0;
}
.hifi-app-header.hifi-header-blue {
    background: #e1e8f0;
    border-bottom: 1px solid #b8cce0;
    padding: 8px 12px 7px;
}
.hifi-app-header .hifi-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #2A5DB0;
    font-weight: bold;
    font-size: 19px;
    font-style: italic;
}
.hifi-logo-wing {
    width: 34px;
    height: 26px;
    flex-shrink: 0;
}
.hifi-subtitle-bar {
    background: #E8EEF7;
    margin: 0 -10px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: bold;
    color: #000;
    border-bottom: 1px solid #c8d8e8;
    line-height: 1.35;
}
/* Sky-blue bar — login / menu landing only */
.hifi-sky-bar {
    background: #00BFFF;
    margin: -8px -10px 0;
    padding: 10px 12px 8px;
    text-align: center;
}
.hifi-sky-bar .hifi-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #004080;
    font-weight: bold;
    font-size: 18px;
    justify-content: center;
}
.hifi-sky-time {
    font-size: 12px;
    color: #003366;
    font-weight: bold;
    margin-top: 4px;
}
.hifi-top-bar {
    background: var(--hifi-header-bg);
    margin: -8px -10px 0;
    padding: 10px 10px 0;
    border-bottom: 2px solid var(--hifi-input-border);
}
.hifi-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--hifi-blue-dark);
    font-weight: bold;
    font-size: 20px;
}
.hifi-logo-icon {
    width: 28px;
    height: 22px;
    background: linear-gradient(135deg, #FFD54F 40%, var(--hifi-blue) 40%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-30deg);
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid var(--hifi-blue-dark);
}
.hifi-logo-text { font-style: italic; letter-spacing: -0.3px; }

/* Auth / Login page — matches HiFiPeople.com mobile screenshot */
body.hifi-login-page {
    background: var(--hifi-bg-page);
    max-width: 100%;
}

.hifi-login-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--hifi-bg-page);
}

.hifi-login-header {
    background: var(--hifi-bg-page);
    padding: 10px 14px 0;
}

.hifi-login-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--hifi-blue);
}

.hifi-login-wing {
    width: 36px;
    height: 28px;
    flex-shrink: 0;
}

.hifi-login-brand {
    font-size: 19px;
    font-weight: bold;
    font-style: italic;
    color: var(--hifi-blue);
    letter-spacing: -0.2px;
}

.hifi-login-tagline {
    font-weight: bold;
    font-size: 15px;
    color: #000;
    margin: 6px 0 0;
    line-height: 1.3;
}

.hifi-login-rule {
    border: none;
    border-top: 1px solid var(--hifi-input-border);
    margin: 10px 0 0;
    height: 0;
}

.hifi-login-rule-spaced {
    margin-top: 14px;
}

.hifi-login-body {
    flex: 1;
    background: var(--hifi-bg-page);
    padding: 12px 14px 20px;
}

.hifi-login-intro {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin: 4px 0 10px;
    line-height: 1.45;
    color: #000;
}

.hifi-login-intro a { font-weight: bold; }

.hifi-login-stats {
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    margin: 6px 0 0;
    color: #000;
}

.hifi-login-form {
    margin-top: 12px;
}

.hifi-login-field {
    margin-bottom: 10px;
}

.hifi-login-field label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    color: #000;
}

.hifi-login-input {
    width: 100%;
    max-width: 280px;
    padding: 5px 8px;
    border: 1px solid var(--hifi-input-border);
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #000;
    box-shadow: 0 0 4px rgba(173, 216, 230, 0.55);
}

.hifi-login-input:focus {
    outline: none;
    border-color: #7EC8E3;
    box-shadow: 0 0 6px rgba(126, 200, 227, 0.7);
}

.hifi-login-btn {
    padding: 3px 18px;
    border: 1px solid var(--hifi-input-border);
    background: #fff;
    color: var(--hifi-blue);
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    font-family: inherit;
    margin-top: 2px;
    min-width: 70px;
}

.hifi-login-btn:hover { background: #f5fbff; }
.hifi-login-btn:disabled { opacity: 0.5; cursor: default; }

.hifi-login-forgot {
    margin: 8px 0 4px;
    font-size: 13px;
}

.hifi-login-signup-line {
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    margin: 10px 0 0;
    color: #000;
}

.hifi-login-back {
    margin: 0 0 10px;
    font-size: 13px;
}

.hifi-login-gplay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 155px;
    margin: 16px auto 8px;
    padding: 6px 12px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #333;
}

.hifi-login-gplay:hover {
    text-decoration: none;
    color: #fff;
    background: #222;
}

.hifi-gplay-icon {
    font-size: 22px;
    line-height: 1;
    color: #fff;
}

.hifi-gplay-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.hifi-gplay-text small {
    font-size: 9px;
    letter-spacing: 0.3px;
    font-weight: normal;
}

.hifi-gplay-text strong {
    font-size: 15px;
    font-weight: normal;
    letter-spacing: -0.3px;
}

.hifi-login-footer {
    background: #fff;
    padding: 0 14px 16px;
}

.hifi-login-footer .hifi-login-rule {
    margin-bottom: 10px;
}

.hifi-login-menu {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--hifi-blue-link);
    text-decoration: none;
}

.hifi-login-page .hifi-auth-msg {
    padding: 6px 8px;
    margin-bottom: 8px;
    font-size: 13px;
    border-radius: 3px;
    max-width: 280px;
}
.hifi-login-page .hifi-auth-msg.error { background: #ffe0e0; color: #900; border: 1px solid #faa; }
.hifi-login-page .hifi-auth-msg.success { background: #e0ffe0; color: #060; border: 1px solid #afa; }

.hifi-login-page .hifi-signup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 280px;
}
@media (max-width: 360px) {
    .hifi-login-page .hifi-signup-grid { grid-template-columns: 1fr; }
}

/* Legacy auth classes (signup on other pages) */
.hifi-auth-page {
    padding: 0 14px 30px;
    background: var(--hifi-bg);
    min-height: 100vh;
}
.hifi-auth-page .hifi-top-bar {
    margin: 0 -14px 12px;
    padding: 12px 14px 10px;
}
.hifi-auth-header {
    padding-bottom: 4px;
}
.hifi-auth-subtitle {
    font-weight: bold;
    font-size: 15px;
    margin: 8px 0 0;
    color: var(--hifi-text);
}
.hifi-auth-intro {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 8px;
    line-height: 1.5;
}
.hifi-auth-msg {
    padding: 6px 8px;
    margin-bottom: 8px;
    font-size: 13px;
    border-radius: 3px;
}
.hifi-auth-msg.error { background: #ffe0e0; color: #900; border: 1px solid #faa; }
.hifi-auth-msg.success { background: #e0ffe0; color: #060; border: 1px solid #afa; }
.hifi-form-row {
    margin-bottom: 12px;
}
.hifi-form-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}
.hifi-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--hifi-input-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    box-shadow: inset 0 1px 3px rgba(173,216,230,0.35), 0 0 0 1px rgba(173,216,230,0.2);
}
.hifi-input:focus {
    outline: none;
    border-color: var(--hifi-blue);
    box-shadow: inset 0 1px 3px rgba(173,216,230,0.35), 0 0 6px rgba(42,93,176,0.25);
}
.hifi-btn {
    padding: 5px 20px;
    border: 1px solid var(--hifi-input-border);
    background: #fff;
    color: var(--hifi-blue);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
    font-weight: normal;
}
.hifi-btn:hover { background: #f0f8ff; }
.hifi-btn:disabled { opacity: 0.45; cursor: default; }
.hifi-btn-primary {
    background: #fff;
    border: 1px solid var(--hifi-blue);
    color: var(--hifi-blue);
    font-weight: bold;
}
.hifi-stats-line {
    font-size: 13px;
    font-weight: bold;
    padding: 8px 0;
    border-bottom: 1px solid var(--hifi-input-border);
    margin-bottom: 12px;
    text-align: center;
}
.hifi-divider { border-top: 1px solid var(--hifi-input-border); margin: 14px 0; }
.hifi-footer-link { font-size: 13px; margin-top: 12px; text-align: center; }
.hifi-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    margin-top: 16px;
    color: var(--hifi-blue-link);
    text-decoration: none;
}
.hifi-play-badge {
    display: block;
    text-align: center;
    margin: 16px auto;
    padding: 8px 16px;
    background: #222;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    max-width: 160px;
    letter-spacing: 0.5px;
}

/* Page wrapper */
.hifi-page { padding: 8px 10px 80px; background: var(--hifi-bg); min-height: 100vh; }
.hifi-section-title {
    font-weight: bold;
    font-size: 15px;
    border-bottom: 1px solid #aaa;
    padding-bottom: 4px;
    margin: 14px 0 8px;
}

/* Nav buttons — left-aligned mig33 grey buttons (screenshot) */
.hifi-nav-wrap {
    margin: 6px 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d8d8d8;
}
.hifi-nav-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
    justify-content: flex-start;
}
.hifi-nav-grid-2 {
    margin-bottom: 0;
}
.hifi-nav-btn {
    display: inline-block;
    padding: 5px 8px;
    min-width: 72px;
    background: linear-gradient(180deg, #f2f2f2 0%, #d4d4d4 100%);
    border: 1px solid #666;
    border-radius: 5px;
    color: #000;
    text-decoration: none;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 1px 0 rgba(0,0,0,0.06);
}
.hifi-nav-grid .hifi-nav-btn {
    flex: 1 1 calc(25% - 4px);
    max-width: calc(25% - 3px);
}
.hifi-nav-grid-2 .hifi-nav-btn {
    flex: 1 1 calc(50% - 4px);
    max-width: calc(50% - 2px);
}
@media (max-width: 360px) {
    .hifi-nav-grid .hifi-nav-btn { flex: 1 1 calc(50% - 4px); max-width: calc(50% - 2px); }
}
.hifi-nav-btn:hover {
    background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 100%);
    text-decoration: none;
    color: #000;
}
.hifi-nav-btn.active {
    background: linear-gradient(180deg, #d8ecff 0%, #b8d4f0 100%);
    border-color: #2A5DB0;
    font-weight: bold;
    color: #003366;
}

/* Activity ticker */
.hifi-activity-ticker {
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 8px;
    line-height: 1.5;
}
.hifi-activity-ticker img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    border-radius: 2px;
    margin: 0 3px;
    object-fit: cover;
}

/* Announcements */
.hifi-announcement {
    position: relative;
    text-align: center;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #b8d4f0;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 50%, #f8fbff 100%);
    box-shadow: 0 2px 8px rgba(42, 93, 176, 0.12);
}
.hifi-announce-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(42, 93, 176, 0.06), transparent);
    animation: hifi-announce-shine 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes hifi-announce-shine {
    0%, 100% { opacity: 0.3; transform: translateX(-100%); }
    50% { opacity: 1; transform: translateX(100%); }
}
.hifi-announce-inner {
    position: relative;
    padding: 12px 10px;
}
.hifi-announcement .greeting { color: var(--hifi-blue); font-size: 15px; font-weight: bold; }
.hifi-announcement .username { color: var(--hifi-red); font-weight: bold; }
.hifi-announcement .message { color: var(--hifi-orange); margin: 10px 0; font-size: 13px; font-weight: bold; line-height: 1.5; }
.hifi-announce-sep {
    font-size: 11px;
    color: #888;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.hifi-announce-arrow {
    width: 18px;
    height: 12px;
    vertical-align: middle;
    flex-shrink: 0;
}
.hifi-announcement .footer { font-size: 13px; margin-top: 4px; }
.hifi-announcement .footer .stay { color: var(--hifi-red); }
.hifi-announcement .footer .community { color: var(--hifi-blue); font-weight: bold; }
.hifi-announce-links {
    font-size: 13px;
    line-height: 2;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hifi-announce-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: bold;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}
.hifi-announce-link:hover { background: rgba(42, 93, 176, 0.08); text-decoration: none; }
.hifi-announce-links .link-red { color: #CC0000; }
.hifi-announce-links .link-green { color: #009900; }
.hifi-announce-links .link-teal { color: #008080; font-weight: bold; }
.hifi-announce-links .link-purple { color: #660099; }
.hifi-announce-links .link-orange { color: #CC6600; font-weight: bold; }
.hifi-announce-links .link-blue { color: #0000CC; }
.hifi-announce-links .link-magenta { color: #CC0066; font-weight: bold; }
.hifi-profile-complete-bar {
    margin: 10px auto;
    max-width: 280px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #d0e4f8;
    border-radius: 8px;
}
.hifi-profile-complete-label {
    font-size: 12px;
    color: #444;
    margin-bottom: 6px;
}
.hifi-profile-complete-label b { color: var(--hifi-blue); }
.hifi-profile-complete-link {
    margin-left: 6px;
    font-size: 11px;
    color: var(--hifi-red);
    font-weight: bold;
    text-decoration: none;
}
.hifi-profile-complete-link:hover { text-decoration: underline; }
.hifi-profile-complete-track {
    height: 8px;
    background: #e8f0fa;
    border-radius: 4px;
    overflow: hidden;
}
.hifi-profile-complete-fill {
    height: 100%;
    background: linear-gradient(90deg, #2A5DB0, #4A8AE8);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Shoutbox card (dashboard) */
.hifi-shoutbox { margin-bottom: 8px; }
.hifi-shout {
    border: 1px solid var(--hifi-border);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}
.hifi-shout-header {
    padding: 8px 10px 4px;
    font-size: 13px;
}
.hifi-shout-header a { font-weight: bold; }
body.hifi-mobile a.hifi-username,
body.hifi-mobile .hifi-username { color: var(--hifi-blue-link); font-weight: bold; text-decoration: none; }
body.hifi-mobile a.hifi-username.female,
body.hifi-mobile .hifi-username.female,
body.hifi-mobile .hifi-username.female b,
body.hifi-mobile .hifi-comment-user.female b,
body.hifi-mobile .hifi-profile-name.female { color: #CC0066 !important; }
.hifi-shout-header .avatar,
.hifi-shout-header .hifi-shout-avatar {
    width: 36px;
    height: 28px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 4px;
    object-fit: cover;
}
.hifi-shout-header .hifi-shout-avatar.is-portrait {
    width: 28px;
    height: 44px;
}
.hifi-shout-header .hifi-shout-avatar.is-landscape {
    width: 52px;
    height: 34px;
}
.hifi-shout-body {
    padding: 4px 10px 10px;
    font-size: 14px;
    word-break: break-word;
    line-height: 1.5;
}
.hifi-shout-media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--hifi-border);
}
.hifi-shout-media-grid.is-single {
    grid-template-columns: 1fr;
    max-width: 180px;
}
.hifi-shout-media-grid.cols-3 .hifi-shout-media-thumb:first-child {
    grid-column: span 2;
    grid-row: span 2;
}
.hifi-shout-media-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: #eef3f8;
    cursor: pointer;
    aspect-ratio: 1;
}
.hifi-shout-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hifi-shout-media-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    pointer-events: none;
}
.hifi-zoomable {
    cursor: zoom-in;
}
.hifi-profile-pic-main.hifi-zoomable:hover {
    opacity: 0.92;
}
.hifi-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
}
.hifi-lightbox.open {
    display: block;
}
.hifi-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}
.hifi-lightbox-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 12px 36px;
    pointer-events: none;
}
.hifi-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}
.hifi-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.hifi-lightbox-close:hover {
    background: rgba(204, 0, 0, 0.85);
}
.hifi-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.hifi-lightbox-nav:hover {
    background: rgba(42, 93, 176, 0.9);
}
.hifi-lightbox-prev { left: 8px; }
.hifi-lightbox-next { right: 8px; }
.hifi-lightbox-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #fff;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 10px;
    border-radius: 12px;
}
body.hifi-lightbox-open {
    overflow: hidden;
}
.hifi-shout-footer {
    background: var(--hifi-bg-alt);
    padding: 6px 10px;
    border-top: 1px solid var(--hifi-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hifi-shout-footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--hifi-blue-link);
    text-decoration: none;
    padding: 2px 0;
}
.hifi-shout-footer-link:hover { text-decoration: underline; }
.hifi-shout-footer-link.active { font-weight: bold; }
.hifi-act-icon { font-size: 14px; width: 18px; text-align: center; }

/* Shout navigation */
.hifi-shout-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 10px 0 14px;
}
.hifi-nav-arrow {
    padding: 5px 18px;
    background: var(--hifi-btn-bg);
    border: 1px solid var(--hifi-btn-border);
    border-radius: 5px;
    color: var(--hifi-blue-link);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.hifi-nav-arrow:hover:not(:disabled) { background: #ddd; }
.hifi-nav-arrow:disabled { opacity: 0.35; cursor: default; }

/* Shout detail (view_post) */
.hifi-shout-detail {
    text-align: center;
    padding: 10px 6px 6px;
    margin-bottom: 4px;
}
.hifi-shout-detail-user {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.6;
}
.hifi-shout-detail-user a { font-weight: normal; color: var(--hifi-blue-link); }
.hifi-shout-detail-avatar {
    width: 22px;
    height: 22px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid #333;
    vertical-align: middle;
    margin: 0 3px;
}
.hifi-shout-detail-body {
    font-size: 14px;
    line-height: 1.55;
    margin: 8px 0;
    word-break: break-word;
}
.hifi-shout-detail-body .hifi-shout-media-grid {
    margin: 8px auto 0;
}
.hifi-shout-detail-meta {
    font-size: 12px;
    color: #444;
    margin: 8px 0 10px;
    line-height: 1.5;
}
.hifi-shout-detail-reactions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    font-size: 13px;
    padding: 10px 0 4px;
}
.hifi-react-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--hifi-blue-link);
    text-decoration: none;
    white-space: nowrap;
}
.hifi-react-link:hover { text-decoration: underline; }
.hifi-react-link.active { font-weight: bold; }
.hifi-react-gif {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

/* Shout input */
.hifi-shout-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0;
    flex-wrap: wrap;
}
.hifi-shout-form label { font-weight: bold; white-space: nowrap; }
.hifi-shout-form input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 6px 8px;
    border: 1px solid var(--hifi-input-border);
    border-radius: 4px;
    font-size: 14px;
    box-shadow: inset 0 1px 2px rgba(173,216,230,0.3);
}
.hifi-attach-btn {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.hifi-attach-btn input { display: none; }

/* Comments section on view_post */
.hifi-comments-section { margin-top: 8px; padding: 0 2px; text-align: left; }
.hifi-comments-heading { margin-bottom: 6px; font-size: 14px; }
.hifi-no-comments { font-size: 13px; margin: 6px 0 12px; color: var(--hifi-text); }
.hifi-comment-item {
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.45;
}
.hifi-comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.hifi-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid #999;
    flex-shrink: 0;
}
.hifi-comment-user { color: var(--hifi-blue-link); text-decoration: none; font-size: 13px; }
.hifi-comment-user:hover { text-decoration: underline; }
.hifi-comment-body {
    padding-left: 36px;
    word-break: break-word;
    color: var(--hifi-text);
}
.hifi-comment-time {
    padding-left: 36px;
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}
.hifi-comment-typing {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin: 6px 0 4px;
    min-height: 16px;
}
.hifi-comment-form { margin-top: 10px; }
.hifi-comment-label { margin-bottom: 6px; font-size: 14px; }
.hifi-comment-form .hifi-input {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 6px 8px;
    border: 1px solid var(--hifi-input-border);
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}
.hifi-comment-add-btn { font-size: 13px; padding: 4px 14px; }
.hifi-back-link {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
    color: var(--hifi-blue-link);
}

/* Profile — member band after nav (lavender, screenshot) */
.hifi-profile-member-band {
    background: #E6E6FA;
    margin: 0 -10px 10px;
    padding: 10px 12px;
    border-top: 1px solid #c8c8e0;
    border-bottom: 1px solid #c8c8e0;
}
.hifi-profile-member-band .hifi-profile-name {
    font-weight: bold;
    font-size: 17px;
    color: #000;
}
.hifi-profile-member-band .hifi-profile-rank,
.hifi-profile-member-band .hifi-profile-title {
    font-weight: bold;
    font-size: 13px;
}
.hifi-profile-member-band .hifi-profile-stars {
    color: var(--hifi-star);
    font-size: 14px;
    letter-spacing: -1px;
    margin: 2px 0;
}
.hifi-profile-photo-block {
    text-align: center;
    padding: 12px 0;
    margin: 8px 0;
    background: #fff;
}
.hifi-profile-pic-main {
    width: 110px;
    height: 130px;
    object-fit: cover;
    border: 2px solid var(--hifi-red);
    border-radius: 2px;
    display: block;
    margin: 0 auto 10px;
}
.hifi-profile-status { font-size: 14px; }
.hifi-profile-idle { font-weight: bold; font-size: 13px; margin-top: 6px; }
.hifi-profile-privacy { text-align: center; font-size: 13px; margin: 8px 0; }

/* Profile wall shouts */
.hifi-profile-wall-shout {
    background: #F0F8FF;
    border: 1px solid #c0d8f0;
    padding: 12px 10px;
    margin: 0 0 10px;
    text-align: center;
}
.hifi-wall-quote {
    font-weight: bold;
    font-style: italic;
    color: #0000CC;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
    word-break: break-word;
}
.hifi-wall-author {
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    margin-top: 6px;
}
.hifi-wall-author a { color: #000; }
.hifi-wall-time {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}
.hifi-wall-private {
    color: var(--hifi-red);
    font-size: 11px;
}
.hifi-wall-empty {
    text-align: center;
    font-size: 13px;
    color: #666;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px dashed #ccc;
}
.hifi-profile-wall-actions {
    text-align: right;
    margin: 4px 0 10px;
    padding: 0 2px;
}
.hifi-wall-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 4px;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    color: #0000CD;
    box-shadow: none;
}
.hifi-wall-toggle-btn:hover {
    background: none;
    text-decoration: underline;
}
.hifi-wall-toggle-icon {
    font-size: 13px;
    line-height: 1;
}
.hifi-profile-wall-form-wrap {
    margin: 8px 0 0 auto;
    padding: 10px;
    border: 1px solid var(--hifi-border);
    background: #fff;
    max-width: 280px;
    text-align: left;
}
.hifi-wall-cancel-btn {
    margin-left: 6px;
}
.hifi-wall-form-label { font-size: 13px; margin-bottom: 6px; }
.hifi-wall-textarea {
    width: 100%;
    margin-bottom: 6px;
    resize: vertical;
    min-height: 60px;
}
.hifi-wall-private-label {
    display: block;
    font-size: 12px;
    margin: 6px 0 8px;
}
.hifi-profile-info-card {
    background: #fff;
    border: 1px solid #d0e0f0;
    padding: 14px 18px;
    margin: 10px 0;
    border-radius: 4px;
}
.hifi-profile-info-card .hifi-profile-bio-line {
    margin: 5px 0;
    text-align: left;
}
.hifi-info-line {
    display: block;
    line-height: 1.5;
    word-break: break-word;
}
.hifi-location-line {
    line-height: 1.5;
    word-break: break-word;
}
.hifi-profile-realname {
    font-weight: bold;
    display: inline;
}
.hifi-loc-item {
    display: inline;
    white-space: normal;
}
.hifi-loc-label {
    font-weight: bold;
}
.hifi-loc-icon {
    display: inline-block;
    margin: 0 2px;
}
.hifi-loc-current { /* 📍 current location */ }
.hifi-loc-permanent { /* 🏡 permanent/home */ }
.hifi-relationship-line {
    font-weight: bold;
    color: #6A0DAD;
}
.hifi-wall-image {
    max-width: 100%;
    border: 2px solid var(--hifi-red);
    margin-bottom: 8px;
}

.hifi-profile-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.hifi-profile-info { flex: 1; }
.hifi-profile-name { font-weight: bold; font-size: 16px; }
.hifi-profile-rank { font-weight: bold; font-size: 13px; }
.hifi-profile-stars { color: var(--hifi-star); font-size: 14px; letter-spacing: -1px; }
.hifi-profile-title { font-weight: bold; font-size: 13px; margin-top: 2px; }
.hifi-profile-pic {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    flex-shrink: 0;
}
.hifi-profile-center {
    text-align: center;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
    margin: 10px 0;
}
.hifi-profile-details {
    font-size: 13px;
    line-height: 1.8;
    padding: 6px 18px 12px;
    margin: 0 0 10px;
    text-align: left;
}
.hifi-profile-details b { font-weight: bold; }
.hifi-profile-details .loc { color: var(--hifi-red); }
.hifi-profile-bio-line {
    text-align: center;
    color: var(--hifi-magenta);
    font-size: 13px;
    margin: 8px 0;
    line-height: 1.5;
}
.hifi-profile-bio-line.blue { color: var(--hifi-blue-link); }
.hifi-profile-bio-line.purple { color: #6A0DAD; }
.hifi-message-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 10px 0;
}
.hifi-message-form label { font-weight: bold; }
.hifi-mind-status {
    text-align: center;
    margin: 14px 0;
}
.hifi-mind-status h3 { font-size: 14px; margin: 0 0 8px; }
.hifi-subnav {
    text-align: center;
    font-size: 12px;
    margin: 12px 0;
    color: var(--hifi-blue-link);
}
.hifi-subnav a { color: var(--hifi-blue-link); text-decoration: none; }
.hifi-subnav a:hover { text-decoration: underline; }

/* Purple ticker bar */
.hifi-ticker-bar {
    background: var(--hifi-purple);
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    margin: -8px -10px 10px;
    overflow: hidden;
    white-space: nowrap;
}

/* View panel toggle */
.view-panel { display: none; }
.view-panel.active { display: block; }

/* Signup extras */
.hifi-signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 360px) { .hifi-signup-grid { grid-template-columns: 1fr; } }

/* Loading */
.hifi-loading { text-align: center; padding: 20px; color: #666; font-size: 13px; }

/* Hide aura elements on hifi pages */
body.hifi-mobile #mobile-only-overlay,
body.hifi-mobile .aura-time-tracker,
body.hifi-mobile .orbit-nav,
body.hifi-mobile .vibe-header,
body.hifi-mobile .aura-auth-bg,
body.hifi-mobile .aura-auth-container,
body.hifi-mobile .left-sidebar,
body.hifi-mobile .right-sidebar,
body.hifi-mobile .twitter-layout .left-sidebar { display: none !important; }
body.hifi-mobile .twitter-layout,
body.hifi-mobile .main-feed { width: 100% !important; margin: 0 !important; border: none !important; }

/* ========== MENU PAGE (more.php) ========== */
.hifi-menu-user {
    background: #E6EAF5;
    margin: 0 -10px 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--hifi-border);
}
.hifi-menu-user .hifi-profile-name { font-size: 15px; }
.hifi-menu-user .hifi-profile-rank,
.hifi-menu-user .hifi-profile-title { font-size: 12px; }
.hifi-menu-list { margin: 8px 0 16px; }
.hifi-menu-item {
    display: block;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    color: var(--hifi-blue-link);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}
.hifi-menu-item:hover { background: #f0f8ff; text-decoration: none; color: var(--hifi-blue-link); }
.hifi-menu-item .menu-icon { margin-right: 6px; }
.hifi-menu-item.danger { color: var(--hifi-red); }
.hifi-menu-section {
    font-weight: bold;
    font-size: 13px;
    color: #660099;
    border-bottom: 1px solid #aaa;
    padding-bottom: 3px;
    margin: 14px 0 8px;
}
.hifi-menu-center { text-align: center; }
.hifi-menu-center .hifi-menu-link {
    display: inline-block;
    margin: 4px 6px;
    font-size: 13px;
    font-weight: bold;
}
.hifi-menu-divider {
    text-align: center;
    font-size: 11px;
    color: #009900;
    margin: 8px 0;
    letter-spacing: 1px;
}

/* ========== LIST / NOTIFICATION ITEMS ========== */
.hifi-list { margin: 8px 0; }
.hifi-list-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}
.hifi-list-item a { font-weight: bold; }
.hifi-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #ccc;
}
.hifi-list-meta { font-size: 11px; color: #666; margin-top: 2px; }
.hifi-empty-box {
    text-align: center;
    padding: 24px 12px;
    border: 1px solid var(--hifi-border);
    background: #fff;
    font-size: 13px;
    margin: 10px 0;
}
.hifi-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0 12px;
}
.hifi-tab {
    padding: 4px 10px;
    background: var(--hifi-btn-bg);
    border: 1px solid var(--hifi-btn-border);
    border-radius: 3px;
    font-size: 12px;
    color: var(--hifi-blue-link);
    text-decoration: none;
}
.hifi-tab.active { background: #d0e8ff; font-weight: bold; border-color: var(--hifi-blue); }

/* ========== SEARCH / FRIENDS ========== */
.hifi-search-form {
    display: flex;
    gap: 6px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.hifi-search-form .hifi-input { flex: 1; min-width: 140px; }
.hifi-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.hifi-user-row img {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #ccc;
}
.hifi-user-row .hifi-btn { padding: 3px 10px; font-size: 12px; margin-left: auto; }

/* ========== SETTINGS / FORM PAGES ========== */
.hifi-settings-block {
    background: #fff;
    border: 1px solid var(--hifi-border);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.hifi-settings-block h3 {
    font-size: 14px;
    margin: 0 0 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}
.hifi-settings-block label { font-size: 13px; font-weight: bold; }
.hifi-settings-block select.hifi-input,
.hifi-settings-block textarea.hifi-input { margin-top: 4px; margin-bottom: 8px; }

/* ========== MESSENGER (retro chat) ========== */
body.hifi-mobile .messenger-stack {
    display: block;
    height: auto;
    gap: 0;
    padding: 0;
}
body.hifi-mobile .conv-stack {
    max-width: 100%;
    margin-bottom: 10px;
}
body.hifi-mobile .conv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    margin-bottom: 4px;
    background: #fff;
    text-decoration: none;
    color: #000;
    font-size: 13px;
}
body.hifi-mobile .conv-item:hover { background: #f0f8ff; }
body.hifi-mobile .chat-stack {
    border-radius: 4px;
    border: 1px solid var(--hifi-border);
    box-shadow: none;
    background: #fff;
    min-height: 300px;
}
body.hifi-mobile .chat-header-bar {
    background: #E8EEF7;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hifi-border);
    font-weight: bold;
    font-size: 13px;
}
body.hifi-mobile .chat-bubble {
    border-radius: 4px !important;
    font-size: 13px;
    padding: 6px 10px !important;
    box-shadow: none !important;
}
body.hifi-mobile .chat-input-bar {
    border-top: 1px solid var(--hifi-border);
    padding: 6px;
    background: #f8f8f8;
}
body.hifi-mobile .chat-input-bar input,
body.hifi-mobile .chat-input-bar textarea {
    border: 1px solid var(--hifi-input-border);
    border-radius: 3px;
    font-size: 13px;
    padding: 5px 8px;
}

/* ========== MESSENGER INBOX LIST ========== */
.hifi-msg-list-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 12px;
}
.hifi-msg-inbox {
    max-width: 100% !important;
    margin-bottom: 0;
}
.hifi-msg-search-wrap {
    margin-bottom: 10px;
}
.hifi-msg-search-input {
    width: 100%;
    margin: 0;
}
.hifi-msg-sparks-box {
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
    border: 1px solid var(--hifi-border);
    border-radius: 6px;
    padding: 10px 8px;
    margin-bottom: 12px;
}
.hifi-msg-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 2px;
}
.hifi-msg-section-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--hifi-blue);
}
.hifi-msg-section-hint {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
}
.hifi-msg-sparks-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.hifi-msg-sparks-scroll::-webkit-scrollbar { display: none; }
.hifi-msg-spark-card {
    flex: 0 0 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #000;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 6px;
    padding: 8px 4px 6px;
    transition: background 0.15s;
}
.hifi-msg-spark-card:hover {
    background: #f0f8ff;
    text-decoration: none;
    color: #000;
}
.hifi-msg-spark-card.online {
    border-color: #9fd49f;
    background: #f6fff6;
}
.hifi-msg-spark-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
}
.hifi-msg-spark-avatar {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ccc;
}
.hifi-msg-spark-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #009900;
    border: 2px solid #fff;
    border-radius: 50%;
}
.hifi-msg-spark-name {
    font-size: 11px;
    font-weight: bold;
    color: var(--hifi-blue-link);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hifi-msg-spark-action {
    font-size: 9px;
    color: #666;
    margin-top: 2px;
}
.hifi-msg-inbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.hifi-msg-inbox-head .hifi-section-title {
    margin: 0;
    flex: 1;
}
.hifi-msg-squad-btn {
    font-size: 11px !important;
    padding: 4px 10px !important;
    white-space: nowrap;
}
.hifi-msg-conv-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.hifi-msg-conv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    text-decoration: none;
    color: #000;
    transition: background 0.15s;
}
.hifi-msg-conv-item:hover {
    background: #f0f8ff;
    text-decoration: none;
    color: #000;
}
.hifi-msg-conv-item.active {
    background: #e8f4ff;
    border-color: var(--hifi-blue);
    border-left: 3px solid var(--hifi-blue);
}
.hifi-msg-conv-item.has-unread {
    border-left: 3px solid var(--hifi-red);
}
.hifi-msg-conv-item.has-unread.active {
    border-left: 3px solid var(--hifi-blue);
}
.hifi-msg-conv-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.hifi-msg-conv-avatar {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ccc;
    display: block;
}
.hifi-msg-conv-avatar.is-group {
    border-radius: 4px;
    background: #E6EAF5;
}
.hifi-msg-conv-online {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #009900;
    border: 2px solid #fff;
    border-radius: 50%;
}
.hifi-msg-conv-body {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}
.hifi-msg-conv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}
.hifi-msg-conv-name {
    font-size: 13px;
    font-weight: bold;
    color: var(--hifi-blue-link);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hifi-msg-conv-time {
    font-size: 10px;
    color: #888;
    flex-shrink: 0;
}
.hifi-msg-conv-preview {
    font-size: 11px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hifi-msg-conv-item.has-unread .hifi-msg-conv-preview {
    font-weight: bold;
    color: #333;
}
.hifi-msg-unread-badge {
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--hifi-red);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    border-radius: 10px;
}
.hifi-msg-menu-link {
    display: block;
    margin-top: 8px;
}

/* ========== MESSENGER CONVERSATION (DM chat) ========== */
body.hifi-msg-chat-mode {
    overflow: hidden;
    background: var(--hifi-bg-page) !important;
}
body.hifi-msg-chat-mode .messenger-stack {
    display: block;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}
body.hifi-msg-chat-mode .conv-stack { display: none !important; }
body.hifi-msg-chat-mode .chat-stack,
body.hifi-msg-chat-mode .hifi-msg-chat {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--hifi-bg-page) !important;
    overflow: hidden;
}
body.hifi-mobile:not(.hifi-msg-chat-mode) .chat-stack { display: none !important; }

.hifi-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: var(--hifi-header-bg);
    border-bottom: 1px solid var(--hifi-border);
    flex-shrink: 0;
}
.hifi-msg-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.hifi-msg-back {
    color: var(--hifi-blue-link);
    font-weight: bold;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}
.hifi-msg-header-img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.hifi-msg-header-info { min-width: 0; }
.hifi-msg-header-title {
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #000;
}
.hifi-msg-header-status {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hifi-msg-online-dot {
    width: 7px;
    height: 7px;
    background: #009900;
    border-radius: 50%;
    display: inline-block;
}
.hifi-msg-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.hifi-msg-icon-btn {
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 3px;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: #333;
}
.hifi-msg-dropdown {
    border: 1px solid var(--hifi-border) !important;
    border-radius: 4px !important;
    font-size: 13px;
    min-width: 160px;
}
.hifi-msg-dropdown .dropdown-item {
    font-size: 13px;
    padding: 6px 12px;
}
.hifi-msg-search-bar {
    padding: 6px 10px;
    background: #fff;
    border-bottom: 1px solid var(--hifi-border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.hifi-msg-search-bar .hifi-input {
    flex: 1;
    min-width: 0;
    margin: 0;
}
.hifi-msg-search-close {
    background: var(--hifi-btn-bg);
    border: 1px solid var(--hifi-btn-border);
    border-radius: 3px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: var(--hifi-blue-link);
}
.hifi-msg-search-info {
    width: 100%;
    font-size: 11px;
    color: #666;
}
.hifi-msg-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 10px;
    background: var(--hifi-bg-page);
    display: flex;
    flex-direction: column;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
body.hifi-msg-chat-mode .hifi-msg-chat,
body.hifi-msg-chat-mode .chat-stack {
    overflow-x: hidden;
    max-width: 100%;
}
.hifi-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    max-width: 100%;
    margin-bottom: 4px;
}
.hifi-msg-row.sent {
    flex-direction: row-reverse;
    justify-content: flex-start;
}
.hifi-msg-row.received {
    flex-direction: row;
}
.hifi-msg-row-avatar {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.hifi-msg-date-sep {
    text-align: center;
    font-size: 10px;
    color: #666;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 10px;
    padding: 3px 10px;
    margin: 6px auto;
    width: fit-content;
    max-width: 90%;
}
body.hifi-msg-chat-mode .msg-bubble {
    max-width: min(78%, 280px) !important;
    min-width: 0;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    border: 1px solid var(--hifi-border) !important;
    position: relative;
    word-break: break-word;
    overflow-wrap: anywhere;
}
body.hifi-msg-chat-mode .msg-text {
    word-break: break-word;
    overflow-wrap: anywhere;
}
body.hifi-msg-chat-mode .msg-media,
body.hifi-msg-chat-mode .msg-audio {
    max-width: 100% !important;
    width: 220px;
    outline: none;
}
.hifi-msg-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.hifi-msg-time {
    font-size: 10px;
    color: #888;
}
.hifi-msg-sender-name {
    font-size: 10px;
    font-weight: bold;
    color: var(--hifi-blue-link);
    margin-bottom: 2px;
}
body.hifi-msg-chat-mode .msg-sent {
    background: #d0e8ff !important;
    color: #000 !important;
    border-color: var(--hifi-blue) !important;
}
body.hifi-msg-chat-mode .msg-received {
    background: #fff !important;
    color: #000 !important;
}
body.hifi-msg-chat-mode .msg-bubble .msg-status-text {
    font-size: 9px;
    font-weight: bold;
    color: #888 !important;
    text-transform: uppercase;
}
body.hifi-msg-chat-mode .msg-bubble .small.fw-bold {
    color: var(--hifi-blue-link) !important;
    font-size: 10px !important;
}
body.hifi-msg-chat-mode .quoted-msg-content {
    background: rgba(0,0,0,0.05) !important;
    border-left-color: var(--hifi-blue) !important;
    border-radius: 3px !important;
    font-size: 11px !important;
}
body.hifi-msg-chat-mode .msg-reactions {
    position: absolute;
    bottom: -10px;
    background: #fff !important;
    border: 1px solid var(--hifi-border) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    padding: 2px 6px;
    display: flex;
    gap: 2px;
    font-size: 12px;
}
body.hifi-msg-chat-mode .msg-sent .msg-reactions { right: 5px; }
body.hifi-msg-chat-mode .msg-received .msg-reactions { left: 5px; }
body.hifi-msg-chat-mode .msg-media,
body.hifi-msg-chat-mode .msg-media-grid {
    border-radius: 3px !important;
}
body.hifi-msg-chat-mode .msg-media-grid-item {
    border: 1px solid #ccc;
}
body.hifi-msg-chat-mode .badge.rounded-pill {
    background: #fff !important;
    color: #666 !important;
    border: 1px solid var(--hifi-border) !important;
    border-radius: 10px !important;
    font-size: 10px !important;
}
body.hifi-msg-chat-mode .btn-reply-msg {
    background: #fff !important;
    border: 1px solid var(--hifi-border) !important;
    box-shadow: none !important;
    width: 24px !important;
    height: 24px !important;
}
.hifi-msg-typing-wrap {
    padding: 0 10px 4px;
    flex-shrink: 0;
}
.hifi-msg-typing {
    display: none;
    background: #fff !important;
    border: 1px solid var(--hifi-border) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    width: fit-content;
}
.hifi-msg-input-area {
    flex-shrink: 0;
    padding: 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--hifi-border);
}
.hifi-msg-media-preview {
    background: #f8f8f8;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 6px;
}
.hifi-msg-media-preview-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
}
.hifi-msg-reply-preview {
    background: #f0f8ff;
    border: 1px solid var(--hifi-border);
    border-left: 3px solid var(--hifi-blue);
    border-radius: 4px;
    padding: 6px 28px 6px 8px;
    margin-bottom: 6px;
    position: relative;
}
.hifi-msg-reply-label {
    font-size: 11px;
    font-weight: bold;
    color: var(--hifi-blue-link);
}
.hifi-msg-reply-text {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hifi-msg-reply-close {
    position: absolute;
    right: 4px;
    top: 2px;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.hifi-msg-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hifi-msg-attach {
    background: none;
    border: none;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}
.hifi-msg-input {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
}
.hifi-msg-send {
    flex-shrink: 0;
    width: 36px;
    height: 32px;
    background: var(--hifi-btn-bg);
    border: 1px solid var(--hifi-btn-border);
    border-radius: 3px;
    color: var(--hifi-blue-link);
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.hifi-msg-send:hover { background: #d0e8ff; }
body.hifi-msg-chat-mode #reaction-picker {
    border: 1px solid var(--hifi-border) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* ========== CHATROOMS ========== */
body.hifi-mobile .room-card,
body.hifi-mobile .chatroom-card {
    border: 1px solid var(--hifi-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    margin-bottom: 6px;
    padding: 10px !important;
    background: #fff !important;
}
body.hifi-mobile .room-card:hover { background: #f0f8ff !important; }

/* ========== AURA COMPAT — remap modern components to mig33 ========== */
body.hifi-mobile {
    font-family: Arial, Helvetica, sans-serif !important;
    background: var(--hifi-bg-page) !important;
    color: #000 !important;
}
body.hifi-mobile .aura-stack-container,
body.hifi-mobile .container-fluid {
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 8px 10px 80px !important;
    background: transparent !important;
    border: none !important;
}
body.hifi-mobile .pulse-card {
    background: #fff !important;
    border: 1px solid var(--hifi-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 10px !important;
    margin-bottom: 6px !important;
    animation: none !important;
    transform: none !important;
}
body.hifi-mobile .pulse-card:hover {
    transform: none !important;
    box-shadow: none !important;
}
body.hifi-mobile .pulse-card::before { display: none !important; }
body.hifi-mobile .flow-tabs { gap: 4px; }
body.hifi-mobile .flow-tab {
    padding: 4px 10px !important;
    background: var(--hifi-btn-bg) !important;
    border: 1px solid var(--hifi-btn-border) !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    color: var(--hifi-blue-link) !important;
}
body.hifi-mobile .flow-tab.active {
    background: #d0e8ff !important;
    font-weight: bold !important;
}
body.hifi-mobile .card-avatar,
body.hifi-mobile .card-avatar-wrapper .card-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 3px !important;
}
body.hifi-mobile h1, body.hifi-mobile h2, body.hifi-mobile h3,
body.hifi-mobile h4, body.hifi-mobile h5, body.hifi-mobile h6 {
    font-family: Arial, Helvetica, sans-serif !important;
}
body.hifi-mobile .text-aura-soft { color: #666 !important; }
body.hifi-mobile .btn-primary,
body.hifi-mobile .aura-btn-primary {
    background: #fff !important;
    border: 1px solid var(--hifi-input-border) !important;
    color: var(--hifi-blue) !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    font-size: 13px !important;
    padding: 5px 14px !important;
}
body.hifi-mobile .aura-input,
body.hifi-mobile .form-control {
    border: 1px solid var(--hifi-input-border) !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    background: #fff !important;
    box-shadow: 0 0 3px rgba(173,216,230,0.4) !important;
}
body.hifi-mobile .hub-grid { grid-template-columns: 1fr !important; gap: 4px !important; }
body.hifi-mobile .hub-card {
    border: 1px solid var(--hifi-border) !important;
    border-radius: 4px !important;
    padding: 8px 10px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    background: #fff !important;
}
body.hifi-mobile .hub-card:hover {
    transform: none !important;
    background: #f0f8ff !important;
}
body.hifi-mobile .hub-card-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 3px !important;
    font-size: 14px !important;
}
body.hifi-mobile .hub-card-title { font-size: 13px !important; font-family: Arial, sans-serif !important; }
body.hifi-mobile .hub-card-desc { font-size: 11px !important; }
body.hifi-mobile .premium-profile-card {
    background: #E6EAF5 !important;
    border: 1px solid var(--hifi-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 10px !important;
}
body.hifi-mobile .ocean-wave-container { display: none !important; }
body.hifi-mobile .premium-name { font-family: Arial, sans-serif !important; font-size: 14px !important; }
body.hifi-mobile .modal-content {
    border-radius: 4px !important;
    border: 1px solid var(--hifi-border) !important;
}
body.hifi-mobile .badge { border-radius: 3px !important; font-size: 10px !important; }
body.hifi-mobile a { color: var(--hifi-blue-link); }
body.hifi-mobile .hifi-announcement .message { color: #CC6600; }
body.hifi-mobile .hifi-section-title { color: #660099; border-color: #660099; }

/* ========== NOTIFICATIONS PAGE ========== */
.hifi-notif-item {
    position: relative;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-left: 3px solid var(--hifi-blue);
    border-radius: 4px;
}
.hifi-notif-link {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 28px 8px 10px;
    text-decoration: none;
    color: #000;
    font-size: 13px;
    line-height: 1.4;
}
.hifi-notif-link:hover { background: #f0f8ff; text-decoration: none; color: #000; }
.hifi-notif-gif {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 3px;
}
.hifi-notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #ccc;
}
.hifi-notif-body { flex: 1; min-width: 0; }
.hifi-notif-text { word-break: break-word; }
.hifi-notif-text b { color: var(--hifi-blue-link); }
.hifi-notif-text b.female { color: #CC0066; }
.hifi-notif-text .badge {
    display: inline;
    font-size: 9px;
    padding: 1px 4px;
    margin: 0 2px;
    border-radius: 2px;
    vertical-align: middle;
    font-weight: bold;
}
.hifi-notif-text .badge.bg-danger { background: #CC0000; color: #fff; }
.hifi-notif-text .badge.bg-primary { background: var(--hifi-blue); color: #fff; }
.hifi-notif-text .badge.bg-warning { background: #FFD700; color: #000; }
.hifi-notif-text svg { display: inline; vertical-align: middle; margin: 0 2px; }
.hifi-notif-action { color: #000; font-weight: normal; }
.hifi-notif-quote {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    word-break: break-word;
    line-height: 1.35;
}
.hifi-notif-del {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    border: 1px solid var(--hifi-border);
    background: var(--hifi-btn-bg);
    color: var(--hifi-red);
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    line-height: 18px;
    padding: 0;
    cursor: pointer;
    border-radius: 3px;
}
.hifi-notif-del:hover { background: #ffe0e0; }
.hifi-empty-gif {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 8px;
}
.hifi-loading-inline {
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: #666;
}

/* ========== CHATROOMS PAGE ========== */
.hifi-cr-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 10px;
    gap: 8px;
}
.hifi-cr-list { margin: 0 0 12px; }
.hifi-cr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    text-decoration: none;
    color: #000;
    font-size: 13px;
}
.hifi-cr-item:hover { background: #f0f8ff; text-decoration: none; color: #000; }
.hifi-cr-item-img {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.hifi-cr-item-body { flex: 1; min-width: 0; }
.hifi-cr-item-body strong { display: block; color: var(--hifi-blue-link); font-size: 14px; }
.hifi-cr-item-desc {
    display: block;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hifi-cr-item-meta { text-align: right; flex-shrink: 0; }
.hifi-cr-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 3px;
}
.hifi-cr-badge.game { background: #ffe0e0; color: var(--hifi-red); border: 1px solid #faa; }
.hifi-cr-badge.online { background: #e0ffe0; color: #060; border: 1px solid #afa; }
.hifi-cr-create-form {
    background: #fff;
    border: 1px solid var(--hifi-border);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.hifi-cr-create-form label { display: block; font-size: 12px; font-weight: bold; margin: 6px 0 3px; }
.hifi-cr-create-form .hifi-input { margin-bottom: 6px; }

body.hifi-cr-chat-mode .hifi-app-header,
body.hifi-cr-chat-mode .hifi-subtitle-bar,
body.hifi-cr-chat-mode .hifi-nav-wrap { display: none !important; }
body.hifi-cr-chat-mode .hifi-page { padding: 0 0 0; min-height: 100vh; }
.hifi-cr-chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 0px);
    height: calc(100dvh - 0px);
    max-width: 480px;
    margin: 0 auto;
    background: var(--hifi-bg-page);
}
.hifi-cr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: var(--hifi-header-bg);
    border-bottom: 1px solid var(--hifi-border);
    flex-shrink: 0;
}
.hifi-cr-header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hifi-cr-header-left a { color: var(--hifi-blue-link); font-weight: bold; text-decoration: none; font-size: 13px; }
.hifi-cr-header-img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ccc;
}
.hifi-cr-header-title { font-weight: bold; font-size: 14px; line-height: 1.2; }
.hifi-cr-header-status { font-size: 11px; color: #666; }
.hifi-cr-leave {
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid var(--hifi-red);
    color: var(--hifi-red);
    background: #fff;
    border-radius: 3px;
    text-decoration: none;
    font-weight: bold;
}
.hifi-cr-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    background: var(--hifi-bg-page);
}
.hifi-cr-messages-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 100%;
    justify-content: flex-end;
}
.hifi-cr-sys {
    text-align: center;
    font-size: 11px;
    color: #666;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    padding: 6px 10px;
    margin: 4px auto;
    max-width: 95%;
    font-style: italic;
}
.hifi-cr-sys.game-winner { border-left: 3px solid var(--hifi-blue); font-weight: bold; color: #000; font-style: normal; }
.hifi-cr-sys.game-elimination { border-left: 3px solid var(--hifi-red); color: var(--hifi-red); font-style: normal; }
.hifi-cr-msg-row {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    max-width: 100%;
}
.hifi-cr-msg-row.sent { flex-direction: row-reverse; }
.hifi-cr-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.hifi-cr-bubble {
    max-width: calc(100% - 36px);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid var(--hifi-border);
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}
.hifi-cr-bubble.received { background: #fff; }
.hifi-cr-bubble.sent { background: #d0e8ff; border-color: var(--hifi-blue); }
.hifi-cr-msg-user { font-size: 10px; font-weight: bold; margin-bottom: 2px; }
.hifi-cr-msg-user.male { color: var(--hifi-blue-link); }
.hifi-cr-msg-user.female { color: #CC0066; }
.hifi-cr-msg-time { font-size: 10px; color: #888; margin-top: 3px; }
.hifi-cr-msg-media { max-width: 180px; border-radius: 3px; margin-top: 4px; border: 1px solid #ccc; cursor: pointer; }
.hifi-cr-game-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #E6EAF5;
    border-bottom: 1px solid var(--hifi-border);
    font-size: 12px;
    flex-shrink: 0;
}
.hifi-cr-game-actions {
    display: none;
    gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border-bottom: 1px solid var(--hifi-border);
    overflow-x: auto;
    flex-shrink: 0;
}
.hifi-cr-game-btn {
    padding: 4px 10px;
    border: 1px solid var(--hifi-btn-border);
    background: var(--hifi-btn-bg);
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.hifi-cr-game-btn.primary { background: var(--hifi-blue); color: #fff; border-color: var(--hifi-blue-dark); }
.hifi-cr-input-area {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 10px;
    background: var(--hifi-header-bg);
    border-top: 1px solid var(--hifi-border);
    flex-shrink: 0;
    position: relative;
}
.hifi-cr-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--hifi-input-border);
    border-radius: 4px;
    padding: 4px 8px;
    min-height: 36px;
}
.hifi-cr-input-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    font-family: Arial, Helvetica, sans-serif;
}
.hifi-cr-send {
    width: 36px;
    height: 36px;
    border: 1px solid var(--hifi-blue-dark);
    background: var(--hifi-blue);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: bold;
}
.hifi-cr-emoji-picker {
    display: none;
    position: absolute;
    bottom: 52px;
    left: 10px;
    right: 10px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    max-height: 180px;
    overflow-y: auto;
    padding: 8px;
    z-index: 20;
}
.hifi-cr-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.hifi-cr-emoji-item {
    cursor: pointer;
    text-align: center;
    font-size: 18px;
    padding: 2px;
    border-radius: 3px;
}
.hifi-cr-emoji-item:hover { background: #f0f8ff; }
.hifi-cr-media-preview {
    position: absolute;
    bottom: 48px;
    left: 10px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    display: none;
}

/* ========== FORUM ========== */
.hifi-forum-create,
.hifi-forum-reply-panel {
    background: #fff;
    border: 1px solid var(--hifi-border);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.hifi-forum-create label,
.hifi-forum-reply-panel label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin: 6px 0 4px;
}
.hifi-forum-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.hifi-forum-tool {
    min-width: 28px;
    height: 28px;
    border: 1px solid var(--hifi-btn-border);
    background: var(--hifi-btn-bg);
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 6px;
}
.hifi-forum-tool:hover { background: #f0f8ff; }
.hifi-forum-img-btn { display: inline-flex; align-items: center; justify-content: center; }
.hifi-forum-editor {
    min-height: 120px;
    border: 1px solid var(--hifi-input-border);
    background: #fff;
    padding: 8px;
    font-size: 13px;
    line-height: 1.45;
    border-radius: 4px;
    margin-bottom: 8px;
    word-break: break-word;
}
.hifi-forum-editor:empty:before {
    content: attr(data-placeholder);
    color: #888;
}
.hifi-forum-editor img,
.hifi-forum-inline-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: zoom-in;
}
.hifi-forum-topic-list { margin-bottom: 12px; }
.hifi-forum-topic-item {
    display: block;
    padding: 10px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    text-decoration: none;
    color: #000;
}
.hifi-forum-topic-item:hover { background: #f0f8ff; text-decoration: none; color: #000; }
.hifi-forum-topic-title {
    font-weight: bold;
    color: var(--hifi-blue-link);
    font-size: 14px;
    margin-bottom: 3px;
}
.hifi-forum-topic-meta { font-size: 11px; color: #666; }
.hifi-forum-post {
    background: #fff;
    border: 1px solid var(--hifi-border);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
}
.hifi-forum-post.is-reply {
    margin-left: 8px;
    border-left: 3px solid var(--hifi-blue);
}
.hifi-forum-post-head {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.hifi-forum-avatar {
    width: 44px;
    height: 52px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 3px;
    flex-shrink: 0;
}
.hifi-forum-post-meta { flex: 1; min-width: 0; }
.hifi-forum-post-user { font-size: 14px; line-height: 1.35; }
.hifi-forum-rank { font-size: 12px; color: #000; font-weight: normal; }
.hifi-forum-post-time { font-size: 11px; color: #666; margin-top: 2px; }
.hifi-forum-post-title {
    font-weight: bold;
    font-size: 14px;
    color: #660099;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}
.hifi-forum-post-body {
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.hifi-forum-reply-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    border: 1px solid var(--hifi-btn-border);
    background: var(--hifi-btn-bg);
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    color: var(--hifi-blue-link);
}
.hifi-forum-reply-btn:hover { background: #d0e8ff; }
.hifi-forum-cancel-reply { margin-left: 6px; }
.hifi-forum-create-btn { margin-bottom: 12px; }
.hifi-forum-cancel-create { margin-left: 6px; }
.hifi-forum-reply-textarea {
    width: 100%;
    margin-bottom: 8px;
    resize: vertical;
    min-height: 80px;
}
.hifi-forum-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
    flex-wrap: wrap;
}
.hifi-forum-page-btn { font-size: 12px; padding: 6px 12px; text-decoration: none; }
.hifi-forum-page-info { font-size: 12px; color: #666; }

/* Footer copyright */
.hifi-copyright {
    text-align: right;
    font-size: 11px;
    color: var(--hifi-blue-link);
    margin-top: 20px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}
