/* Mobile-only UI styles (ChatGPT-like) */

:root {
    --shiner-mobile-topbar-height: 56px;
    --shiner-mobile-bottombar-height: 96px; /* approximate shiner-chat-input-footer height */
}

/* Default: show desktop chat UI; swap on very small screens */
.shiner-mobile-chat-ui {
    display: none;
}
.shiner-desktop-chat-ui {
    display: block;
}

/* Hidden by default; enabled on mobile */
.shiner-settings-mobile-dropdown {
    display: none;
}
.shiner-settings-mobile-header-dropdown {
    display: none;
}
.shiner-chat-input-footer {
    padding-top: 6px !important;
}
/* Hide mobile components unless <= 640px.
   The Blade components often use Bootstrap classes like `d-md-none`, so we enforce 640px here. */
.shiner-mobile-topbar,
.shiner-mobile-right-fab,
.shiner-mobile-right-panel,
.shiner-mobile-right-panel-backdrop,
.shiner-mobile-sidebar-backdrop {
    display: none;
}

/* Runtime mobile override (UA + viewport width) */
body.shiner-mobile .shiner-mobile-chat-ui {
    display: block;
}
body.shiner-mobile .shiner-desktop-chat-ui {
    display: none !important;
}
body.shiner-mobile .shiner-floating-sidebar {
    display: none !important;
}

/* Hide back-to-folder button on mobile (use sidebar / nav instead) */
body.shiner-mobile .shiner-chat-back-bar {
    display: none !important;
}

body.shiner-mobile .shiner-mobile-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: var(--shiner-mobile-topbar-height);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    transition: opacity 0.25s ease;
}
/* Sidebar open: top bar fades; lower z-index so sidebar (logo/name) shows above */
body.shiner-mobile.shiner-sidebar-open .shiner-mobile-topbar {
    opacity: 0.4;
    z-index: 1020;
    pointer-events: none;
}
body.shiner-mobile.shiner-sidebar-open .shiner-mobile-hamburger,
body.shiner-mobile.shiner-sidebar-open .shiner-mobile-profile-menu {
    pointer-events: auto;
}
body.shiner-mobile.shiner-sidebar-open .shiner-mobile-hamburger {
    transform: translateX(252px);
    transition: transform 0.25s ease;
}
body.shiner-mobile .shiner-mobile-hamburger {
    transition: transform 0.25s ease;
}

body.shiner-mobile .shiner-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: rgba(243, 244, 246, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
}

/* Search mode: clearer pill label above search bar */
body.shiner-mobile .shiner-search-label,
body.shiner-mobile .shiner-search-mode-wrap .search-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(209, 213, 219, 0.95);
    background: rgba(249, 250, 251, 0.95);
}

body.shiner-mobile .shiner-chat-input-voice.btn {
    border: none !important;
    box-shadow: none !important;
    outline: none;
}

body.shiner-mobile .shiner-chat-scroll {
    padding-top: var(--shiner-mobile-topbar-height);
    scroll-padding-top: calc(var(--shiner-mobile-topbar-height) + 18px);
    padding-bottom: calc(var(--shiner-mobile-bottombar-height) + 16px);
}

body.shiner-mobile .shiner-scroll-to-bottom {
    bottom: calc(var(--shiner-mobile-bottombar-height) + 12px) !important;
}

body.shiner-mobile .shiner-chat-inner {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 14px 12px 24px;
}

body.shiner-mobile .shiner-folder-window {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* API key missing warning: keep within mobile width */
body.shiner-mobile .shiner-api-key-warning-box {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}
body.shiner-mobile .shiner-api-key-warning-wrap {
    margin-left: 12px;
    margin-right: 12px;
}

/* Guest settings: full-screen overlay above mobile top bar (z 1100) */
body.shiner-mobile .shiner-settings-modal {
    z-index: 1200;
    align-items: flex-start;
    justify-content: stretch;
    padding: 0;
}
body.shiner-mobile .shiner-settings-modal-box {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
body.shiner-mobile .shiner-settings-modal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    min-height: 3.25rem;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
}
body.shiner-mobile .shiner-settings-modal-header .shiner-settings-close {
    margin-left: auto;
    order: 2;
}
body.shiner-mobile .shiner-settings-modal-header-left {
    order: 1;
    flex: 1;
    min-width: 0;
}
body.shiner-mobile .shiner-settings-mobile-header-dropdown {
    order: 3;
    flex: 1 1 100%;
    display: block;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 0;
}
body.shiner-mobile .shiner-settings-modal-box > div:nth-child(2) {
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
body.shiner-mobile .shiner-settings-modal-box aside {
    display: none !important;
}
body.shiner-mobile .shiner-settings-mobile-header-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}
body.shiner-mobile .shiner-settings-mobile-header-select {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 0.875rem;
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
}
body.shiner-mobile .shiner-settings-modal-box section {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 24px;
    padding-top: 10px;
}

/* Improve legibility on small screens */
body.shiner-mobile {
    --shiner-mobile-font-size: 14px;
    font-size: 14px;
}
body.shiner-mobile .shiner-settings-modal-box section p,
body.shiner-mobile .shiner-settings-modal-box section .text-muted,
body.shiner-mobile .shiner-settings-modal-box section .opacity-70 {
    font-size: 0.8rem;
}

body.shiner-mobile .shiner-mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
body.shiner-mobile.shiner-sidebar-open .shiner-mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.shiner-mobile .shiner-mobile-sidebar-wrapper {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1045;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow: hidden;
}
body.shiner-mobile.shiner-sidebar-open .shiner-mobile-sidebar-wrapper {
    transform: translateX(0);
}
body.shiner-mobile .shiner-mobile-sidebar-wrapper .shiner-sidebar {
    height: 100%;
    overflow-y: auto;
}

body.shiner-mobile .shiner-mobile-right-fab {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: var(--shiner-mobile-fab-bottom, calc(var(--shiner-mobile-bottombar-height) + 10px));
    z-index: 1060;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 0;
    background: #22c55e;
    color: #fff;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
    filter: none;
}
body.shiner-mobile .shiner-mobile-right-fab:hover,
body.shiner-mobile .shiner-mobile-right-fab:active {
    filter: none;
    background: #16a34a;
}

/* Message actions: keep anchored near bubble (JS positions fixed); compact on mobile */
body.shiner-mobile .shiner-msg-action-popover.shiner-msg-action-popover--fixed {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}
body.shiner-mobile .shiner-msg-action-edit textarea {
    min-width: 0;
}
body.shiner-mobile .shiner-msg-action-remove {
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: left;
}

/* Chat: hide avatars; tune bubble widths */
body.shiner-mobile .shiner-chat-message .shiner-avatar {
    display: none !important;
}
body.shiner-mobile .shiner-chat-message.user .shiner-chat-bubble {
    max-width: 75% !important;
}
body.shiner-mobile .shiner-chat-message.ai .shiner-chat-bubble {
    max-width: 90% !important;
}
body.shiner-mobile .shiner-thinking-indicator .shiner-chat-bubble {
    max-width: 90% !important;
}

/* Keep confirmation modals centered and readable on mobile */
body.shiner-mobile .shiner-modal-dialog,
body.shiner-mobile .shiner-action-modal-dialog {
    width: min(92vw, 420px);
    margin: 0 auto;
}
body.shiner-mobile .shiner-modal-content {
    border-radius: 16px;
}

body.shiner-mobile .shiner-mobile-right-panel-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1048;
    background: rgba(15, 23, 42, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
body.shiner-mobile .shiner-mobile-right-panel-backdrop-open {
    opacity: 1;
    pointer-events: auto;
}

body.shiner-mobile .shiner-mobile-right-panel {
    display: flex;
    position: fixed;
    top: var(--shiner-mobile-topbar-height);
    right: 0;
    bottom: var(--shiner-mobile-bottombar-height);
    z-index: 1049;
    width: 320px;
    max-width: 92vw;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    border-radius: 18px 0 0 18px;
    box-shadow: -10px 0 40px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
}
body.shiner-mobile .shiner-mobile-right-panel-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    /* Swap chat page layout on very small screens */
    .shiner-mobile-chat-ui {
        display: block;
    }
    .shiner-desktop-chat-ui {
        display: none;
    }

    /* Hide desktop right floating actions */
    .shiner-floating-sidebar {
        display: none !important;
    }

    /* Mobile header + scroll spacing */
    .shiner-mobile-topbar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        height: var(--shiner-mobile-topbar-height);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 14px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    }

    body[data-theme="dark"] .shiner-mobile-topbar {
        background: rgba(15, 23, 42, 0.85);
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    }

    .shiner-mobile-hamburger {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        color: #111827;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color 0.15s ease;
    }
    .shiner-mobile-hamburger:hover {
        background: rgba(229, 231, 235, 0.65);
    }

    body[data-theme="dark"] .shiner-mobile-hamburger {
        color: #e5e7eb;
        background: rgba(255, 255, 255, 0.06);
    }
    body[data-theme="dark"] .shiner-mobile-hamburger:hover {
        background: rgba(148, 163, 184, 0.18);
    }

    .shiner-mobile-topbar-title {
        flex: 1;
        min-width: 0;
        text-align: center;
        font-weight: 600;
        font-size: 14px;
        color: inherit;
    }

    /* Sticky/fixed bottom chat input */
    .shiner-bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        background: rgba(243, 244, 246, 0.72);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 0;
    }
    body[data-theme="dark"] .shiner-bottom-bar {
        background: rgba(15, 23, 42, 0.7);
    }

    /* Main chat scroll offsets for fixed top/bottom bars */
    .shiner-chat-scroll {
        padding-top: var(--shiner-mobile-topbar-height);
        scroll-padding-top: calc(var(--shiner-mobile-topbar-height) + 18px);
        padding-bottom: calc(var(--shiner-mobile-bottombar-height) + 16px);
    }

    /* Hide the scroll-to-bottom control behind the fixed input */
    .shiner-scroll-to-bottom {
        bottom: calc(var(--shiner-mobile-bottombar-height) + 12px) !important;
    }

    /* Make chat area full-width + less padding on mobile */
    .shiner-chat-inner {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 14px 12px 24px;
    }

    .shiner-folder-window {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .shiner-chat-welcome-wrap {
        min-height: 50vh;
        padding-top: 6px;
    }

    /* Optional: keep folder back-bar visible under the mobile header */
    .shiner-chat-back-bar {
        top: var(--shiner-mobile-topbar-height);
    }

    /* Mobile left sidebar slide-over */
    .shiner-mobile-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(15, 23, 42, 0.35);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    body.shiner-sidebar-open .shiner-mobile-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .shiner-mobile-sidebar-wrapper {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1045;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow: hidden;
    }
    body.shiner-sidebar-open .shiner-mobile-sidebar-wrapper {
        transform: translateX(0);
    }
    .shiner-mobile-sidebar-wrapper .shiner-sidebar {
        height: 100%;
        overflow-y: auto;
    }

    /* Mobile profile menu */
    .shiner-mobile-profile-menu {
        position: relative;
        flex-shrink: 0;
    }
    .shiner-mobile-profile-button {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        cursor: pointer;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.15s ease;
    }
    .shiner-mobile-profile-button:hover {
        background: rgba(229, 231, 235, 0.65);
    }
    body[data-theme="dark"] .shiner-mobile-profile-button {
        background: rgba(255, 255, 255, 0.06);
        color: #e5e7eb;
    }
    body[data-theme="dark"] .shiner-mobile-profile-button:hover {
        background: rgba(148, 163, 184, 0.18);
    }
    .shiner-mobile-profile-avatar {
        width: 36px;
        height: 36px;
        border-radius: 999px;
        object-fit: cover;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 13px;
    }

    .shiner-mobile-profile-dropdown {
        position: absolute;
        right: 0;
        top: calc(100% + 6px);
        width: min(92vw, 280px);
        max-height: min(70vh, 420px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
        padding: 6px;
        z-index: 1120;
    }
    .shiner-mobile-settings-icon {
        width: 22px;
        height: 22px;
    }
    .shiner-mobile-profile-dropdown-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 8px 8px;
        margin-bottom: 2px;
        border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    }
    .shiner-mobile-profile-dropdown-title {
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
    }
    .shiner-mobile-profile-dropdown-close {
        border: none;
        background: transparent;
        padding: 4px;
        border-radius: 8px;
        color: #dc2626;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .shiner-mobile-profile-dropdown-close:hover {
        background: rgba(220, 38, 38, 0.1);
        color: #b91c1c;
    }
    .shiner-mobile-profile-dropdown-close svg {
        stroke: currentColor;
    }
    body[data-theme="dark"] .shiner-mobile-profile-dropdown {
        background: #0f172a;
        border-color: rgba(148, 163, 184, 0.25);
    }
    body[data-theme="dark"] .shiner-mobile-profile-dropdown-close {
        color: #f87171;
    }
    body[data-theme="dark"] .shiner-mobile-profile-dropdown-close:hover {
        background: rgba(248, 113, 113, 0.12);
        color: #fca5a5;
    }
    .shiner-mobile-profile-item {
        width: 100%;
        border: 0;
        background: transparent;
        padding: 12px 10px;
        border-radius: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    .shiner-mobile-profile-item:hover {
        background: #f3f4f6;
    }
    body[data-theme="dark"] .shiner-mobile-profile-item:hover {
        background: rgba(148, 163, 184, 0.14);
    }
    .shiner-mobile-profile-item-danger .shiner-mobile-profile-item-text,
    .shiner-mobile-profile-item-danger {
        color: #dc2626;
    }

    .shiner-mobile-profile-divider {
        height: 1px;
        background: rgba(229, 231, 235, 0.95);
        margin: 6px 0;
    }

    /* Floating circular button */
    .shiner-mobile-right-fab {
        position: fixed;
        right: 16px;
        bottom: calc(var(--shiner-mobile-bottombar-height) + 10px);
        z-index: 1060;
        width: 52px;
        height: 52px;
        border-radius: 999px;
        border: 0;
        background: #22c55e;
        color: #fff;
        box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.12s ease, background 0.12s ease;
    }
    .shiner-mobile-right-fab:hover {
        background: #16a34a;
    }
    .shiner-mobile-right-fab:active {
        transform: scale(0.98);
    }

    /* Right sliding panel */
    .shiner-mobile-right-panel-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1048;
        background: rgba(15, 23, 42, 0.12);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    .shiner-mobile-right-panel-backdrop-open {
        opacity: 1;
        pointer-events: auto;
    }

    .shiner-mobile-right-panel {
        position: fixed;
        top: var(--shiner-mobile-topbar-height);
        right: 0;
        bottom: var(--shiner-mobile-bottombar-height);
        z-index: 1049;
        width: 320px;
        max-width: 92vw;
        background: #ffffff;
        border-left: 1px solid #e5e7eb;
        border-radius: 18px 0 0 18px;
        box-shadow: -10px 0 40px rgba(15, 23, 42, 0.18);
        transform: translateX(100%);
        transition: transform 0.25s ease;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        pointer-events: none;
        opacity: 0;
    }
    .shiner-mobile-right-panel-open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .shiner-mobile-right-panel-header {
        padding: 12px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(229, 231, 235, 0.9);
        background: rgba(255, 255, 255, 0.92);
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-header {
        background: rgba(15, 23, 42, 0.85);
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    }
    .shiner-mobile-right-panel-title {
        font-weight: 700;
        font-size: 14px;
    }
    .shiner-mobile-right-panel-close {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        border: 1px solid rgba(220, 38, 38, 0.25);
        background: rgba(255, 255, 255, 0.75);
        color: #dc2626;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .shiner-mobile-right-panel-close:hover {
        background: rgba(220, 38, 38, 0.08);
        color: #b91c1c;
    }
    .shiner-mobile-right-panel-close svg {
        stroke: currentColor;
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-close {
        border-color: rgba(248, 113, 113, 0.35);
        background: rgba(255, 255, 255, 0.06);
        color: #f87171;
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-close:hover {
        background: rgba(248, 113, 113, 0.12);
        color: #fca5a5;
    }

    .shiner-mobile-right-panel-body {
        flex: 1;
        overflow-y: auto;
        padding: 12px 12px 16px;
    }

    .shiner-mobile-right-panel-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .shiner-mobile-right-panel-action {
        width: 100%;
        border: 1px solid rgba(229, 231, 235, 0.95);
        background: #fff;
        padding: 12px 12px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        cursor: pointer;
        color: #111827;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }
    .shiner-mobile-right-panel-action:hover {
        background: #f3f4f6;
        border-color: #d1d5db;
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-action {
        background: rgba(15, 23, 42, 0.4);
        border-color: rgba(148, 163, 184, 0.25);
        color: #e5e7eb;
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-action:hover {
        background: rgba(148, 163, 184, 0.14);
    }

    .shiner-mobile-right-panel-divider {
        height: 1px;
        width: 100%;
        background: rgba(229, 231, 235, 0.95);
        margin: 2px 0 6px;
    }

    .shiner-mobile-right-panel-search-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        margin-bottom: 8px;
        gap: 10px;
    }

    .shiner-mobile-right-panel-results {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .shiner-mobile-right-panel-result {
        width: 100%;
        border: 1px solid rgba(229, 231, 235, 0.95);
        background: #fff;
        border-radius: 14px;
        padding: 10px 12px;
        cursor: pointer;
        text-align: left;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }
    .shiner-mobile-right-panel-result:hover {
        background: #f3f4f6;
        border-color: #d1d5db;
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-result {
        background: rgba(15, 23, 42, 0.4);
        border-color: rgba(148, 163, 184, 0.25);
        color: #e5e7eb;
    }
    body[data-theme="dark"] .shiner-mobile-right-panel-result:hover {
        background: rgba(148, 163, 184, 0.14);
    }
    .shiner-mobile-right-panel-result-snippet mark.shiner-search-highlight-current {
        border-bottom-width: 2px;
    }
}

