/* =====================================================
   LEPSA AI PRO CORE — COMPLETE CONSOLIDATED STYLESHEET
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Rajdhani:wght@500;700&display=swap');

:root {
    --lepsa-bg: #020409;
    --lepsa-cyan: #00eaff;
    --lepsa-cyan-soft: rgba(0, 234, 255, 0.18);
    --lepsa-magenta: #c026d3;
    --lepsa-purple: #704cff;
    --card-radius: 24px;
}

/* =====================================================
   RESET & COSMIC BACKGROUND
===================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--lepsa-bg);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 217, 255, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 85% 25%, rgba(192, 38, 211, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(112, 76, 255, 0.15) 0%, transparent 55%),
        linear-gradient(180deg, #020409 0%, #050814 100%);
    background-attachment: fixed;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    width: 600px;
    height: 600px;
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.22), transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    width: 550px;
    height: 550px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(192, 38, 211, 0.20), transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.login-screen {
    display: none !important;
}

/* =====================================================
   MAIN APPLICATION SHELL
===================================================== */
.app {
    width: 100%;
    height: 100dvh;
    display: flex;
    position: relative;
    z-index: 1;
    background: transparent;
    overflow: hidden;
}

/* =====================================================
   CINEMATIC SIDEBAR (PC & MOBILE DRAWER)
===================================================== */
.sidebar {
    width: 285px;
    min-width: 285px;
    height: 100dvh;
    padding: 24px 18px;
    background: radial-gradient(circle at 10% 0%, rgba(0, 234, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 90%, rgba(192, 38, 211, 0.08) 0%, transparent 45%),
                linear-gradient(175deg, rgba(6, 12, 22, 0.98) 0%, rgba(3, 6, 12, 0.99) 100%);
    border-right: 1px solid rgba(0, 234, 255, 0.22);
    box-shadow: 15px 0 50px rgba(0, 0, 0, 0.9), inset -1px 0 20px rgba(0, 234, 255, 0.05);
    position: relative;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.sidebar-edge-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, #00eaff 35%, #704cff 70%, transparent 100%);
    box-shadow: 0 0 12px #00eaff, 0 0 24px rgba(112, 76, 255, 0.6);
}

/* =====================================================
   PLANET LOGO & PRO CORE TYPOGRAPHY
===================================================== */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 234, 255, 0.12);
}

.brand-orb-wrap,
.planet-viewport {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-orb,
.planet-sphere {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #a5f3fc 15%, #00d9ff 35%, #704cff 70%, #020409 100%);
    box-shadow: 
        0 0 15px rgba(0, 217, 255, 0.8),
        0 0 28px rgba(192, 38, 211, 0.6),
        inset -3px -3px 8px rgba(0, 0, 0, 0.8),
        inset 3px 3px 10px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
    animation: orbPulse 3.5s ease-in-out infinite alternate;
}

.cosmic-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: rotate(-24deg);
}

.ring-front,
.ring-cyan {
    width: 52px;
    height: 16px;
    border: 2px solid transparent;
    border-bottom-color: #00eaff;
    border-left-color: rgba(0, 234, 255, 0.9);
    filter: drop-shadow(0 0 6px #00eaff);
    z-index: 3;
    top: 17px;
}

.ring-back,
.ring-purple {
    width: 52px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: rgba(192, 38, 211, 0.95);
    border-right-color: rgba(112, 76, 255, 0.8);
    filter: drop-shadow(0 0 8px #c026d3);
    z-index: 1;
    top: 17px;
}

.ring-outer {
    width: 60px;
    height: 20px;
    border: 1px solid transparent;
    border-bottom-color: rgba(0, 234, 255, 0.4);
    border-top-color: rgba(192, 38, 211, 0.35);
    top: 15px;
    z-index: 0;
    filter: blur(0.5px);
}

@keyframes orbPulse {
    0% { transform: scale(0.96); filter: brightness(1); }
    100% { transform: scale(1.04); filter: brightness(1.2); }
}

.brand-details,
.brand-text-col {
    display: flex;
    flex-direction: column;
}

.brand-title-wrap,
.brand-name {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
}

.brand-ai,
.text-ai {
    background: linear-gradient(135deg, #00d9ff 0%, #ff2ec4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.7));
}

.brand-badge,
.text-pro-core {
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #00eaff;
    margin-top: 3px;
}

.text-tagline {
    font-family: 'Rajdhani', Arial, sans-serif;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #728c9b;
    margin-top: 2px;
}

/* =====================================================
   SIDEBAR ENGINE WIDGET
===================================================== */
.core-mode-card {
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 234, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 234, 255, 0.08) 0%, rgba(112, 76, 255, 0.08) 100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 234, 255, 0.05);
    margin-bottom: 12px;
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.mode-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00eaff;
    box-shadow: 0 0 8px #00eaff;
    animation: corePulse 1.5s infinite alternate;
}

@keyframes corePulse {
    from { opacity: 0.5; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.3); }
}

.mode-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #e2f8ff;
    flex: 1;
}

.mode-active-pill {
    font-size: 8px;
    font-weight: 700;
    color: #00eaff;
    background: rgba(0, 234, 255, 0.15);
    border: 1px solid rgba(0, 234, 255, 0.35);
    padding: 2px 6px;
    border-radius: 6px;
}

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

.mode-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 46px;
    padding: 0 14px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    color: #7f98a3;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.mode-chip:active {
    transform: scale(0.98);
}

.mode-chip::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #00eaff, #704cff);
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mode-chip:hover {
    background: rgba(0, 234, 255, 0.06);
    color: #d6eef3;
    border-color: rgba(0, 234, 255, 0.18);
}

.mode-chip.active {
    background: linear-gradient(90deg, rgba(0, 234, 255, 0.14), rgba(112, 76, 255, 0.08));
    border-color: rgba(0, 234, 255, 0.3);
    color: #ffffff;
}

.mode-chip.active::before {
    transform: scaleY(1);
}

.chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6b8894;
    transition: color 0.25s ease;
}

.mode-chip.active .chip-icon,
.mode-chip:hover .chip-icon {
    color: #00eaff;
}

.chip-icon svg {
    width: 17px;
    height: 17px;
}

.chip-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
   SIDEBAR MENU ITEMS
===================================================== */
.menu-title {
    color: #55727d;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-left: 6px;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.22s ease;
}

.menu-item:hover {
    background: rgba(0, 234, 255, 0.07);
    border-color: rgba(0, 234, 255, 0.25);
    transform: translateX(4px);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(0, 234, 255, 0.12) 0%, rgba(112, 76, 255, 0.05) 100%);
    border-color: rgba(0, 234, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.15), inset 3px 0 0 #00eaff;
}

.menu-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* CONVERSATION HISTORY LIST */
.conversation-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversation-item:hover {
    background: rgba(0, 234, 255, 0.06);
    border-color: rgba(0, 234, 255, 0.2);
}

.conversation-item.active {
    background: linear-gradient(90deg, rgba(0, 234, 255, 0.12) 0%, rgba(112, 76, 255, 0.05) 100%);
    border-color: rgba(0, 234, 255, 0.35);
}

.conversation-item-title {
    flex: 1;
    font-size: 12.5px;
    color: #c9d7dc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item.active .conversation-item-title {
    color: #e6fbff;
}

.conversation-delete-btn {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b8894;
    background: transparent;
    border: none;
    opacity: 0;
    transition: 0.2s;
}

.conversation-item:hover .conversation-delete-btn {
    opacity: 1;
}

.conversation-delete-btn:hover {
    background: rgba(255, 60, 100, 0.18);
    color: #ff8a8a;
}

.conversation-empty-note {
    font-size: 11.5px;
    color: #55727d;
    padding: 8px 6px;
}

.cyan-icon {
    background: rgba(0, 234, 255, 0.12);
    border: 1px solid rgba(0, 234, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
}

.purple-icon {
    background: rgba(112, 76, 255, 0.12);
    border: 1px solid rgba(112, 76, 255, 0.3);
    box-shadow: 0 0 10px rgba(112, 76, 255, 0.2);
}

.pink-icon {
    background: rgba(192, 38, 211, 0.12);
    border: 1px solid rgba(192, 38, 211, 0.3);
    box-shadow: 0 0 10px rgba(192, 38, 211, 0.2);
}

.danger-icon {
    background: rgba(255, 75, 75, 0.1);
    border: 1px solid rgba(255, 75, 75, 0.25);
}

.menu-text-box strong {
    display: block;
    color: #e8f7fa;
    font-size: 13px;
}

.menu-text-box small {
    display: block;
    color: #64828d;
    font-size: 10px;
}

.logout-item:hover {
    background: rgba(255, 75, 75, 0.1) !important;
    border-color: rgba(255, 75, 75, 0.4) !important;
}

/* =====================================================
   SIDEBAR PROFILE
===================================================== */
.profile {
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(0, 234, 255, 0.22);
    background: linear-gradient(135deg, rgba(9, 20, 32, 0.95), rgba(4, 9, 16, 0.95));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 234, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-ring {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #00eaff, #704cff);
    box-shadow: 0 0 14px rgba(0, 234, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #031014;
}

.live-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00ff88;
    border: 2px solid #060c16;
    box-shadow: 0 0 8px #00ff88;
}

.profile-meta {
    overflow: hidden;
}

.profile-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-status {
    font-size: 10px;
    color: #00eaff;
    letter-spacing: 0.5px;
}

/* =====================================================
   CHAT CONTAINER & HEADER
===================================================== */
.chat-container {
    flex: 1;
    min-width: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
}

.header {
    height: 74px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: rgba(3, 7, 15, 0.85);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 15px rgba(0, 217, 255, 0.08);
    backdrop-filter: blur(14px);
    z-index: 10;
}

.lepsa-drawer-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    border: 1px solid rgba(0, 234, 255, 0.25);
    background: rgba(0, 234, 255, 0.05);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    margin-right: 12px;
}

.lepsa-drawer-btn span {
    width: 18px;
    height: 2px;
    background: #00eaff;
    border-radius: 2px;
}

.header-info {
    flex: 1;
}

.title {
    background: linear-gradient(90deg, #ffffff 0%, #00d9ff 55%, #c026d3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.status {
    margin-top: 3px;
    font-size: 11px;
    color: #55f6b2;
}

.lepsa-quick-new {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0, 234, 255, 0.35);
    background: radial-gradient(circle at 30% 30%, rgba(0, 234, 255, 0.2), rgba(6, 14, 24, 0.95));
    color: #00eaff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 10px;
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.15);
    transition: 0.2s ease;
}

.lepsa-quick-new:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.4);
}

.lepsa-menu-wrap {
    position: relative;
    z-index: 9999;
}

.lepsa-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 238, 255, 0.45);
    background: rgba(5, 15, 25, 0.88);
    color: #00eaff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lepsa-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lepsa-dots span {
    width: 4px;
    height: 4px;
    background: #00eaff;
    border-radius: 50%;
}

.lepsa-dropdown {
    position: absolute;
    top: 54px;
    right: 0;
    width: 220px;
    padding: 8px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(8, 23, 34, 0.98), rgba(4, 10, 19, 0.98));
    border: 1px solid rgba(0, 234, 255, 0.25);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    display: none;
    flex-direction: column;
    gap: 4px;
}

.lepsa-dropdown.show {
    display: flex;
}

.lepsa-menu-item {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: #f2fbff;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
}

.lepsa-menu-item:hover {
    background: rgba(0, 234, 255, 0.09);
}

/* =====================================================
   MESSAGES WITH COSMIC GLOW & CORNERS
===================================================== */
.messages {
    flex: 1;
    min-height: 0;
    padding: 24px 20px 115px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message {
    max-width: min(760px, 84%);
    padding: 16px 22px;
    margin-bottom: 18px;
    border-radius: var(--card-radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    line-height: 1.65;
    font-size: 14.5px;
    word-wrap: break-word;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    contain: content;
    animation: messageEnter 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Bot replies: full-width plain text, ChatGPT/Gemini style — no bubble box */
.message.bot {
    max-width: 100%;
    width: 100%;
    margin-right: auto;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 6px 4px 6px 16px;
    position: relative;
    color: #e6edf0;
}

.message.bot::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 10px;
    background: linear-gradient(180deg, #00d9ff, #c026d3, #00d9ff);
    box-shadow: 0 0 10px #00d9ff, 0 0 20px #c026d3;
}

/* Rich formatting inside bot replies */
.message.bot p {
    margin: 0 0 12px;
}
.message.bot p:last-child {
    margin-bottom: 0;
}
.message.bot h2, .message.bot h3, .message.bot h4 {
    margin: 20px 0 10px;
    font-weight: 700;
    line-height: 1.4;
    color: #f2f9fb;
}
.message.bot h2 { font-size: 19px; }
.message.bot h3 { font-size: 17px; }
.message.bot h4 { font-size: 15.5px; }
.message.bot h2:first-child, .message.bot h3:first-child, .message.bot h4:first-child {
    margin-top: 2px;
}
.message.bot strong {
    color: #7fe9ff;
    font-weight: 700;
}
.message.bot ul, .message.bot ol {
    margin: 4px 0 14px;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.message.bot ul { list-style: disc; }
.message.bot ol { list-style: decimal; }
.message.bot li {
    padding-left: 4px;
}
.message.bot li::marker {
    color: #00d9ff;
    font-weight: 700;
}

.message.user {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.85), rgba(112, 76, 255, 0.85), rgba(192, 38, 211, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom-right-radius: 6px;
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

/* =====================================================
   CHATGPT / GEMINI FLOATING CAPSULE BAR WITH GAP
===================================================== */
.input-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 18px;
    background: linear-gradient(180deg, transparent 0%, rgba(2, 4, 9, 0.96) 40%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.input-pill-wrapper {
    flex: 1;
    min-width: 0;
    height: 52px;
    background: #14171d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 8px 0 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-pill-wrapper:focus-within {
    border-color: rgba(0, 234, 255, 0.45);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.15);
}

.lepsa-plus-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.lepsa-dynamic-plus {
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #9aa0a6;
    transition: color 0.2s ease, transform 0.2s ease;
}

.lepsa-dynamic-plus:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.plus-core {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

#messageInput {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 12px;
    color: #ffffff;
    font-size: 15px;
}

#messageInput::placeholder {
    color: #7a828e;
    font-size: 14.5px;
}

.pill-inline-mic {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #9aa0a6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.pill-inline-mic svg {
    width: 20px;
    height: 20px;
}

.pill-inline-mic:hover {
    color: #ffffff;
}

.pill-outer-btn {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    border: none;
    background: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
}

.pill-outer-btn:hover {
    transform: scale(1.05);
    background: #1b80ff;
}

.pill-outer-btn:active {
    transform: scale(0.94);
}

.send-icon-svg {
    font-size: 17px;
    color: #ffffff;
    font-weight: 900;
    margin-left: 2px;
}






/* =====================================================
   RESPONSIVE DRAWER & OVERLAY
===================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 14, 0.7);
    backdrop-filter: blur(8px);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 700px) {
    .lepsa-drawer-btn {
        display: flex !important;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0) !important;
    }

    .message.user {
        max-width: 90% !important;
    }
    .message.bot {
        max-width: 100% !important;
    }
}

/* =====================================================
   AUTHENTIC GEMINI LIVE: CORNER STREAM & PLASMA CORE
===================================================== */

/* Full Screen Immersive Overlay */
.gemini-live-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background:
        radial-gradient(circle at 50% 100%, rgba(20, 40, 130, 0.55) 0%, rgba(5, 10, 30, 0) 55%),
        radial-gradient(circle at center, rgba(3, 8, 16, 0.94) 0%, rgba(1, 3, 7, 0.99) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: clamp(20px, 4vh, 45px) 20px;
    overflow: hidden;
}

 
/* =====================================================
   REAL GEMINI LIVE: 100% STATIC CORNERS (NO ROTATE)
===================================================== */
.gemini-edge-stream {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    border: 3px solid transparent;
    border-image: linear-gradient(135deg, #00eaff, #0066ff, #9b30ff, #ff2ea6, #00eaff) 1;
    opacity: 0.9;
    animation: cornerPulseFlow 3s ease-in-out infinite alternate;
}

.gemini-edge-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    box-shadow: 
        inset 0 0 20px rgba(0, 234, 255, 0.45),
        inset 0 0 50px rgba(155, 48, 255, 0.3);
    animation: cornerPulseFlow 3s ease-in-out infinite alternate;
}

@keyframes cornerPulseFlow {
    0% {
        filter: drop-shadow(0 0 4px #00eaff) hue-rotate(0deg);
        opacity: 0.75;
    }
    100% {
        filter: drop-shadow(0 0 14px #ff2ea6) hue-rotate(90deg);
        opacity: 1;
    }
}


/* 2. VOICE MODE STAGE — title, subtitle, bounce ball */
.voice-mode-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 10vh;
    z-index: 10;
    text-align: center;
    padding: 0 24px;
}

.voice-mode-title {
    margin: 0;
    font-size: clamp(26px, 7vw, 34px);
    font-weight: 600;
    color: #f2f6f8;
    letter-spacing: 0.2px;
}

.voice-mode-subtitle {
    margin: 0;
    max-width: 320px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #93a7b5;
    font-weight: 500;
}

/* 3. BOUNCE BALL (replaces the Gemini star) */
.bounce-ball-wrap {
    position: relative;
    width: 90px;
    height: 78px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bounce-ball {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 35%, #4ade80 65%, #2196f3 100%);
    box-shadow: 0 0 25px rgba(80, 150, 255, 0.55), 0 0 50px rgba(255, 95, 109, 0.25);
    animation: ballBounceIdle 1.3s cubic-bezier(0.5, 0, 1, 0.6) infinite alternate;
}

.bounce-ball-shadow {
    position: absolute;
    bottom: 0;
    width: 34px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    filter: blur(3px);
    animation: ballShadowIdle 1.3s cubic-bezier(0.5, 0, 1, 0.6) infinite alternate;
}

@keyframes ballBounceIdle {
    from { transform: translateY(0); }
    to   { transform: translateY(-34px); }
}
@keyframes ballShadowIdle {
    from { transform: scale(1); opacity: 0.6; }
    to   { transform: scale(0.55); opacity: 0.2; }
}

/* User bol raha hai tab — tez, cyan bounce */
.bounce-ball-wrap.listening .bounce-ball {
    background: linear-gradient(135deg, #00eaff, #2940ff);
    box-shadow: 0 0 30px #00eaff, 0 0 60px rgba(0, 234, 255, 0.6);
    animation: ballBounceFast 0.55s cubic-bezier(0.5, 0, 1, 0.5) infinite alternate;
}
.bounce-ball-wrap.listening .bounce-ball-shadow {
    animation: ballShadowFast 0.55s cubic-bezier(0.5, 0, 1, 0.5) infinite alternate;
}

/* AI bol raha hai tab — tez, magenta/purple bounce */
.bounce-ball-wrap.speaking .bounce-ball {
    background: linear-gradient(135deg, #ff2ea6, #9b30ff);
    box-shadow: 0 0 35px #ff2ea6, 0 0 70px rgba(255, 46, 166, 0.6);
    animation: ballBounceFast 0.4s cubic-bezier(0.5, 0, 1, 0.5) infinite alternate;
}
.bounce-ball-wrap.speaking .bounce-ball-shadow {
    animation: ballShadowFast 0.4s cubic-bezier(0.5, 0, 1, 0.5) infinite alternate;
}

@keyframes ballBounceFast {
    from { transform: translateY(0) scale(1, 0.92); }
    to   { transform: translateY(-40px) scale(0.92, 1.06); }
}
@keyframes ballShadowFast {
    from { transform: scale(1); opacity: 0.6; }
    to   { transform: scale(0.45); opacity: 0.15; }
}

/* Subtitle Transcript */
.live-transcript-card {
    width: 100%;
    max-width: 480px;
    min-height: 20px;
    max-height: 110px;
    overflow-y: auto;
    color: #e0f7fa;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    z-index: 10;
}
.live-transcript-card:empty {
    display: none;
}

/* 4. BOTTOM BAR — camera, upload, pill, mic, close */
.voice-mode-bottombar {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.voice-bar-btn {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #eaf2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.voice-bar-btn svg {
    width: 22px;
    height: 22px;
}

.voice-bar-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.voice-bar-mic.muted {
    background: rgba(255, 70, 70, 0.18);
    border-color: rgba(255, 70, 70, 0.5);
    color: #ff8a8a;
}

.voice-bar-close {
    background: rgba(255, 255, 255, 0.07);
}
.voice-bar-close:hover {
    background: rgba(255, 60, 100, 0.22);
    border-color: rgba(255, 60, 100, 0.5);
    color: #ffffff;
}

.voice-bar-center-pill {
    flex: 1;
    margin: 0 12px;
    height: 46px;
    border-radius: 26px;
    background: rgba(0, 234, 255, 0.06);
    border: 1px solid rgba(0, 234, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.voice-bar-center-pill span {
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: #67e8f9;
    animation: pillBarWave 1s ease-in-out infinite;
}
.voice-bar-center-pill span:nth-child(2) { animation-delay: 0.15s; }
.voice-bar-center-pill span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pillBarWave {
    0%, 100% { height: 8px; opacity: 0.5; }
    50% { height: 20px; opacity: 1; }
}


/* =====================================================
   LEPSA PRO ATTACHMENT POPUP (EXACT MATCH)
===================================================== */
.lepsa-glass-menu {
    position: absolute;
    bottom: 68px;
    left: 0;
    width: 200px;
    padding: 8px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(8, 16, 28, 0.96) 0%, rgba(3, 6, 12, 0.98) 100%);
    border: 1px solid rgba(0, 234, 255, 0.28);
    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.8),
        0 0 25px rgba(0, 234, 255, 0.12),
        inset 0 0 15px rgba(0, 234, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 99999;
}

.lepsa-glass-menu.show {
    display: flex;
    animation: popupSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Individual Row Button */
.glass-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glass-menu-item:hover {
    background: rgba(0, 234, 255, 0.08);
    border-color: rgba(0, 234, 255, 0.25);
    transform: translateX(3px);
}

/* Dark Circular Icon Disc (Screenshot Match) */
.menu-icon-disc {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: #25282d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: 0.2s ease;
}

.glass-menu-item:hover .menu-icon-disc {
    background: #30353c;
    border-color: rgba(0, 234, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 234, 255, 0.25);
}

/* Crisp White Line SVG Icon */
.attach-svg-icon {
    width: 20px;
    height: 20px;
    color: #ffffff;
    stroke-width: 2.2;
}

/* Clean Typography */
.menu-item-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #f1f7fa;
}

/* Real-time typing cursor */
.typing-cursor {
    display: inline-block;
    color: var(--lepsa-cyan);
    animation: blinkCursor 0.8s infinite;
    font-weight: bold;
    margin-left: 3px;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.thinking-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d9ff, #c026d3);
    animation: thinkingBounce 1s ease-in-out infinite;
}

.thinking-indicator span:nth-child(2) { animation-delay: 0.15s; }
.thinking-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes thinkingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Professional Code Blocks */
.code-wrapper {
    margin: 12px 0;
    border-radius: 14px;
    background: #080c14;
    border: 1px solid rgba(0, 234, 255, 0.2);
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-lang {
    font-size: 11px;
    color: #8faab5;
    text-transform: uppercase;
    font-weight: 700;
}

.copy-code-btn {
    background: rgba(0, 234, 255, 0.15);
    border: 1px solid rgba(0, 234, 255, 0.3);
    color: #00eaff;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: 0.2s;
}

.copy-code-btn:hover {
    background: #00eaff;
    color: #000;
}

.code-wrapper pre {
    padding: 14px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #a5f3fc;
}

.inline-code {
    background: rgba(0, 234, 255, 0.1);
    color: #00eaff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}


/* =====================================================
   AUTO-RESIZING TEXTAREA & SUGGESTION CHIPS
===================================================== */
#messageInput {
    flex: 1;
    min-width: 0;
    max-height: 120px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 12px 12px 10px;
    color: #ffffff;
    font-size: 15px;
    resize: none;
    line-height: 1.4;
    font-family: inherit;
    overflow-y: auto;
}

#messageInput::-webkit-scrollbar {
    width: 4px;
}
#messageInput::-webkit-scrollbar-thumb {
    background: rgba(0, 234, 255, 0.2);
    border-radius: 4px;
}

/* Suggestion Chips */
.suggestion-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding: 4px 6px;
}

.sug-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(8, 16, 28, 0.85);
    border: 1px solid rgba(0, 234, 255, 0.25);
    border-radius: 20px;
    color: #c9eaf2;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.sug-chip:hover {
    background: rgba(0, 234, 255, 0.12);
    border-color: #00eaff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 234, 255, 0.2);
}

.sug-chip .chip-emoji {
    font-size: 14px;
}

/* Ensure Input Bar and Action Button Stay Visually Aligned */
.input-area {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.input-pill-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.pill-outer-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}


/* Bot Message Action Bar */


/* =====================================================
   MINIMALIST ICON ACTION BAR (GEMINI / CHATGPT STYLE)
===================================================== */
.msg-action-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding-top: 6px;
    border: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.msg-act-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    overflow: hidden;
}

.msg-act-icon-btn svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    display: block;
    pointer-events: none;
}


.msg-act-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.msg-act-icon-btn:active {
    transform: scale(0.92);
}

.msg-act-icon-btn.active {
    color: #00eaff;
}


/* =====================================================
   LEPSA PRO ACCOUNT SETTINGS DRAWER (DARK CYAN THEME)
===================================================== */
.lepsa-settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: radial-gradient(circle at 10% 10%, rgba(0, 234, 255, 0.08) 0%, transparent 40%),
                linear-gradient(180deg, #03060c 0%, #060b14 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    animation: settingsSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.settings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 234, 255, 0.15);
    background: rgba(3, 7, 14, 0.85);
}

.settings-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 234, 255, 0.08);
    border: 1px solid rgba(0, 234, 255, 0.25);
    color: #00eaff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.settings-back-btn:hover {
    background: rgba(0, 234, 255, 0.2);
    transform: scale(1.05);
}

.settings-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.settings-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px 40px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.settings-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.settings-avatar-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #00eaff 35%, #704cff 80%);
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.45);
    padding: 3px;
    margin-bottom: 12px;
}

.settings-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #060e18;
    color: #00eaff;
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-user-name {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
}

.settings-user-email {
    font-size: 12px;
    color: #00eaff;
    margin-top: 4px;
    opacity: 0.85;
}

.settings-sec-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #587987;
    margin: 18px 0 8px 6px;
}

.settings-group {
    background: rgba(10, 20, 32, 0.65);
    border: 1px solid rgba(0, 234, 255, 0.14);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 10px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(0, 234, 255, 0.08);
}

.settings-item .s-icon {
    font-size: 16px;
    min-width: 22px;
    text-align: center;
}

.settings-item .s-label {
    font-size: 14px;
    font-weight: 500;
    color: #e2f4f8;
}

.settings-item.highlight-cyan .s-label {
    color: #00eaff;
    font-weight: 600;
}

.s-dual strong {
    display: block;
    font-size: 13.5px;
    color: #ffffff;
}

.s-dual small {
    display: block;
    font-size: 11px;
    color: #7296a4;
    margin-top: 2px;
}

.settings-logout-btn {
    margin-top: 24px;
    padding: 14px;
    background: rgba(255, 60, 60, 0.08);
    border: 1px solid rgba(255, 60, 60, 0.25);
    border-radius: 16px;
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s ease;
}

.settings-logout-btn:hover {
    background: rgba(255, 60, 60, 0.18);
    border-color: #ff5252;
}



/* =====================================================
   MESSAGE CONTEXT POPUP (BRANCH / RETRY)
===================================================== */
.msg-context-popup {
    position: fixed;
    z-index: 999999;
    width: 220px;
    background: #181a1f;
    border: 1px solid rgba(0, 234, 255, 0.25);
    border-radius: 16px;
    padding: 10px 8px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 234, 255, 0.08);
    backdrop-filter: blur(12px);
}

.popup-timestamp {
    font-size: 11px;
    color: #8b949e;
    padding: 4px 10px 8px;
    font-weight: 500;
}

.popup-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.popup-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #e6edf3;
    font-size: 13.5px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.popup-item svg {
    width: 18px;
    height: 18px;
    color: #a5f3fc;
    flex-shrink: 0;
}

.popup-item:hover {
    background: rgba(0, 234, 255, 0.12);
    color: #ffffff;
}

.popup-item:active {
    transform: scale(0.97);
}


/* =====================================================
   REAL MEDIA VAULT GRID
===================================================== */
.vault-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 10px;
}

.vault-item-card {
    background: rgba(10, 20, 32, 0.75);
    border: 1px solid rgba(0, 234, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: 0.2s ease;
}

.vault-item-card:hover {
    border-color: #00eaff;
    transform: translateY(-2px);
}

.vault-item-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
}

.vault-item-name {
    font-size: 11px;
    color: #c8eef8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
   CUSTOM CONFIRM MODAL (replaces native browser confirm())
===================================================== */
.lepsa-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(2, 4, 9, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: lepsaFadeIn 0.18s ease;
}

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

.lepsa-confirm-box {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(160deg, rgba(10, 20, 36, 0.97), rgba(4, 8, 18, 0.98));
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    padding: 24px 20px 18px;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.15), 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: lepsaPopIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes lepsaPopIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lepsa-confirm-msg {
    margin: 0 0 22px;
    color: #e6edf0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.lepsa-confirm-actions {
    display: flex;
    gap: 10px;
}

.lepsa-confirm-btn {
    flex: 1;
    padding: 11px 0;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.lepsa-confirm-btn.cancel {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #c9d7dc;
}
.lepsa-confirm-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lepsa-confirm-btn.ok {
    background: linear-gradient(135deg, #ff3c64, #c026d3);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(255, 60, 100, 0.35);
}
.lepsa-confirm-btn.ok:hover {
    box-shadow: 0 0 26px rgba(255, 60, 100, 0.55);
}

/* =====================================================
   TOAST NOTIFICATION (replaces native browser alert())
===================================================== */
.lepsa-toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: 100%;
    padding: 0 20px;
}

.lepsa-toast {
    background: linear-gradient(145deg, rgba(10, 20, 36, 0.96), rgba(4, 8, 18, 0.98));
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: #e6edf0;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.2), 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 340px;
    text-align: center;
    animation: lepsaToastIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lepsa-toast.hide {
    animation: lepsaToastOut 0.25s ease forwards;
}

@keyframes lepsaToastIn {
    from { transform: translateY(14px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes lepsaToastOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(14px); opacity: 0; }
}

/* =====================================================
   TOOL USE: searching status + source citations
===================================================== */
.tool-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7fe9ff;
    font-size: 13.5px;
    font-weight: 600;
    padding: 4px 0;
}

.tool-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00eaff;
    box-shadow: 0 0 10px #00eaff;
    animation: toolStatusPulse 0.9s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes toolStatusPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.sources-block {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 217, 255, 0.15);
}

.sources-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #6b8894;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.source-chip {
    display: inline-block;
    max-width: 220px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 217, 255, 0.06);
    border: 1px solid rgba(0, 217, 255, 0.25);
    color: #a5f3fc;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: 0.2s;
}

.source-chip:hover {
    background: rgba(0, 217, 255, 0.14);
    border-color: rgba(0, 217, 255, 0.45);
}

/* =====================================================
   MEMORY PANEL
===================================================== */
.memory-panel-box {
    width: 100%;
    max-width: 380px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(10, 20, 36, 0.97), rgba(4, 8, 18, 0.98));
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.15), 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: lepsaPopIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.memory-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.memory-panel-header h3 {
    margin: 0;
    font-size: 17px;
    color: #e6edf0;
}

.memory-close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #c9d7dc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.memory-close-btn:hover {
    background: rgba(255, 60, 100, 0.18);
    color: #fff;
}

.memory-panel-sub {
    font-size: 12.5px;
    color: #6b8894;
    margin: 6px 0 14px;
}

.memory-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 40px;
    max-height: 50vh;
}

.memory-fact-item {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(0, 234, 255, 0.05);
    border: 1px solid rgba(0, 234, 255, 0.14);
    color: #d6eef3;
    font-size: 13px;
    line-height: 1.5;
}

.memory-empty-note {
    text-align: center;
    color: #55727d;
    font-size: 12.5px;
    padding: 24px 10px;
}

.memory-clear-btn {
    margin-top: 16px;
    width: 100%;
    padding: 11px 0;
    border-radius: 12px;
    background: rgba(255, 60, 100, 0.1);
    border: 1px solid rgba(255, 60, 100, 0.3);
    color: #ff8a8a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.memory-clear-btn:hover {
    background: rgba(255, 60, 100, 0.2);
}

/* =====================================================
   GENERATED IMAGES (image generation tool)
===================================================== */
.generated-image-wrap {
    margin: 10px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.25);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.12), 0 10px 30px rgba(0, 0, 0, 0.4);
    max-width: 340px;
}

.generated-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.generated-image:hover {
    transform: scale(1.015);
}

/* =====================================================
   IMAGE LIGHTBOX (generated images — full view, in-app)
===================================================== */
.image-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(2, 4, 9, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: lepsaFadeIn 0.2s ease;
}

.image-lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0, 217, 255, 0.2), 0 20px 60px rgba(0, 0, 0, 0.7);
}


/* Sidebar overlay: smooth fade, sirf mobile par; tap = close */
@media (max-width: 700px) {
    .sidebar-overlay { display: block !important; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
    .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
    .sidebar { z-index: 1000; }
}
@media (min-width: 701px) {
    .sidebar-overlay { display: none !important; }
}

/* =====================================================
   ACCOUNT PAGE v2
===================================================== */
.acc-hero {
    position: relative; overflow: hidden; text-align: center;
    padding: 28px 18px 18px; margin-bottom: 26px; border-radius: 28px;
    background: linear-gradient(160deg, rgba(0,234,255,.12) 0%, rgba(112,76,255,.14) 55%, rgba(192,38,211,.12) 100%);
    border: 1px solid rgba(0,234,255,.25);
    box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 0 40px rgba(0,234,255,.05);
}
.acc-hero-glow { position:absolute; width:220px; height:220px; left:50%; top:-90px; transform:translateX(-50%);
    background: radial-gradient(circle, rgba(0,234,255,.35), transparent 70%); filter: blur(10px); pointer-events:none; }
.acc-hero .settings-avatar-wrap { position: relative; margin: 0 auto 12px; width: 84px; height: 84px; }
.acc-online-dot { position:absolute; right:4px; bottom:6px; width:15px; height:15px; border-radius:50%;
    background:#22e07a; border:3px solid #07101b; box-shadow:0 0 10px #22e07a; }
.acc-plan-badge { display:inline-block; margin-top:12px; padding:6px 14px; border-radius:999px; font-size:11px;
    font-weight:800; letter-spacing:1.4px; color:#031018; background: linear-gradient(90deg,#00eaff,#8b6bff,#e056ff); }
.acc-stats { display:grid; grid-template-columns:repeat(3,1fr); margin-top:20px; padding-top:16px;
    border-top:1px solid rgba(255,255,255,.08); }
.acc-stats div { display:flex; flex-direction:column; gap:3px; }
.acc-stats div + div { border-left:1px solid rgba(255,255,255,.08); }
.acc-stats b { font-size:21px; color:#fff; font-weight:800; }
.acc-stats span { font-size:11px; letter-spacing:1px; color:#7fa6b8; text-transform:uppercase; }

.acc-group { background: rgba(8,16,28,.88); border:1px solid rgba(0,234,255,.14); border-radius:22px; overflow:hidden; margin-bottom:6px; }
.acc-row { display:flex; align-items:center; gap:14px; padding:13px 16px; cursor:pointer;
    border-bottom:1px solid rgba(255,255,255,.05); transition: background .15s ease, transform .1s ease; -webkit-tap-highlight-color: transparent; }
.acc-row:last-child { border-bottom:none; }
.acc-row:active { background: rgba(0,234,255,.10); transform: scale(.992); }
.acc-ico { width:40px; height:40px; flex-shrink:0; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:19px; }
.ic-cyan{background:linear-gradient(145deg,rgba(0,234,255,.28),rgba(0,234,255,.08));}
.ic-pink{background:linear-gradient(145deg,rgba(255,80,190,.28),rgba(255,80,190,.08));}
.ic-violet{background:linear-gradient(145deg,rgba(140,110,255,.32),rgba(140,110,255,.08));}
.ic-green{background:linear-gradient(145deg,rgba(40,230,130,.28),rgba(40,230,130,.08));}
.ic-amber{background:linear-gradient(145deg,rgba(255,180,60,.28),rgba(255,180,60,.08));}
.ic-blue{background:linear-gradient(145deg,rgba(70,140,255,.30),rgba(70,140,255,.08));}
.ic-red{background:linear-gradient(145deg,rgba(255,90,90,.28),rgba(255,90,90,.08));}
.acc-txt { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.acc-txt strong { font-size:15px; color:#fff; font-weight:600; }
.acc-txt small { font-size:12px; color:#7d93a3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acc-val { font-size:12.5px; color:#00eaff; max-width:92px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acc-chev { color:#51697a; font-size:22px; line-height:1; }
.acc-row.highlight-cyan .acc-txt strong { color:#00eaff; }
.acc-logout { width:100%; margin-top:22px; padding:15px; border-radius:20px; border:1px solid rgba(255,90,90,.4);
    background: linear-gradient(135deg, rgba(255,70,70,.18), rgba(120,20,40,.25)); color:#ff7b7b;
    font-size:15px; font-weight:700; letter-spacing:.4px; cursor:pointer; transition:.15s ease; }
.acc-logout:active { transform: scale(.98); background: rgba(255,70,70,.3); }
.acc-version { text-align:center; margin:16px 0 4px; font-size:11px; letter-spacing:1.4px; color:#3f566a; }

/* ---------- bottom sheet ---------- */
.lsheet-back { position:fixed; inset:0; z-index:5000000; background:rgba(0,0,0,.62); backdrop-filter:blur(4px);
    opacity:0; pointer-events:none; transition:opacity .25s ease; }
.lsheet-back.show { opacity:1; pointer-events:auto; }
.lsheet { position:fixed; left:0; right:0; bottom:0; z-index:5000001; max-height:90dvh; display:flex; flex-direction:column;
    margin:0 auto; max-width:560px; border-radius:28px 28px 0 0; background:linear-gradient(180deg,#0a1422,#060b14);
    border:1px solid rgba(0,234,255,.22); border-bottom:none; box-shadow:0 -20px 60px rgba(0,0,0,.6);
    transform:translateY(105%); transition:transform .32s cubic-bezier(.16,1,.3,1); }
.lsheet.show { transform:translateY(0); }
.lsheet-handle { width:44px; height:4px; border-radius:4px; background:rgba(255,255,255,.22); margin:10px auto 2px; }
.lsheet-head { display:flex; align-items:center; justify-content:space-between; padding:10px 20px 8px; }
.lsheet-title { font-size:17px; font-weight:700; color:#fff; }
.lsheet-close { width:34px; height:34px; border-radius:50%; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.06); color:#c8d6e0; cursor:pointer; }
.lsheet-body { overflow-y:auto; padding:6px 20px calc(24px + env(safe-area-inset-bottom,0px)); }

.sh-label { font-size:11px; letter-spacing:1.4px; color:#6f8aa0; margin:16px 0 8px; text-transform:uppercase; }
.sh-input, .sh-textarea { width:100%; box-sizing:border-box; padding:13px 14px; border-radius:14px; font-size:14.5px;
    background:rgba(255,255,255,.05); border:1px solid rgba(0,234,255,.2); color:#fff; outline:none; font-family:inherit; }
.sh-input:focus, .sh-textarea:focus { border-color:#00eaff; box-shadow:0 0 0 3px rgba(0,234,255,.12); }
.sh-textarea { min-height:110px; resize:vertical; }
.sh-count { text-align:right; font-size:11px; color:#5d7488; margin-top:4px; }
.sh-chips { display:flex; flex-wrap:wrap; gap:8px; }
.sh-chip { padding:9px 15px; border-radius:999px; font-size:13px; cursor:pointer; color:#b8cad6;
    border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.04); transition:.15s ease; }
.sh-chip.on { color:#031018; font-weight:700; border-color:transparent; background:linear-gradient(90deg,#00eaff,#8b6bff); }
.sh-btn { width:100%; margin-top:20px; padding:14px; border:none; border-radius:16px; font-size:15px; font-weight:700; cursor:pointer;
    color:#031018; background:linear-gradient(90deg,#00eaff,#8b6bff,#e056ff); }
.sh-btn.ghost { color:#00eaff; background:rgba(0,234,255,.08); border:1px solid rgba(0,234,255,.3); }
.sh-btn:active { transform:scale(.985); }

.sh-toggle-row { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,.06); }
.sh-toggle-row:last-child { border-bottom:none; }
.sh-toggle-row .acc-txt strong { font-size:15px; }
.sw { position:relative; width:50px; height:30px; border-radius:999px; background:#26384a; cursor:pointer; flex-shrink:0; transition:.2s; }
.sw::after { content:""; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#fff; transition:.2s; }
.sw.on { background:linear-gradient(90deg,#00c8e0,#7a5cff); }
.sw.on::after { left:23px; }

.sh-card { display:flex; align-items:center; gap:14px; padding:14px; margin-bottom:10px; border-radius:18px; cursor:pointer;
    background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); transition:.15s ease; }
.sh-card.on { border-color:#00eaff; background:linear-gradient(135deg,rgba(0,234,255,.12),rgba(112,76,255,.12)); box-shadow:0 0 22px rgba(0,234,255,.12); }
.sh-check { margin-left:auto; width:22px; height:22px; border-radius:50%; border:2px solid rgba(255,255,255,.2); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:#031018; }
.sh-card.on .sh-check { background:#00eaff; border-color:#00eaff; }
.sh-feature { display:flex; gap:12px; padding:10px 0; color:#cfe0ea; font-size:14px; }
.sh-feature b { color:#00eaff; }

/* ---------- voice studio ---------- */
.vs-status { display:flex; align-items:center; gap:12px; padding:13px 14px; border-radius:16px; margin:4px 0 6px;
    background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); font-size:13px; color:#c8d6e0; }
.vs-status.ok { border-color:rgba(40,230,130,.4); background:rgba(40,230,130,.07); }
.vs-status.bad { border-color:rgba(255,170,60,.45); background:rgba(255,170,60,.08); }
.vs-dot { width:10px; height:10px; border-radius:50%; background:#6f8aa0; flex-shrink:0; }
.vs-status.ok .vs-dot { background:#22e07a; box-shadow:0 0 10px #22e07a; }
.vs-status.bad .vs-dot { background:#ffaa3c; box-shadow:0 0 10px #ffaa3c; }
.vs-status small { display:block; color:#8aa2b3; margin-top:2px; word-break:break-word; }
.vs-avatar { width:44px; height:44px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
    font-weight:800; font-size:18px; color:#031018; }
.vs-play { width:36px; height:36px; border-radius:50%; flex-shrink:0; border:1px solid rgba(0,234,255,.35);
    background:rgba(0,234,255,.1); color:#00eaff; cursor:pointer; font-size:13px; }
.vs-play.busy { opacity:.5; }
.vs-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.vs-tag { font-size:10.5px; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.07); color:#9fb6c6; text-transform:capitalize; }
.vs-range { width:100%; accent-color:#00eaff; }
.vs-range-row { display:flex; align-items:center; gap:12px; }
.vs-range-row b { min-width:44px; text-align:right; color:#00eaff; font-size:13px; }

.voice-style-chip { position:absolute; top:calc(18px + env(safe-area-inset-top,0px)); right:16px; z-index:5; padding:9px 15px;
    border-radius:999px; font-size:13px; color:#d8f6ff; cursor:pointer; background:rgba(255,255,255,.08);
    border:1px solid rgba(0,234,255,.35); backdrop-filter:blur(10px); }

/* ---------- voice mode: orb awaaz ke saath dhadakta hai ---------- */
.bounce-ball-wrap { transform: scale(calc(1 + var(--lvl, 0) * 0.7)); transition: transform 0.09s linear; }
.bounce-ball-wrap.listening .bounce-ball { filter: brightness(calc(1 + var(--lvl, 0) * 0.8)); }
.sh-card.locked { opacity: 0.5; }


/* =====================================================
   DESKTOP FIXES
   - user bubble hugs its text (was stretching to max-width on PC)
   - dark scrollbars (bright white scrollbar in sidebar looked broken)
===================================================== */
.message.user { width: fit-content; }
.messages { display: flex; flex-direction: column; }
.messages > .message.user { align-self: flex-end; }
.messages > .message.bot { align-self: flex-start; }
.app, .sidebar, .chat-container { height: 100vh; height: 100dvh; }
* { scrollbar-width: thin; scrollbar-color: rgba(0,234,255,.35) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(0,234,255,.3); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(0,234,255,.55); }

/* ---------- Dev Core: Run code ---------- */
.code-actions { display: flex; align-items: center; gap: 8px; }
.run-code-btn {
    background: linear-gradient(135deg, #00e5ff, #3b82ff);
    border: none; color: #031018; font-weight: 700;
    border-radius: 6px; padding: 3px 12px; font-size: 11px; cursor: pointer; transition: .2s;
}
.run-code-btn:hover { filter: brightness(1.12); }
.run-code-btn.running { background: #ff5a6e; color: #fff; }
.code-output { border-top: 1px solid rgba(0, 234, 255, 0.2); background: #050911; }
.co-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; font-size: 11px; color: #8faab5; background: rgba(255,255,255,.03); }
.co-close { background: none; border: none; color: #8faab5; cursor: pointer; font-size: 13px; }
.co-close:hover { color: #fff; }
.co-body { padding: 10px 14px; max-height: 320px; overflow: auto; }
.co-body pre { margin: 0; padding: 0; background: none; font: 12.5px/1.6 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.co-out { color: #c9f5d6; }
.co-err { color: #ff8f9e; }
.co-frame { width: 100%; height: 320px; border: 0; border-radius: 8px; background: #fff; display: block; }

.co-fix-btn { margin-left: auto; margin-right: 10px; background: rgba(192,38,211,.18); border: 1px solid rgba(192,38,211,.5); color: #f0b3ff; border-radius: 6px; padding: 2px 10px; font-size: 11px; cursor: pointer; }
.co-fix-btn:hover { background: #c026d3; color: #fff; }

/* =====================================================================
   LEPSA CLEAN UI v8  —  ChatGPT-style: calm, readable, professional
   (loaded last so it overrides the older neon styling)
===================================================================== */
body, .app, .chat-container, .message, #messageInput, button, input, textarea {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- messages ---------- */
.messages { padding: 20px 16px 130px; }
.messages > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.message { font-size: 15.5px; line-height: 1.7; letter-spacing: 0; }

.message.user {
    background: #232833;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border-radius: 20px 20px 6px 20px;
    padding: 11px 18px;
    color: #f3f5f8;
    margin-left: auto; margin-right: auto;
    width: fit-content;
    max-width: min(820px, 88%);
}
.messages > .message.user { margin-left: auto; margin-right: 0; }
@media (min-width: 900px) { .messages > .message.user { margin-right: max(0px, calc((100% - 820px) / 2)); } }

.message.bot { padding: 4px 2px; color: #e8ecf1; font-size: 15.5px; }
.message.bot::before { display: none !important; }
.message.bot p { margin: 0 0 14px; line-height: 1.75; }
.message.bot p:last-child { margin-bottom: 0; }
.message.bot h2, .message.bot h3, .message.bot h4 {
    color: #fff; font-weight: 650; letter-spacing: -0.01em; margin: 22px 0 10px; line-height: 1.3;
}
.message.bot h2 { font-size: 21px; }
.message.bot h3 { font-size: 18px; }
.message.bot h4 { font-size: 16px; }
.message.bot strong { color: #fff; font-weight: 650; }
.message.bot ul, .message.bot ol { margin: 4px 0 16px; padding-left: 24px; }
.message.bot li { margin: 6px 0; line-height: 1.7; padding-left: 2px; }
.message.bot li::marker { color: #7f8c9a; }
.message.bot a { color: #6cc8ff; text-decoration: none; border-bottom: 1px solid rgba(108,200,255,.35); }
.message.bot a:hover { border-bottom-color: #6cc8ff; }
.message.bot hr { border: none; height: 1px; background: rgba(255,255,255,.1); margin: 20px 0; }
.message.bot blockquote { margin: 12px 0; padding: 4px 16px; border-left: 3px solid rgba(255,255,255,.2); color: #b9c3ce; }
.message.bot .inline-code, .inline-code {
    background: rgba(255,255,255,.08); color: #ffd9a8; border-radius: 6px; padding: 2px 6px;
    font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px;
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 14px; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.table-wrap th { background: rgba(255,255,255,.05); color: #fff; font-weight: 600; }
.table-wrap tr:last-child td { border-bottom: none; }

/* ---------- code card ---------- */
.code-wrapper {
    margin: 14px 0 18px; border-radius: 14px; overflow: hidden;
    background: #0f1218; border: 1px solid rgba(255,255,255,.09);
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.code-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 8px 7px 14px; min-height: 40px;
    background: #181c25; border-bottom: 1px solid rgba(255,255,255,.07);
}
.code-lang { font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: lowercase; color: #9aa6b4; }
.code-actions { display: flex; align-items: center; gap: 6px; }
.copy-code-btn, .run-code-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
    border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s;
}
.copy-code-btn { background: transparent; border: none; color: #aab5c2; }
.copy-code-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.copy-code-btn.copied { color: #5fe3a1; }
.run-code-btn { background: #e8ecf1; color: #0f1218; border: none; font-weight: 600; }
.run-code-btn:hover { background: #fff; filter: none; }
.run-code-btn.running { background: #ff5a6e; color: #fff; }
.code-wrapper pre {
    margin: 0; padding: 14px 16px 16px; overflow-x: auto; background: transparent;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13.5px; line-height: 1.65; color: #e6edf3; tab-size: 4; -webkit-text-size-adjust: 100%;
}
.code-wrapper pre code { font-family: inherit; background: none; padding: 0; white-space: pre; }
.code-wrapper pre::-webkit-scrollbar { height: 6px; }
.code-wrapper pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 6px; }
.tk-k { color: #ff7b9c; }   /* keywords */
.tk-s { color: #a5e075; }   /* strings */
.tk-n { color: #f0b072; }   /* numbers */
.tk-c { color: #6b7685; font-style: italic; }   /* comments */
.tk-f { color: #6cb6ff; }   /* function calls */
.tk-t { color: #ff8a8a; }   /* html tags / css selectors */
.tk-a { color: #f0b072; }   /* attributes / properties / json keys */
.code-output { background: #0b0e13; }
.co-head { background: #141821; }

/* ---------- input bar: fixes the floating placeholder ---------- */
.input-area { padding: 10px 14px 16px; align-items: flex-end; }
.input-pill-wrapper {
    height: auto !important; min-height: 54px; align-items: flex-end; padding: 4px 8px 4px 8px;
    background: #1a1e27; border: 1px solid rgba(255,255,255,.11); border-radius: 28px;
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.input-pill-wrapper:focus-within { border-color: rgba(255,255,255,.28); box-shadow: 0 6px 24px rgba(0,0,0,.4), 0 0 0 3px rgba(0,234,255,.08); }
#messageInput {
    height: auto; min-height: 44px; max-height: 140px; padding: 12px 10px; line-height: 1.45;
    font-size: 15.5px; align-self: center;
}
#messageInput::placeholder { color: #7d8794; font-size: 15px; }
.lepsa-plus-wrap, .pill-inline-mic { align-self: flex-end; margin-bottom: 4px; }
.pill-outer-btn { margin-bottom: 3px; }
@media (min-width: 900px) { .input-area { padding-left: calc((100% - 820px) / 2); padding-right: calc((100% - 820px) / 2); } }

/* ---------- code: no ligatures (-> == != must look like what you type) ---------- */
.code-wrapper pre, .code-wrapper code, .inline-code, .co-body pre {
    font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
}
/* ---------- python input() form ---------- */
.co-stdin { display: flex; flex-direction: column; gap: 8px; }
.co-stdin label { font-size: 12.5px; color: #9aa6b4; line-height: 1.5; }
.co-stdin code { background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 5px; color: #ffd9a8; }
.co-stdin textarea { width: 100%; background: #12161d; color: #e6edf3; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; font: 13.5px/1.5 "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; resize: vertical; outline: none; }
.co-stdin textarea:focus { border-color: rgba(0,234,255,.5); }
.co-stdin-run { align-self: flex-start; background: #e8ecf1; color: #0f1218; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.co-stdin-run:hover { background: #fff; }

/* ---------- attachment tray + chips (photo / document / project go out with the text) ---------- */
#imagePreviewContainer { display: none !important; }
#attachTray {
    position: absolute; left: 14px; right: 14px; bottom: 100%; display: none; gap: 8px;
    overflow-x: auto; padding: 0 2px 8px; z-index: 30; scrollbar-width: none;
}
#attachTray::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { #attachTray { left: calc((100% - 820px) / 2); right: calc((100% - 820px) / 2); } }
.att-chip {
    display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; max-width: 260px;
    background: #1c212b; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 7px 8px 7px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.35); color: #e8ecf1;
}
.att-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: rgba(255,255,255,.07); overflow: hidden; }
.att-image .att-icon { background: none; }
.att-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.att-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-text small { font-size: 11.5px; color: #8e9aa8; }
.att-chip button { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: none; background: rgba(255,255,255,.1); color: #cfd6de; font-size: 11px; cursor: pointer; }
.att-chip button:hover { background: #ff5a6e; color: #fff; }
.msg-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.message.user .att-chip { background: rgba(0,0,0,.25); box-shadow: none; max-width: 220px; }

/* ---------- Exam Prep: interactive quiz ---------- */
.quiz-card { margin: 14px 0 18px; background: #12161e; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 14px 14px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.quiz-title { font-weight: 650; font-size: 14.5px; color: #fff; }
.quiz-score { background: rgba(0,234,255,.12); color: #7ff3ff; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.quiz-q { padding: 14px 0 6px; border-top: 1px solid rgba(255,255,255,.07); margin-top: 10px; }
.quiz-head + .quiz-q { border-top: none; margin-top: 0; }
.quiz-qtext { font-size: 15px; line-height: 1.55; color: #f1f4f8; margin-bottom: 10px; }
.quiz-opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; margin: 7px 0; padding: 11px 12px; background: #1a1f29; color: #e6eaf0; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; font-size: 14.5px; line-height: 1.45; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.quiz-opt:hover:not(:disabled) { background: #212736; border-color: rgba(255,255,255,.22); }
.quiz-opt:active:not(:disabled) { transform: scale(.99); }
.quiz-opt:disabled { cursor: default; }
.quiz-letter { flex: 0 0 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.quiz-otext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.quiz-opt.correct { background: rgba(46,204,113,.16); border-color: #2ecc71; color: #d9ffe8; }
.quiz-opt.correct .quiz-letter { background: #2ecc71; color: #06210f; }
.quiz-opt.wrong { background: rgba(255,90,110,.15); border-color: #ff5a6e; color: #ffe0e5; }
.quiz-opt.wrong .quiz-letter { background: #ff5a6e; color: #2a050b; }
.quiz-why { margin: 8px 0 4px; padding: 10px 12px; background: rgba(255,255,255,.05); border-radius: 12px; font-size: 13.5px; line-height: 1.55; color: #cdd5df; }
.quiz-why[hidden], .quiz-result[hidden] { display: none; }
.quiz-result { margin-top: 14px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(0,234,255,.1), rgba(124,92,255,.14)); border: 1px solid rgba(255,255,255,.12); text-align: center; }
.quiz-bigscore { font-size: 30px; font-weight: 750; color: #fff; }
.quiz-bigscore small { font-size: 14px; color: #9fe9ff; margin-left: 6px; }
.quiz-msg { margin-top: 4px; color: #d7dee8; font-size: 14px; }
.quiz-weak { margin-top: 12px; font-size: 12.5px; color: #9aa6b4; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.quiz-weak span { background: rgba(255,90,110,.14); color: #ffb3bd; border-radius: 999px; padding: 3px 10px; }
.quiz-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.quiz-act { background: #e8ecf1; color: #0f1218; border: none; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.quiz-act.alt { background: rgba(255,255,255,.1); color: #fff; }
.quiz-act:hover { filter: brightness(1.08); }
.quiz-loading { display: flex; align-items: center; gap: 10px; color: #9aa6b4; font-size: 14px; }
.quiz-dots i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #7ff3ff; animation: quizdot 1s infinite ease-in-out; }
.quiz-dots i:nth-child(2) { animation-delay: .15s; } .quiz-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes quizdot { 0%,80%,100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.1); } }

/* ---------- Quick actions next to an attached document ---------- */
.att-act {
    flex: 0 0 auto; align-self: center; white-space: nowrap; cursor: pointer;
    background: rgba(0,234,255,.1); color: #7ff3ff; border: 1px solid rgba(0,234,255,.28);
    border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.att-act:hover { background: rgba(0,234,255,.2); }

/* ---------- Exam Prep: revision planner ---------- */
.pl-overlay { position: fixed; inset: 0; z-index: 100000; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.6); }
.pl-sheet { width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; background: #12161e; border: 1px solid rgba(255,255,255,.1); border-radius: 22px 22px 0 0; color: #e8ecf1; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
@media (min-width: 700px) { .pl-overlay { align-items: center; } .pl-sheet { border-radius: 22px; max-height: 86vh; } }
.pl-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; font-size: 16px; }
.pl-x { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.08); color: #cfd6de; cursor: pointer; }
.pl-body { overflow-y: auto; padding: 4px 18px 22px; -webkit-overflow-scrolling: touch; }
.pl-hint { color: #aab3bf; font-size: 13.5px; line-height: 1.5; margin: 6px 0 12px; }
.pl-lbl { display: block; font-size: 12.5px; color: #aab3bf; margin: 12px 0 6px; }
.pl-in { width: 100%; box-sizing: border-box; background: #1c212b; color: #e8ecf1; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 15px; color-scheme: dark; }
.pl-in:focus { outline: none; border-color: rgba(0,234,255,.5); }
textarea.pl-in { resize: vertical; min-height: 110px; }
.pl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pl-row.foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.pl-btn { border: 1px solid rgba(255,255,255,.14); background: #1c212b; color: #e8ecf1; border-radius: 12px; padding: 10px 15px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pl-btn.primary { background: rgba(0,234,255,.14); border-color: rgba(0,234,255,.4); color: #7ff3ff; }
.pl-btn.ghost { background: transparent; }
.pl-btn.danger { color: #ff8a98; }
.pl-btn.small { padding: 7px 12px; font-size: 13px; }
.pl-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.pl-exam { font-size: 18px; font-weight: 650; color: #fff; }
.pl-sub { font-size: 12.5px; color: #98a2b0; margin-top: 3px; }
.pl-count { text-align: center; background: rgba(0,234,255,.1); border: 1px solid rgba(0,234,255,.25); border-radius: 14px; padding: 8px 14px; line-height: 1.1; }
.pl-count b { display: block; font-size: 22px; color: #7ff3ff; }
.pl-count small { font-size: 11px; color: #98a2b0; }
.pl-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0 4px; }
.pl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #00eaff, #5b8cff); border-radius: 99px; transition: width .25s; }
.pl-h { margin: 18px 0 8px; font-size: 14.5px; color: #fff; }
.pl-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.09); color: #cfd6de; margin-left: 6px; }
.pl-tag.now { background: rgba(0,234,255,.16); color: #7ff3ff; }
.pl-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; margin-bottom: 8px; background: #1c212b; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.pl-item input { width: 19px; height: 19px; margin: 1px 0 0; flex: 0 0 19px; accent-color: #00eaff; }
.pl-item.done span { text-decoration: line-through; color: #7d8794; }
.pl-warn { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; background: rgba(255,180,0,.1); border: 1px solid rgba(255,180,0,.3); border-radius: 12px; font-size: 13px; color: #ffd27a; }
.pl-day { margin-bottom: 12px; }
.pl-day.past { opacity: .6; }
.pl-day.today .pl-dayhead { color: #7ff3ff; }
.pl-dayhead { font-size: 13px; font-weight: 600; color: #aab3bf; margin: 6px 0; }

/* ---------- Stop button, regenerate, edit, friendly errors ---------- */
#mainActionButton .stop-icon-svg { width: 15px; height: 15px; border-radius: 4px; background: #fff; display: none; }
#mainActionButton.is-stop { background: #ff4d5e; }
.stopped-note { margin-top: 8px; font-size: 12.5px; color: #98a2b0; }
.msg-edit-btn { display: block; margin: 8px 0 0 auto; background: rgba(255,255,255,.08); border: none; color: #cfd6de; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.msg-edit-btn:hover { background: rgba(255,255,255,.16); }
.message.user.editing { width: 100%; max-width: 100%; box-sizing: border-box; }
.edit-area { width: 100%; box-sizing: border-box; background: rgba(0,0,0,.25); color: inherit; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; }
.edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.edit-actions button { border: none; border-radius: 999px; padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.edit-cancel { background: rgba(255,255,255,.1); color: #e8ecf1; }
.edit-save { background: #00eaff; color: #04222a; }
.err-box { background: rgba(255,90,110,.08); border: 1px solid rgba(255,90,110,.28); border-radius: 14px; padding: 12px 14px; }
.err-msg { color: #ffb3bc; line-height: 1.45; }
.err-details { margin-top: 8px; font-size: 12px; color: #98a2b0; }
.err-details pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; color: #ff9aa6; }
.err-retry { margin-top: 10px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

.continue-wrap { margin-top: 10px; }

/* ---------- Chat search ---------- */
.chat-search { position: relative; display: flex; align-items: center; margin: 0 4px 8px; }
.chat-search > svg { position: absolute; left: 11px; color: #7d8794; pointer-events: none; }
.chat-search input { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: inherit; font: inherit; font-size: 14px; padding: 9px 32px 9px 34px; }
.chat-search input:focus { outline: none; border-color: rgba(0,234,255,.45); }
.chat-search-clear { position: absolute; right: 6px; width: 24px; height: 24px; border: none; border-radius: 50%; background: rgba(255,255,255,.1); color: #cfd6de; font-size: 11px; cursor: pointer; }
.conversation-list.searching { max-height: 340px; }
.conversation-item.search-hit { flex-direction: column; align-items: flex-start; gap: 3px; }
.search-snippet { display: block; width: 100%; font-size: 12px; line-height: 1.35; color: #8e98a6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.conversation-item mark { background: rgba(0,234,255,.25); color: #fff; border-radius: 3px; padding: 0 1px; }
.message.search-flash { animation: lepsaFlash 2.2s ease; }
@keyframes lepsaFlash { 0%, 60% { box-shadow: 0 0 0 2px rgba(0,234,255,.7); } 100% { box-shadow: 0 0 0 0 rgba(0,234,255,0); } }


/* ===== Memory control: edit / delete / add ===== */
.memory-count { color: var(--text-muted, #8aa2b3); font-size: 12px; margin-left: 4px; }
.memory-add-row { display: flex; gap: 8px; margin: 8px 0 10px; }
.memory-add-row .memory-edit-input { flex: 1; }
.memory-edit-input { width: 100%; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(0,234,255,0.35); background: rgba(8,16,28,0.6); color: inherit; font: inherit; font-size: 14px; outline: none; }
.memory-edit-input:focus { border-color: rgba(0,234,255,0.8); }
.memory-fact-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.memory-fact-item.editing { flex-direction: column; align-items: stretch; }
.memory-fact-text { flex: 1; min-width: 0; word-break: break-word; }
.memory-fact-actions { display: flex; gap: 6px; flex-shrink: 0; justify-content: flex-end; }
.memory-mini-btn { border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); color: inherit; border-radius: 10px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.memory-mini-btn:disabled { opacity: .5; }
.memory-mini-btn.memory-save { background: rgba(0,229,255,0.18); border-color: rgba(0,229,255,0.5); font-weight: 600; }

/* ---------- Business Core: invoice / quotation card ---------- */
.inv-card { margin: 14px 0 18px; background: #12161e; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.inv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.inv-title { font-weight: 700; font-size: 16px; color: #fff; }
.inv-date { font-size: 12.5px; color: #8e9aa8; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
@media (max-width: 520px) { .inv-parties { grid-template-columns: 1fr; } }
.inv-party { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: #d5dbe3; overflow-wrap: anywhere; }
.inv-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #7f8c9a; margin-bottom: 4px; }
.inv-scroll { overflow-x: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }
.inv-table th, .inv-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); color: #e3e8ee; }
.inv-table th { background: rgba(255,255,255,.05); font-size: 11.5px; color: #aab5c2; font-weight: 600; }
.inv-table td:nth-last-child(-n+3), .inv-table th:nth-last-child(-n+3) { text-align: right; white-space: nowrap; }
.inv-table tr:last-child td { border-bottom: none; }
.inv-table small { color: #8e9aa8; }
.inv-totals { margin: 12px 0 0 auto; width: min(100%, 320px); font-size: 13.5px; }
.inv-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 2px; color: #c5ced9; }
.inv-totals b { color: #fff; font-variant-numeric: tabular-nums; }
.inv-grand { border-top: 1px solid rgba(255,255,255,.2); margin-top: 4px; padding-top: 8px !important; font-size: 16px; }
.inv-grand b { font-size: 18px; color: #7ff3ff; }
.inv-words { margin-top: 10px; font-size: 12.5px; font-style: italic; color: #aab5c2; }
.inv-notes { margin-top: 10px; padding: 10px 12px; background: rgba(255,255,255,.04); border-radius: 12px; font-size: 13px; line-height: 1.55; color: #cdd5df; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.inv-hint { margin-top: 10px; font-size: 11.5px; color: #7f8c9a; }

/* ---------- Phone actions card (Android app) ---------- */
.act-card { margin: 14px 0 18px; background: #12161e; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.act-head { font-weight: 650; font-size: 14.5px; color: #fff; margin-bottom: 6px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.07); }
.act-head + .act-row { border-top: none; }
.act-ico { flex: 0 0 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.07); display: grid; place-items: center; font-size: 16px; }
.act-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; color: #e6eaf0; overflow-wrap: anywhere; }
.act-run { flex: 0 0 auto; background: #e8ecf1; color: #0f1218; border: none; border-radius: 9px; padding: 7px 14px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.act-run:disabled { opacity: .35; cursor: default; }
.act-run.ok { background: rgba(46,204,113,.2); color: #7dffb0; }
.act-run.bad { background: rgba(255,90,110,.2); color: #ff9aa8; }
.act-foot { margin-top: 10px; }
.act-note { margin-top: 8px; font-size: 12px; color: #7f8c9a; }

/* ===== Timed mock test (CBT style) ===== */
.mk-overlay { position: fixed; inset: 0; z-index: 100000; display: none; background: #070a10; color: #e8ecf1; }
.mk-shell { position: relative; width: 100%; max-width: 1100px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.mk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mk-top b { font-size: 16px; }
.mk-x { width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: inherit; font-size: 16px; cursor: pointer; }
.mk-scroll { flex: 1; overflow-y: auto; padding: 8px 14px 28px; -webkit-overflow-scrolling: touch; }
.mk-narrow { width: 100%; max-width: 640px; margin: 0 auto; }
.mk-lab { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8e9aa8; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-chip { padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.mk-chip.on { background: rgba(0,229,255,.2); border-color: #00e5ff; font-weight: 700; }
.mk-card { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(0,229,255,.28); background: rgba(0,229,255,.06); }
.mk-card b { font-size: 16px; }
.mk-card-sub { font-size: 13px; color: #b6c2cf; margin-top: 4px; line-height: 1.5; }
.mk-banner { margin: 10px 0; padding: 11px 14px; border-radius: 12px; background: rgba(46,204,113,.16); border: 1px solid rgba(46,204,113,.5); font-size: 14px; }
.mk-input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,229,255,.35); background: rgba(8,16,28,.7); color: inherit; font: inherit; font-size: 15px; outline: none; }
.mk-input:focus { border-color: #00e5ff; }
.mk-link { background: none; border: 0; color: #00e5ff; font: inherit; font-size: 13px; padding: 10px 0 0; cursor: pointer; }
.mk-primary { display: block; width: 100%; margin: 16px 0 6px; padding: 14px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #00e5ff, #704cff); color: #031018; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.mk-primary:disabled { opacity: .4; cursor: not-allowed; }
.mk-ghost { display: block; width: 100%; margin: 8px 0; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 14.5px; cursor: pointer; }
.mk-note { font-size: 12.5px; color: #8e9aa8; line-height: 1.5; margin: 8px 0; }
.mk-hist { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.05); margin: 6px 0; font-size: 13.5px; }
.mk-hist span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-hist small { color: #8e9aa8; }
.mk-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; gap: 6px; }
.mk-center .mk-primary, .mk-center .mk-ghost { max-width: 320px; }
.mk-err { color: #ff8a94; line-height: 1.5; max-width: 340px; overflow-wrap: anywhere; }
.mk-spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,255,255,.12); border-top-color: #00e5ff; animation: mkSpin .9s linear infinite; margin-bottom: 8px; }
@keyframes mkSpin { to { transform: rotate(360deg); } }

/* instructions */
.mk-ins { padding-left: 20px; line-height: 1.55; font-size: 14px; color: #d5dbe3; }
.mk-ins li { margin: 8px 0; }
.mk-ins-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; font-size: 13px; color: #b6c2cf; }
.mk-ins-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mk-agree { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 14px; line-height: 1.4; cursor: pointer; }
.mk-agree input { width: 20px; height: 20px; margin-top: 1px; accent-color: #00e5ff; }

/* status shapes (like the real exam palette) */
.mk-sh { display: inline-block; width: 20px; height: 20px; position: relative; flex-shrink: 0; }
.mk-sh.nv, .mk-pn.nv { background: #3b4350; border: 1px solid #596477; border-radius: 6px; }
.mk-sh.na, .mk-pn.na { background: #d6453b; border: 1px solid #ff8f87; border-radius: 4px 4px 14px 14px; color: #fff; }
.mk-sh.an, .mk-pn.an { background: #2e9e4f; border: 1px solid #6fe39a; border-radius: 14px 14px 4px 4px; color: #fff; }
.mk-sh.mk, .mk-pn.mk { background: #7e3fc0; border: 1px solid #c89bff; border-radius: 50%; color: #fff; }
.mk-sh.am, .mk-pn.am { background: #7e3fc0; border: 1px solid #c89bff; border-radius: 50%; color: #fff; }
.mk-sh.am::after, .mk-pn.am::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; border: 1.5px solid #070a10; }

/* CBT test screen */
.mk-cb-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0c1626; border-bottom: 1px solid rgba(0,229,255,.25); }
.mk-cb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-cb-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-cb-title small { font-size: 11.5px; color: #8e9aa8; }
.mk-cb-time { text-align: right; display: flex; flex-direction: column; }
.mk-cb-time small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #8e9aa8; }
.mk-cb-time b { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800; letter-spacing: .03em; color: #00eaff; }
.mk-cb-time b.low { color: #ff5d6c; animation: mkPulse 1s infinite; }
@keyframes mkPulse { 50% { opacity: .45; } }
.mk-cb-pbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font-size: 18px; cursor: pointer; }
.mk-cb-secs { display: flex; gap: 6px; padding: 8px 14px; overflow-x: auto; border-bottom: 1px solid rgba(255,255,255,.08); }
.mk-cb-sec { flex-shrink: 0; padding: 8px 14px; border-radius: 10px 10px 0 0; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.mk-cb-sec.on { background: #00e5ff; color: #031018; border-color: #00e5ff; font-weight: 800; }
.mk-cb-main { flex: 1; display: flex; min-height: 0; position: relative; }
.mk-cb-q { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-cb-qhead { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: rgba(255,255,255,.04); font-size: 14px; }
.mk-cb-marks { margin-left: auto; font-size: 12.5px; color: #8ee6a6; }
.mk-cb-marks em { color: #ff8a94; font-style: normal; margin-left: 4px; }
.mk-cb-arrows { display: flex; gap: 6px; }
.mk-cb-arrows button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: inherit; cursor: pointer; }
.mk-cb-arrows button:disabled { opacity: .3; }
.mk-qtext { font-size: 17px; line-height: 1.6; margin: 8px 0 14px; overflow-wrap: anywhere; }
.mk-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; margin: 8px 0; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: inherit; font: inherit; font-size: 15px; cursor: pointer; }
.mk-opt.sel { border-color: #00e5ff; background: rgba(0,229,255,.14); }
.mk-radio { flex: 0 0 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 2px solid #7f8c9a; position: relative; }
.mk-opt.sel .mk-radio { border-color: #00e5ff; }
.mk-opt.sel .mk-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #00e5ff; }
.mk-otext { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.mk-cb-side { width: 300px; flex-shrink: 0; border-left: 1px solid rgba(255,255,255,.1); background: #0a111d; display: flex; flex-direction: column; padding: 12px; overflow-y: auto; }
.mk-cb-sidehead { display: none; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mk-cb-secname { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8e9aa8; margin: 2px 0 8px; }
.mk-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.mk-pn { position: relative; height: 42px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.mk-pn.nv { color: #d5dbe3; }
.mk-pn.cur { outline: 2px solid #00e5ff; outline-offset: 2px; }
.mk-cb-legend { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; font-size: 12.5px; color: #b6c2cf; }
.mk-cb-legend span { display: flex; align-items: center; gap: 8px; }
.mk-submit-wide { margin-top: auto; padding: 13px; border: 0; border-radius: 12px; background: #00e5ff; color: #031018; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.mk-cb-foot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.1); background: #0c1626; }
.mk-fb { padding: 11px 6px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mk-fb.purple { background: #6a35a8; border-color: #b58cf0; }
.mk-fb.purple2 { background: #53307f; border-color: #9a74d6; }
.mk-fb.green { background: #2e9e4f; border-color: #6fe39a; color: #fff; }
@media (max-width: 899px) {
    .mk-cb-side { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 330px); z-index: 5; transform: translateX(102%); transition: transform .2s ease; box-shadow: -10px 0 30px rgba(0,0,0,.5); }
    .mk-cb-side.open { transform: none; }
    .mk-cb-sidehead { display: flex; }
    .mk-cb-foot { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) { .mk-cb-pbtn { display: none; } }

/* submit dialog */
.mk-modal { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.65); }
.mk-modal-card { width: 100%; max-width: 520px; max-height: 92%; overflow-y: auto; padding: 16px; border-radius: 16px; background: #101826; border: 1px solid rgba(255,255,255,.14); }
.mk-modal-card > b { font-size: 17px; }
.mk-modal-btns { display: flex; gap: 10px; }
.mk-modal-btns .mk-primary, .mk-modal-btns .mk-ghost { margin: 8px 0 0; }
.mk-scrollx { overflow-x: auto; margin: 10px 0; }
.mk-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 360px; }
.mk-table th, .mk-table td { border: 1px solid rgba(255,255,255,.14); padding: 7px 8px; text-align: center; }
.mk-table th { background: rgba(255,255,255,.07); font-size: 11.5px; color: #b6c2cf; }
.mk-table td:first-child, .mk-table th:first-child { text-align: left; }

/* result */
.mk-score { text-align: center; padding: 16px 8px 6px; }
.mk-exam-name { font-size: 13px; color: #8e9aa8; text-transform: uppercase; letter-spacing: .08em; }
.mk-big { font-size: 40px; font-weight: 800; color: #00e5ff; }
.mk-big small { font-size: 17px; color: #c5ced9; margin-left: 10px; font-weight: 600; }
.mk-msg { margin-top: 4px; color: #d5dbe3; }
.mk-stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.mk-stats span { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 13px; }
.mk-stats .g { background: rgba(46,204,113,.18); }
.mk-stats .r { background: rgba(255,93,108,.18); }
.mk-tp { margin: 8px 0; }
.mk-tp-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 4px; }
.mk-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.mk-bar.big { width: 240px; height: 10px; margin-top: 8px; }
.mk-bar i { display: block; height: 100%; border-radius: 99px; }
.mk-bar i.g { background: #2ecc71; } .mk-bar i.y { background: #ffc107; } .mk-bar i.r { background: #ff5d6c; }
.mk-actions { margin-top: 12px; }
.mk-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.mk-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; }
.mk-tab.on { background: rgba(0,229,255,.2); border-color: #00e5ff; }
.mk-rv { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 12px; margin: 10px 0; background: rgba(255,255,255,.03); }
.mk-rv.ok { border-color: rgba(46,204,113,.5); } .mk-rv.bad { border-color: rgba(255,93,108,.5); }
.mk-rv-sec { font-size: 11.5px; color: #8e9aa8; margin-bottom: 4px; }
.mk-rv-q { margin-bottom: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.mk-rv-o { display: flex; align-items: flex-start; gap: 8px; padding: 7px 9px; border-radius: 10px; margin: 4px 0; font-size: 14px; overflow-wrap: anywhere; }
.mk-rv-o.right { background: rgba(46,204,113,.18); }
.mk-rv-o.wrong { background: rgba(255,93,108,.18); }
.mk-rv-o em { margin-left: auto; font-size: 11px; color: #c5ced9; white-space: nowrap; }
.mk-letter { flex: 0 0 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.1); }
.mk-rv-skip { font-size: 12.5px; color: #ffc107; margin-top: 4px; }
.mk-rv-why { margin-top: 8px; font-size: 13.5px; color: #c5ced9; line-height: 1.5; }
.mk-table.sm { min-width: 0; table-layout: fixed; }
.mk-table.sm th { font-size: 10.5px; padding: 6px 3px; word-break: break-word; }
.mk-table.sm td { font-size: 12.5px; padding: 6px 3px; word-break: break-word; }
.mk-table.sm th:first-child, .mk-table.sm td:first-child { width: 28%; padding-left: 6px; }

/* ---------- Business profile + invoice polish ---------- */
.biz-logo-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.biz-logo { width: 120px; height: 56px; display: flex; align-items: center; justify-content: center; background: #1c212b; border: 1px dashed rgba(255,255,255,.2); border-radius: 10px; color: #7d8794; font-size: 12px; overflow: hidden; }
.biz-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inv-warn { margin: 10px 0 0; padding: 8px 10px; background: rgba(255,180,0,.1); border: 1px solid rgba(255,180,0,.3); border-radius: 10px; font-size: 12px; color: #ffd27a; }
.inv-link { background: none; border: none; padding: 0; color: #7ff3ff; font: inherit; font-size: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Dev Core: file labels, files bar, Code Studio ---------- */
.code-fname { color: #7ff3ff; font-weight: 600; }
.dl-code-btn, .studio-code-btn { background: transparent; border: none; color: #aab5c2; font: inherit; font-size: 12px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.dl-code-btn:hover, .studio-code-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.files-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 10px 12px; background: rgba(0,234,255,.07); border: 1px solid rgba(0,234,255,.22); border-radius: 14px; font-size: 13px; }
.files-bar span { color: #cfd6de; margin-right: auto; font-weight: 600; }
.files-bar button { background: rgba(0,234,255,.14); border: 1px solid rgba(0,234,255,.35); color: #7ff3ff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }

body.st-open { overflow: hidden; }

/* ================= CODE STUDIO (full screen, same look as the app) ================= */
.st-overlay {
    position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 100001; display: none;
    background:
        radial-gradient(circle at 12% 8%, rgba(0, 217, 255, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 92% 18%, rgba(192, 38, 211, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 50% 100%, rgba(112, 76, 255, 0.16) 0%, transparent 55%),
        linear-gradient(180deg, #020409 0%, #050814 100%);
}
.st-overlay.open { animation: stFade .22s ease; }
@keyframes stFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.st-wrap { position: relative; display: flex; flex-direction: column; height: 100%; max-width: 1000px; margin: 0 auto; color: #e8f6fb; padding-top: env(safe-area-inset-top, 0px); overflow: hidden; }

.st-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 10px; }
.st-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-bolt { display: grid; place-items: center; color: #00eaff; font-size: 20px; filter: drop-shadow(0 0 8px rgba(0, 234, 255, .8)); }
.st-brand b { font-family: 'Orbitron', Arial, sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .14em; background: linear-gradient(90deg, #ffffff, #7ff3ff 55%, #b48cff); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.st-top-r { display: flex; align-items: center; gap: 8px; }
.st-run, .st-rerun {
    position: relative; display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer;
    padding: 9px 18px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 800; letter-spacing: .03em; color: #021016;
    background: linear-gradient(135deg, #00eaff 0%, #5b8cff 55%, #a45bff 100%);
    box-shadow: 0 0 18px rgba(0, 234, 255, .45), 0 6px 20px rgba(112, 76, 255, .35);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.st-run i { width: 0; height: 0; border-left: 10px solid #021016; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.st-run:active, .st-rerun:active { transform: scale(.94); }
.st-run:hover, .st-rerun:hover { filter: brightness(1.08); box-shadow: 0 0 26px rgba(0, 234, 255, .6), 0 8px 24px rgba(112, 76, 255, .45); }
.st-rerun.running { background: linear-gradient(135deg, #ff5d73, #ff2e63); color: #fff; box-shadow: 0 0 18px rgba(255, 70, 100, .5); animation: stPulse 1.2s ease-in-out infinite; }
@keyframes stPulse { 50% { box-shadow: 0 0 30px rgba(255, 70, 100, .8); } }
.st-ico { width: 38px; height: 38px; border-radius: 12px; cursor: pointer; font-size: 16px; color: #cfeaf2; background: rgba(8, 16, 28, .75); border: 1px solid rgba(0, 234, 255, .25); backdrop-filter: blur(10px); transition: all .2s ease; }
.st-ico:hover { border-color: rgba(0, 234, 255, .6); box-shadow: 0 0 14px rgba(0, 234, 255, .25); color: #fff; }

.st-menu { position: absolute; right: 14px; top: 56px; z-index: 6; min-width: 210px; padding: 6px; border-radius: 16px; background: rgba(8, 14, 26, .96); border: 1px solid rgba(0, 234, 255, .3); box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(0, 234, 255, .12); backdrop-filter: blur(14px); opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: all .16s ease; }
.st-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.st-menu button { display: block; width: 100%; text-align: left; padding: 11px 12px; background: none; border: none; border-radius: 10px; color: #d7eef5; font: inherit; font-size: 14px; cursor: pointer; }
.st-menu button:hover { background: rgba(0, 234, 255, .12); }
.st-menu button.danger { color: #ff8a98; }

.st-tabs { display: flex; gap: 8px; padding: 2px 14px 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { flex: 0 0 auto; padding: 8px 15px; border-radius: 14px; cursor: pointer; font: inherit; font-size: 13.5px; color: #9fb6c0; white-space: nowrap; background: rgba(8, 16, 28, .75); border: 1px solid rgba(255, 255, 255, .09); backdrop-filter: blur(10px); transition: all .18s ease; }
.st-tab:hover { color: #fff; border-color: rgba(0, 234, 255, .35); }
.st-tab.on { color: #aef6ff; border-color: rgba(0, 234, 255, .75); background: linear-gradient(135deg, rgba(0, 234, 255, .16), rgba(112, 76, 255, .18)); box-shadow: 0 0 16px rgba(0, 234, 255, .25); }
.st-tab.add { color: #00eaff; font-weight: 700; }

.st-filebar { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; font-size: 12.5px; color: #7f97a3; }
.st-fn { color: #cfeaf2; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-lang { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: #b48cff; background: rgba(112, 76, 255, .15); border: 1px solid rgba(112, 76, 255, .35); }
.st-pos { margin-left: auto; flex: 0 0 auto; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* editor: line numbers + highlighted code, never wraps (like a real compiler) */
.st-editor-wrap { flex: 1 1 0; min-height: 0; display: flex; margin: 0 12px; border-radius: 18px; overflow: hidden; background: rgba(4, 8, 16, .92); border: 1px solid rgba(0, 234, 255, .28); box-shadow: 0 0 0 1px rgba(112, 76, 255, .12), 0 14px 44px rgba(0, 0, 0, .5), inset 0 0 40px rgba(0, 234, 255, .03); }
.st-gutter, .st-hl, .st-ta { font: 13px/21px ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace; letter-spacing: 0; tab-size: 2; -moz-tab-size: 2; }
.st-gutter { flex: 0 0 auto; width: 46px; padding: 12px 10px 60px 4px; text-align: right; color: #3f5f6d; background: rgba(0, 234, 255, .035); border-right: 1px solid rgba(0, 234, 255, .1); overflow: hidden; white-space: pre; user-select: none; -webkit-user-select: none; }
.st-codearea { position: relative; flex: 1 1 auto; min-width: 0; }
.st-hl, .st-ta { position: absolute; inset: 0; margin: 0; padding: 12px 14px 60px 12px; border: 0; white-space: pre; word-wrap: normal; overflow-wrap: normal; }
.st-hl { overflow: hidden; color: #d7e6ee; pointer-events: none; background: transparent; }
.st-ta { overflow: auto; resize: none; outline: none; background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: #00eaff; -webkit-overflow-scrolling: touch; }
.st-ta::selection { background: rgba(0, 234, 255, .3); }
.st-editor-wrap:focus-within { border-color: rgba(0, 234, 255, .6); box-shadow: 0 0 0 1px rgba(0, 234, 255, .2), 0 0 26px rgba(0, 234, 255, .18), 0 14px 44px rgba(0, 0, 0, .5); }

.st-keys { display: flex; gap: 6px; padding: 8px 12px 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.st-keys::-webkit-scrollbar { display: none; }
.st-key { flex: 0 0 auto; min-width: 40px; height: 36px; padding: 0 10px; border-radius: 11px; cursor: pointer; font: 600 14px ui-monospace, Menlo, Consolas, monospace; color: #bfe9f3; background: rgba(8, 16, 28, .85); border: 1px solid rgba(0, 234, 255, .2); transition: all .12s ease; }
.st-key:active { transform: scale(.92); background: rgba(0, 234, 255, .22); color: #fff; }

.st-ai { display: flex; gap: 8px; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgba(255,255,255,.06); }
.st-ai::-webkit-scrollbar { display: none; }
.st-ai button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; color: #bfe9f3; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); transition: background .15s, border-color .15s; }
.st-ai button:hover { background: rgba(0,234,255,.08); border-color: rgba(0,234,255,.4); }
.st-ai button:active { transform: scale(.97); }
.st-ai button.st-agent-btn { color: #021016; background: #00eaff; border-color: #00eaff; font-weight: 700; }
.st-ai button.st-agent-btn:hover { background: #4df3ff; }
.lico { flex: 0 0 auto; display: block; }

/* separate output section: slides up over the editor */
.st-sheet { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); transform: translateY(104%); visibility: hidden; transition: transform .3s cubic-bezier(.22, .9, .3, 1), visibility 0s linear .3s;
    background: radial-gradient(circle at 15% 5%, rgba(0, 217, 255, .14), transparent 40%), radial-gradient(circle at 90% 15%, rgba(192, 38, 211, .13), transparent 45%), linear-gradient(180deg, #030610, #050814); }
.st-sheet.open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.22, .9, .3, 1), visibility 0s; }
.st-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.st-sheet-t { font-family: 'Orbitron', Arial, sans-serif; font-size: 14px; letter-spacing: .16em; color: #aef6ff; }
.st-back { padding: 9px 15px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700; color: #cfeaf2; background: rgba(8, 16, 28, .8); border: 1px solid rgba(0, 234, 255, .3); }
.st-stdin { padding: 0 14px 8px; }
.st-stdin label { display: block; font-size: 12px; color: #7f97a3; margin-bottom: 5px; }
.st-stdin textarea { width: 100%; background: rgba(4, 8, 16, .9); color: #dfeff5; border: 1px solid rgba(0, 234, 255, .25); border-radius: 12px; padding: 9px 11px; font: 13px ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.st-stdin textarea:focus { outline: none; border-color: rgba(0, 234, 255, .6); }
.st-out { flex: 1 1 0; min-height: 0; margin: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 18px; overflow: auto; background: rgba(3, 6, 12, .94); border: 1px solid rgba(0, 234, 255, .22); box-shadow: 0 14px 44px rgba(0, 0, 0, .5); }
.st-out .code-output { border-top: none; min-height: 100%; display: flex; flex-direction: column; background: transparent; }
.st-out .co-head { position: sticky; top: 0; z-index: 2; background: rgba(5, 10, 20, .96); border-bottom: 1px solid rgba(0, 234, 255, .15); }
.st-out .co-close { display: none; }
.st-out .co-body { flex: 1 1 auto; max-height: none !important; padding: 12px; }
.st-out .co-body pre { font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace; }
.st-out .co-frame { display: block; width: 100%; height: 100% !important; min-height: 60vh; border: 0; border-radius: 10px; background: #fff; }

.st-dialog { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); animation: stFade .16s ease; }
.st-dlg-box { width: 100%; max-width: 360px; padding: 18px; border-radius: 20px; background: rgba(8, 14, 26, .98); border: 1px solid rgba(0, 234, 255, .35); box-shadow: 0 0 30px rgba(0, 234, 255, .18), 0 20px 50px rgba(0, 0, 0, .6); }
.st-dlg-t { font-weight: 700; margin-bottom: 12px; color: #e8f6fb; }
.st-dlg-in { width: 100%; padding: 11px 12px; border-radius: 12px; font: inherit; font-size: 15px; color: #fff; background: rgba(255, 255, 255, .05); border: 1px solid rgba(0, 234, 255, .3); }
.st-dlg-in:focus { outline: none; border-color: rgba(0, 234, 255, .7); }
.st-dlg-b { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.st-dlg-no, .st-dlg-ok { padding: 9px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #cfeaf2; }
.st-dlg-ok { border: none; color: #021016; background: linear-gradient(135deg, #00eaff, #704cff); box-shadow: 0 0 14px rgba(0, 234, 255, .35); }
@media (prefers-reduced-motion: reduce) { .st-overlay.open, .st-dialog { animation: none; } .st-sheet { transition: none; } .st-rerun.running { animation: none; } }

/* rows around the editor never shrink; only the editor takes the leftover space */
.st-top, .st-tabs, .st-filebar, .st-keys, .st-ai, .st-sheet-top, .st-stdin { flex: 0 0 auto; }
.st-tab, .st-key, .st-ai button { flex-shrink: 0; }
.st-gutter { align-self: stretch; height: auto; }
.st-menu button { padding: 12px 14px; font-weight: 600; letter-spacing: .01em; }

/* ===== FULL-SCREEN CHAT (ChatGPT style) =====
   The message list uses the whole screen; the header and the composer float over it. */
.chat-container { position: relative; overflow: hidden; }
.messages {
    position: absolute; inset: 0; z-index: 1;
    padding-top: calc(var(--lepsa-hdr, 74px) + 8px);
    padding-bottom: calc(var(--lepsa-inp, 96px) + 24px);
    padding-left: 14px; padding-right: 14px;
}
.header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 12;
    background: linear-gradient(180deg, rgba(3,7,15,.99) 0%, rgba(3,7,15,.97) 66%, rgba(3,7,15,0) 100%);
    border-bottom: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    pointer-events: none;
}
.header > * { pointer-events: auto; }
.input-area {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; width: auto;
    background: linear-gradient(180deg, rgba(2,4,9,0) 0%, rgba(2,4,9,.9) 38%, rgba(2,4,9,.97) 100%);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    pointer-events: none;
}
.input-area > * { pointer-events: auto; }
@media (max-width: 600px) {
    .messages { padding-left: 12px; padding-right: 12px; }
    .message.bot { padding-left: 0; padding-right: 0; }
}

/* Studio output hint */
.co-stdin-hint { padding: 14px; color: #c5d0da; line-height: 1.6; font-size: 14px; }
.co-stdin-hint code { background: rgba(255,255,255,.1); padding: 1px 6px; border-radius: 6px; }
.st-sheet-top .st-sheet-close { flex: 0 0 auto; }
.st-sheet-t { flex: 1; text-align: center; }

/* ===== PROJECTS (step 5) ===== */
.pj-chip { margin-left: 8px; padding: 2px 10px; border-radius: 12px; border: 1px solid rgba(0,234,255,.35); background: rgba(0,234,255,.08); color: #7ff3ff; font-size: 12px; cursor: pointer; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-back { background: none; border: none; color: #e6faff; font-size: 22px; cursor: pointer; padding: 0 6px; }
.pj-title { flex: 1; font-size: 18px; font-weight: 600; color: #e6faff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-body { flex: 1; overflow-y: auto; padding: 16px 20px 40px; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.pj-note { color: #8fa3b3; font-size: 14px; padding: 12px 0; line-height: 1.5; }
.pj-card { padding: 14px 16px; margin-bottom: 10px; border-radius: 12px; border: 1px solid rgba(0,234,255,.15); background: rgba(255,255,255,.03); cursor: pointer; }
.pj-card:hover { border-color: rgba(0,234,255,.4); }
.pj-card-name { font-size: 15px; color: #e6faff; font-weight: 600; }
.pj-card-meta { font-size: 12px; color: #8fa3b3; margin-top: 4px; }
.pj-label { display: block; margin: 16px 0 6px; font-size: 13px; color: #8fa3b3; }
.pj-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(0,234,255,.2); background: rgba(255,255,255,.04); color: #e6faff; font-size: 14px; font-family: inherit; }
.pj-area { min-height: 140px; resize: vertical; }
.pj-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.pj-chipbtn { padding: 4px 12px; border-radius: 14px; border: 1px solid rgba(0,234,255,.25); background: transparent; color: #7ff3ff; font-size: 12px; cursor: pointer; }
.pj-btn { padding: 10px 16px; border-radius: 10px; border: 1px solid rgba(0,234,255,.3); background: rgba(255,255,255,.04); color: #e6faff; font-size: 14px; cursor: pointer; }
.pj-primary { background: linear-gradient(135deg, #00eaff, #3a7bff); color: #03060c; border: none; font-weight: 600; }
.pj-danger { border-color: rgba(255,80,80,.5); color: #ff8a8a; }
.pj-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pj-file { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; margin-bottom: 6px; border-radius: 8px; background: rgba(255,255,255,.04); color: #e6faff; font-size: 13px; word-break: break-all; }
.pj-file small { color: #8fa3b3; margin-left: 6px; }
.pj-x { background: none; border: none; color: #ff8a8a; font-size: 16px; cursor: pointer; }
.conv-proj-tag { font-size: 10px; color: #7ff3ff; background: rgba(0,234,255,.1); border-radius: 8px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; }

/* ===== SIDEBAR FIT FIX: chats list always visible, Tools compact, profile pinned at the bottom ===== */
.sidebar { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
.sidebar > * { flex-shrink: 0; }
.sidebar .conversation-list { flex: 1 1 auto; min-height: 150px; max-height: none; }
.sidebar .conversation-list.searching { max-height: none; }
.sidebar .profile { flex-shrink: 0; margin-top: 10px; }
.sidebar .core-mode-card { padding: 10px 12px; margin-bottom: 8px; }
.sidebar .mode-chip { height: 38px; font-size: 12px; }
.sidebar .brand { padding-bottom: 12px; margin-bottom: 10px; }
.sidebar .menu-title { margin-top: 10px; margin-bottom: 6px; }

.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.tools-grid .menu-item { margin: 0; padding: 8px 8px; gap: 8px; min-width: 0; }
.tools-grid .menu-item:hover { transform: none; }
.tools-grid .menu-icon-box { width: 28px; height: 28px; border-radius: 8px; }
.tools-grid .menu-icon-box svg { width: 15px; height: 15px; }
.tools-grid .menu-text-box { min-width: 0; }
.tools-grid .menu-text-box strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools-grid .menu-text-box small { display: none; }

/* =====================================================
   WORKSPACES: Dev / Business / Study — each core has its own colours, home screen, tools and chats
   (the page sets  <html data-mode="code|business|study">)
===================================================== */
html[data-mode="code"]     { --m1: #00eaff; --m2: #3a7bff; --m1-rgb: 0, 234, 255;  --m2-rgb: 58, 123, 255; --m-dark: #031014; }
html[data-mode="business"] { --m1: #ffb547; --m2: #ff6b3d; --m1-rgb: 255, 181, 71; --m2-rgb: 255, 107, 61; --m-dark: #140b02; }
html[data-mode="study"]    { --m1: #b79cff; --m2: #34d399; --m1-rgb: 183, 156, 255; --m2-rgb: 52, 211, 153; --m-dark: #0b0716; }
html:not([data-mode]) { --m1: #00eaff; --m2: #3a7bff; --m1-rgb: 0, 234, 255; --m2-rgb: 58, 123, 255; --m-dark: #031014; }

/* background glow */
html[data-mode="business"], html[data-mode="business"] body {
    background-image: radial-gradient(circle at 15% 12%, rgba(255,181,71,.16) 0%, transparent 42%), radial-gradient(circle at 88% 28%, rgba(255,107,61,.13) 0%, transparent 45%), linear-gradient(180deg, #0a0703 0%, #120a06 100%);
}
html[data-mode="study"], html[data-mode="study"] body {
    background-image: radial-gradient(circle at 12% 12%, rgba(183,156,255,.17) 0%, transparent 42%), radial-gradient(circle at 88% 30%, rgba(52,211,153,.12) 0%, transparent 46%), linear-gradient(180deg, #07050f 0%, #0b0818 100%);
}
html[data-mode="code"], html[data-mode="code"] body {
    background-image: radial-gradient(circle at 12% 12%, rgba(0,234,255,.14) 0%, transparent 42%), radial-gradient(circle at 88% 28%, rgba(58,123,255,.12) 0%, transparent 45%), linear-gradient(180deg, #03070b 0%, #050a12 100%);
}
body::before { background: radial-gradient(circle, rgba(var(--m1-rgb), 0.20), transparent 70%); }
body::after  { background: radial-gradient(circle, rgba(var(--m2-rgb), 0.18), transparent 70%); }

/* sidebar */
.sidebar { border-right-color: rgba(var(--m1-rgb), .22); }
.sidebar-edge-glow { background: linear-gradient(180deg, transparent 0%, var(--m1) 35%, var(--m2) 70%, transparent 100%); box-shadow: 0 0 12px var(--m1), 0 0 24px rgba(var(--m2-rgb), .6); }
.brand-badge, .profile-status { color: var(--m1); }
.brand-ai, .text-ai { background: linear-gradient(135deg, var(--m1) 0%, var(--m2) 100%); -webkit-background-clip: text; background-clip: text; }

/* workspace switcher = 3 tiles */
.core-mode-card { border-color: rgba(var(--m1-rgb), .3); background: linear-gradient(135deg, rgba(var(--m1-rgb), .08), rgba(var(--m2-rgb), .08)); }
.mode-pulse-dot { background: var(--m1); box-shadow: 0 0 8px var(--m1); }
.mode-active-pill { color: var(--m1); background: rgba(var(--m1-rgb), .15); border-color: rgba(var(--m1-rgb), .35); }
.sidebar .mode-switch-group { flex-direction: row; gap: 6px; }
.sidebar .mode-chip { flex: 1 1 0; min-width: 0; height: 58px; flex-direction: column; justify-content: center; gap: 4px; padding: 0 4px; font-size: 11.5px; text-align: center; }
.sidebar .mode-chip .chip-label { font-size: 11.5px; font-weight: 700; letter-spacing: .3px; }
.sidebar .mode-chip::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 3px; background: linear-gradient(90deg, var(--m1), var(--m2)); transform: scaleX(0); }
.sidebar .mode-chip.active::before { transform: scaleX(1); }
.mode-chip.active { background: linear-gradient(160deg, rgba(var(--m1-rgb), .18), rgba(var(--m2-rgb), .10)); border-color: rgba(var(--m1-rgb), .45); }
.mode-chip.active .chip-icon, .mode-chip:hover .chip-icon { color: var(--m1); }
.mode-chip:hover { border-color: rgba(var(--m1-rgb), .28); background: rgba(var(--m1-rgb), .06); }

/* tools only of the open workspace */
.tools-grid .tool-code, .tools-grid .tool-study, .tools-grid .tool-business { display: none; }
html[data-mode="code"] .tools-grid .tool-code,
html[data-mode="study"] .tools-grid .tool-study,
html[data-mode="business"] .tools-grid .tool-business { display: flex; }
html:not([data-mode]) .tools-grid .tool-code { display: flex; }

/* chats list + menu */
.conversation-item:hover, .menu-item:hover { background: rgba(var(--m1-rgb), .07); border-color: rgba(var(--m1-rgb), .25); }
.conversation-item.active { background: linear-gradient(90deg, rgba(var(--m1-rgb), .14), rgba(var(--m2-rgb), .05)); border-color: rgba(var(--m1-rgb), .38); }
.conv-proj-tag { color: var(--m1); background: rgba(var(--m1-rgb), .1); }

/* header */
.header { border-bottom-color: rgba(var(--m1-rgb), .22); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 2px 15px rgba(var(--m1-rgb), .08); }
.title { background: linear-gradient(90deg, #ffffff 0%, var(--m1) 55%, var(--m2) 100%); -webkit-background-clip: text; background-clip: text; }
.mode-badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--m-dark); background: linear-gradient(135deg, var(--m1), var(--m2)); -webkit-text-fill-color: var(--m-dark); }
.lepsa-quick-new, .lepsa-menu-btn { border-color: rgba(var(--m1-rgb), .4); color: var(--m1); }
.lepsa-dots span { background: var(--m1); }
.pj-chip { border-color: rgba(var(--m1-rgb), .35); background: rgba(var(--m1-rgb), .08); color: var(--m1); }

/* messages */
.message.bot::before { background: linear-gradient(180deg, var(--m1), var(--m2), var(--m1)); box-shadow: 0 0 10px var(--m1), 0 0 20px rgba(var(--m2-rgb), .8); }
.message.bot strong { color: var(--m1); }
.message.bot li::marker { color: var(--m1); }
.message.user { background: linear-gradient(135deg, rgba(var(--m1-rgb), .85), rgba(var(--m2-rgb), .85)); box-shadow: 0 0 25px rgba(var(--m1-rgb), .25), 0 10px 30px rgba(0,0,0,.4); color: var(--m-dark); }
html[data-mode="study"] .message.user { color: #0b0716; }
.thinking-indicator span { background: linear-gradient(135deg, var(--m1), var(--m2)); }

/* input bar */
.input-pill-wrapper:focus-within { border-color: rgba(var(--m1-rgb), .5); box-shadow: 0 0 20px rgba(var(--m1-rgb), .15); }
.pill-outer-btn { background: linear-gradient(135deg, var(--m1), var(--m2)); box-shadow: 0 4px 15px rgba(var(--m1-rgb), .4); }
.pill-outer-btn:hover { background: linear-gradient(135deg, var(--m1), var(--m2)); filter: brightness(1.1); }
.sug-chip { border-color: rgba(var(--m1-rgb), .28); }
.sug-chip:hover { background: rgba(var(--m1-rgb), .12); border-color: var(--m1); box-shadow: 0 4px 14px rgba(var(--m1-rgb), .2); }

/* home screen of each workspace */
.mode-hero { max-width: 100%; padding: 22px 18px 18px 22px !important; }
.mode-hero .hero-emoji { font-size: 38px; line-height: 1; margin-bottom: 10px; }
.mode-hero .hero-title { font-size: 24px; font-weight: 800; letter-spacing: .3px; color: #fff; margin-bottom: 6px; }
.mode-hero .hero-sub { color: #9db2bd; font-size: 14.5px; margin-bottom: 14px; }
.mode-hero .hero-points { list-style: none !important; padding: 0 !important; margin: 0 !important; gap: 6px !important; }
.mode-hero .hero-points li { padding: 6px 12px; border-radius: 10px; font-size: 13px; color: #d5e4ea; background: rgba(var(--m1-rgb), .07); border: 1px solid rgba(var(--m1-rgb), .16); width: fit-content; max-width: 100%; }
.mode-hero .hero-points li::marker { content: ""; }
html[data-mode="code"] .mode-hero .hero-title, html[data-mode="code"] .sug-chip, html[data-mode="code"] .mode-badge { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
html[data-mode="code"] .mode-hero .hero-title::before { content: "$ "; color: var(--m1); }
html[data-mode="code"] .mode-hero .hero-title::after { content: "▍"; color: var(--m1); animation: blinkCursor .9s infinite; margin-left: 2px; }
html[data-mode="business"] .mode-hero .hero-title { background: linear-gradient(90deg, #fff, var(--m1)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-mode="study"] .mode-hero .hero-title { font-family: Georgia, "Times New Roman", serif; }

/* chat canvas per workspace: code = faint grid, study = dotted notebook, business = soft glow */
html[data-mode="code"] .messages { background-image: linear-gradient(rgba(var(--m1-rgb), .035) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--m1-rgb), .035) 1px, transparent 1px); background-size: 34px 34px; }
html[data-mode="study"] .messages { background-image: radial-gradient(rgba(var(--m1-rgb), .13) 1px, transparent 1.2px); background-size: 22px 22px; }
html[data-mode="business"] .messages { background-image: radial-gradient(ellipse at 50% 0%, rgba(var(--m1-rgb), .08), transparent 60%); }
.tools-grid .menu-item { padding: 8px 6px; gap: 6px; }
.tools-grid .menu-text-box strong { font-size: 11.5px; }

/* ===== CHAT MENU (press and hold a chat) ===== */
.chat-menu { position: fixed; z-index: 10000000; width: 250px; max-height: 70vh; overflow-y: auto; padding: 8px; border-radius: 22px; background: #2b2d31; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 18px 50px rgba(0,0,0,.7); animation: lepsaFadeIn .12s ease; -webkit-user-select: none; user-select: none; }
.chat-menu-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 13px 12px; border: 0; background: transparent; color: #f2f4f6; font-size: 15.5px; text-align: left; border-radius: 14px; cursor: pointer; }
.chat-menu-row:hover, .chat-menu-row:active { background: rgba(255,255,255,.07); }
.chat-menu-row .cm-ico { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; }
.chat-menu-row .cm-ico svg { width: 22px; height: 22px; }
.chat-menu-row .cm-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-menu-row .cm-chev svg { width: 16px; height: 16px; opacity: .7; }
.chat-menu-row.danger { color: #ff6b6b; }
.chat-menu-row.cm-on .cm-label { color: var(--m1, #00eaff); font-weight: 700; }
.chat-menu-row.cm-back { color: #9aa3ab; border-bottom: 1px solid rgba(255,255,255,.07); border-radius: 14px 14px 0 0; margin-bottom: 4px; }
.chat-menu-note { padding: 12px; color: #8b949e; font-size: 13px; line-height: 1.4; }

.conversation-item.menu-open { background: rgba(var(--m1-rgb, 0,234,255), .12); border-color: rgba(var(--m1-rgb, 0,234,255), .4); }
.conversation-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.conv-section { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #55727d; padding: 10px 8px 4px; }
.conv-archive-toggle { cursor: pointer; margin-top: 4px; color: #7d98a4; letter-spacing: .6px; text-transform: none; font-size: 12px; }
.conv-archive-toggle:hover { color: var(--m1, #00eaff); }
.conv-pin-ico { font-size: 11px; flex-shrink: 0; }
.conv-rename-input { flex: 1; min-width: 0; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(var(--m1-rgb, 0,234,255), .5); background: rgba(0,0,0,.35); color: #fff; font-size: 12.5px; outline: none; font-family: inherit; }

/* ===== STUDY HUB ===== */
.st-tabs { display: flex; gap: 6px; padding: 10px 14px 0; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.st-tab { flex: 1; padding: 9px 4px; border-radius: 12px; border: 1px solid rgba(var(--m1-rgb, 183,156,255), .2); background: rgba(255,255,255,.03); color: #9fb1bb; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.st-tab.on { color: var(--m-dark, #0b0716); background: linear-gradient(135deg, var(--m1, #b79cff), var(--m2, #34d399)); border-color: transparent; }
.st-dot { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: #ff5c7a; color: #fff; font-size: 11px; line-height: 18px; }
.st-body { padding-top: 14px; }
.st-card { padding: 14px 16px; margin-bottom: 12px; border-radius: 16px; border: 1px solid rgba(var(--m1-rgb, 183,156,255), .18); background: rgba(255,255,255,.035); }
.st-h { font-size: 14.5px; font-weight: 700; color: #f1f6f8; margin-bottom: 8px; }
.st-mini { font-size: 12px; color: #8ea3ae; line-height: 1.5; }
.st-mini a { color: var(--m1, #b79cff); margin-left: 6px; }
.st-note { font-size: 12.5px; color: #8ea3ae; line-height: 1.5; padding: 4px 2px 10px; }
.st-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(var(--m1-rgb, 183,156,255), .16), rgba(var(--m2-rgb, 52,211,153), .08)); }
.st-exam { font-size: 15px; font-weight: 700; color: #fff; }
.st-count { font-size: 24px; font-weight: 800; color: var(--m1, #b79cff); margin: 2px 0; }
.st-streak { text-align: center; font-size: 26px; line-height: 1; }
.st-streak b { display: block; font-size: 24px; color: #ffb547; margin-top: 2px; }
.st-streak span { font-size: 10.5px; color: #8ea3ae; }
.st-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-center { text-align: center; }
.st-big { font-size: 30px; font-weight: 800; color: #fff; }
.st-ring { position: relative; display: flex; align-items: center; justify-content: center; }
.st-ring-bg { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 7; }
.st-ring-fg { fill: none; stroke: var(--m2, #34d399); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.st-ring-txt { position: absolute; text-align: center; }
.st-ring-txt b { display: block; font-size: 20px; color: #fff; }
.st-ring-txt span { font-size: 10.5px; color: #8ea3ae; }
.st-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0; }
.st-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--m1, #b79cff), var(--m2, #34d399)); border-radius: 6px; }
.st-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); }
.st-step:first-of-type { border-top: 0; }
.st-step > span { width: 24px; height: 24px; border-radius: 50%; background: rgba(var(--m1-rgb, 183,156,255), .2); color: var(--m1, #b79cff); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.st-step > div { flex: 1; min-width: 0; }
.st-step b { display: block; font-size: 13.5px; color: #eaf3f6; }
.st-step small { color: #8ea3ae; font-size: 11.5px; }
.st-step .pj-btn { padding: 7px 14px; font-size: 13px; }
.st-step .pj-btn:disabled, .pj-btn:disabled { opacity: .45; }
.st-week { display: flex; gap: 8px; align-items: flex-end; height: 90px; }
.st-wcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.st-wbar { flex: 1; width: 100%; display: flex; align-items: flex-end; background: rgba(255,255,255,.04); border-radius: 6px; overflow: hidden; }
.st-wbar i { display: block; width: 100%; min-height: 2px; background: rgba(var(--m1-rgb, 183,156,255), .55); }
.st-wbar i.today { background: var(--m2, #34d399); }
.st-wcol span { font-size: 10.5px; color: #8ea3ae; }
.st-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.st-subj { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 14.5px; color: #fff; padding-bottom: 6px; }
.st-subj span { color: var(--m1, #b79cff); font-size: 13px; font-weight: 700; }
.st-topic { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.05); }
.st-chk { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); background: transparent; color: #8ea3ae; font-size: 15px; cursor: pointer; flex-shrink: 0; }
.st-chk.s1 { border-color: #ffb547; color: #ffb547; }
.st-chk.s2 { border-color: var(--m2, #34d399); background: rgba(var(--m2-rgb, 52,211,153), .18); color: var(--m2, #34d399); }
.st-tname { flex: 1; min-width: 0; font-size: 13.5px; color: #dbe7ec; }
.st-tname em { font-style: normal; font-size: 11px; margin-left: 4px; }
.st-tname em.bad { color: #ff7b8a; } .st-tname em.ok { color: var(--m2, #34d399); }
.st-mini-btn { padding: 5px 9px; border-radius: 9px; border: 1px solid rgba(var(--m1-rgb, 183,156,255), .3); background: transparent; color: var(--m1, #b79cff); font-size: 11.5px; cursor: pointer; }
.st-x { background: none; border: none; color: #7d8d96; font-size: 15px; cursor: pointer; padding: 4px 6px; }
.st-add { display: flex; gap: 8px; margin-top: 8px; }
.st-add .pj-input { flex: 1; }
.st-cardrow { display: flex; gap: 8px; justify-content: space-between; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }
.st-cardrow b { display: block; font-size: 13.5px; color: #eaf3f6; } .st-cardrow small { display: block; font-size: 12.5px; color: #9fb1bb; margin-top: 3px; } .st-cardrow em { display: block; font-style: normal; font-size: 11px; color: #6f828d; margin-top: 3px; }
.st-flash { min-height: 190px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.st-fq { font-size: 19px; font-weight: 700; color: #fff; line-height: 1.4; }
.st-fa { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255,255,255,.15); font-size: 16px; color: var(--m2, #34d399); line-height: 1.45; }
.st-fa small { display: block; margin-top: 8px; font-size: 12.5px; color: #9fb1bb; }
.st-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; }
.st-g { padding: 10px 2px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #fff; cursor: pointer; }
.st-g b { display: block; font-size: 13.5px; } .st-g small { font-size: 10.5px; color: #8ea3ae; }
.st-g.g0 { border-color: rgba(255,92,122,.5); } .st-g.g3 { border-color: rgba(255,181,71,.5); } .st-g.g4 { border-color: rgba(52,211,153,.5); } .st-g.g5 { border-color: rgba(var(--m1-rgb, 183,156,255), .6); }
.st-clock { font-size: 64px; font-weight: 800; letter-spacing: 2px; color: #fff; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.st-lens { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.st-chipbtn { padding: 5px 14px; border-radius: 14px; border: 1px solid rgba(var(--m1-rgb, 183,156,255), .3); background: transparent; color: #9fb1bb; font-size: 12.5px; cursor: pointer; }
.st-chipbtn.on { color: var(--m-dark, #0b0716); background: var(--m1, #b79cff); border-color: transparent; }
select.pj-input { appearance: auto; }

/* flashcards written by the AI */
.fc-block { margin: 12px 0; padding: 12px; border-radius: 16px; border: 1px solid rgba(var(--m1-rgb, 183,156,255), .25); background: rgba(var(--m1-rgb, 183,156,255), .05); }
.fc-head { font-weight: 700; margin-bottom: 8px; color: #fff; }
.fc-item { margin: 6px 0; border-radius: 10px; background: rgba(255,255,255,.04); padding: 8px 10px; }
.fc-item summary { cursor: pointer; font-size: 14px; color: #eaf3f6; }
.fc-item div { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.12); color: var(--m2, #34d399); font-size: 13.5px; }
.fc-save { width: 100%; margin-top: 8px; padding: 10px; border-radius: 12px; border: 0; background: linear-gradient(135deg, var(--m1, #b79cff), var(--m2, #34d399)); color: var(--m-dark, #0b0716); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.fc-save:disabled { opacity: .7; cursor: default; }

/* plain-maths lines (from converted LaTeX display blocks) */
.message .mathb { display: block; margin: 6px 0; padding: 6px 10px; text-align: center; font-weight: 600; overflow-x: auto; border-radius: 8px; background: rgba(255,255,255,.05); }
.message td br + *, .message li br + * { }

/* Study Hub v2: answer writing + news quiz */
.st-wta { resize: vertical; min-height: 70px; line-height: 1.5; }
.st-wscore { font-weight: 800; font-size: 18px; color: #fff; white-space: nowrap; padding-left: 10px; }
.st-wscore small { font-size: 11px; color: #8ea3ae; font-weight: 600; }
.st-wtop { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.st-wring { width: 68px; height: 68px; flex: 0 0 68px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 4px solid #f59e0b; background: rgba(255,255,255,.04); }
.st-wring b { font-size: 20px; line-height: 1; color: #fff; }
.st-wring span { font-size: 10.5px; color: #9fb1bb; }
.st-wring.good { border-color: #34d399; }
.st-wring.low { border-color: #f87171; }
.st-wsec { margin-top: 12px; }
.st-wsec > b { display: block; font-size: 13.5px; color: #eaf3f6; margin-bottom: 4px; }
.st-wsec ul { margin: 0; padding-left: 18px; }
.st-wsec li, .st-wsec p { font-size: 13px; line-height: 1.55; color: #c9d7de; margin: 2px 0; }
.st-wsec.ok > b { color: #6ee7b7; }
.st-wsec.bad > b { color: #fca5a5; }
.st-tabs .st-tab { font-size: 13px; padding-left: 2px; padding-right: 2px; }

/* KaTeX maths */
.message .mathk { display: block; margin: 8px 0; overflow-x: auto; overflow-y: hidden; text-align: center; -webkit-overflow-scrolling: touch; }
.message .mathk .katex-display { margin: 0; }
.message .mathi .katex, .message .mathk .katex { font-size: 1.1em; }
.message .mathi { display: inline-block; max-width: 100%; vertical-align: middle; overflow-x: auto; overflow-y: hidden; }
.message td .mathi, .message li .mathi { vertical-align: baseline; }
.message .verify-line { margin-top: 10px; padding: 7px 11px; border-left: 3px solid var(--m1, #00eaff); background: rgba(255,255,255,.04); border-radius: 8px; font-size: 12.5px; color: #9fb6c0; }

/* feedback buttons + popup */
.msg-act-icon-btn.fb-up.active { color: #34d399; }
.msg-act-icon-btn.fb-down.active { color: #f87171; }
.fb-pop-back { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.fb-pop { width: 100%; max-width: 460px; box-sizing: border-box; background: #0f1621; border: 1px solid rgba(255,255,255,.1); border-radius: 18px 18px 0 0; padding: 16px 16px 20px; }
@media (min-width: 600px) { .fb-pop-back { align-items: center; } .fb-pop { border-radius: 18px; } }
.fb-title { font-weight: 700; color: #f1f6f8; margin-bottom: 10px; }
.fb-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-reason { padding: 7px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #b8c7d0; font-size: 13px; cursor: pointer; font-family: inherit; }
.fb-reason.on { color: #0b0716; background: linear-gradient(135deg, var(--m1, #00eaff), var(--m2, #34d399)); border-color: transparent; font-weight: 600; }
.fb-note { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e6faff; font: inherit; font-size: 14px; resize: vertical; }
.fb-sub { font-size: 11.5px; color: #8ea3ae; margin-top: 8px; line-height: 1.5; }
.fb-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.fb-row button { padding: 9px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #cfe0e8; font: inherit; cursor: pointer; }
.fb-row .fb-send { border: 0; color: #031018; font-weight: 700; background: linear-gradient(135deg, var(--m1, #00eaff), var(--m2, #34d399)); }
.fb-row button:disabled { opacity: .6; }

/* =====================================================================
   ACCOUNT SCREEN: LEPSA look (glass cards, gradient borders, smooth motion)
   Everything is scoped to #lepsaAccountModal so other sheets are not affected.
   ===================================================================== */
#lepsaAccountModal .settings-scroll-body > * { animation: accRise .55s cubic-bezier(.2,.8,.2,1) both; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(1) { animation-delay: .00s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(2) { animation-delay: .06s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(3) { animation-delay: .10s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(4) { animation-delay: .14s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(5) { animation-delay: .18s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(6) { animation-delay: .22s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(7) { animation-delay: .26s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(8) { animation-delay: .30s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(9) { animation-delay: .34s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(10) { animation-delay: .38s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(11) { animation-delay: .42s; }
#lepsaAccountModal .settings-scroll-body > *:nth-child(n+12) { animation-delay: .46s; }
@keyframes accRise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* section titles: small caps with a fading line */
#lepsaAccountModal .settings-sec-title { display: flex; align-items: center; gap: 10px; margin: 24px 4px 10px; font-family: 'Orbitron', Arial, sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: .22em; color: #6fb7c9; }
#lepsaAccountModal .settings-sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(0,234,255,.35), rgba(112,76,255,.12), transparent); }
#lepsaAccountModal .acc-danger-title { color: #ff8da1; }
#lepsaAccountModal .acc-danger-title::after { background: linear-gradient(90deg, rgba(255,90,110,.45), rgba(255,90,110,.1), transparent); }
#lepsaAccountModal .acc-danger-title span { display: inline-flex; width: 15px; height: 15px; color: #ff6b81; }
#lepsaAccountModal .acc-danger-title svg { width: 100%; height: 100%; }

/* plan card */
.acc-plan-card { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 4px; padding: 16px; border-radius: 24px; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, rgba(0,234,255,.14), rgba(112,76,255,.18) 55%, rgba(192,38,211,.16));
    box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 30px rgba(0,234,255,.1), inset 0 0 30px rgba(255,255,255,.03);
    transition: transform .18s ease, box-shadow .25s ease; }
.acc-plan-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
    background: linear-gradient(120deg, #00eaff, #704cff, #c026d3, #00eaff); background-size: 300% 300%; animation: accBorder 6s linear infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@keyframes accBorder { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.apc-shine { position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); animation: accShine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes accShine { 0%, 55% { left: -80px; } 100% { left: 120%; } }
.acc-plan-card:active { transform: scale(.975); box-shadow: 0 8px 26px rgba(0,0,0,.5), 0 0 40px rgba(0,234,255,.25); }
.apc-ico { width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; border-radius: 15px; color: #031018;
    background: linear-gradient(135deg, #00eaff, #8b6bff 60%, #e056ff); box-shadow: 0 0 22px rgba(0,234,255,.5); }
.apc-ico svg { width: 22px; height: 22px; fill: rgba(3,16,24,.25); }
.apc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.apc-txt b { font-family: 'Orbitron', Arial, sans-serif; font-size: 14px; letter-spacing: .12em; color: #fff; }
.apc-txt small { font-size: 12.5px; color: #9fc6d3; }
.apc-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #7dffb4; background: rgba(34,224,122,.1); border: 1px solid rgba(34,224,122,.35); }
.apc-live i { width: 8px; height: 8px; border-radius: 50%; background: #22e07a; box-shadow: 0 0 10px #22e07a; animation: accPulse 1.8s ease-in-out infinite; }
@keyframes accPulse { 50% { transform: scale(1.5); opacity: .55; } }

/* grouped cards with a gradient edge */
#lepsaAccountModal .acc-group { position: relative; border: none; border-radius: 24px; overflow: hidden; margin-bottom: 4px;
    background: linear-gradient(160deg, rgba(10,22,38,.86), rgba(5,10,20,.92)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 14px 38px rgba(0,0,0,.42); }
#lepsaAccountModal .acc-group::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
    background: linear-gradient(140deg, rgba(0,234,255,.5), rgba(112,76,255,.16) 45%, rgba(192,38,211,.42));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
#lepsaAccountModal .acc-row { position: relative; gap: 14px; padding: 14px 16px; border-bottom: none; transition: background .2s ease, transform .15s ease; }
#lepsaAccountModal .acc-row + .acc-row::before { content: ""; position: absolute; left: 70px; right: 16px; top: 0; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.09), rgba(255,255,255,0)); }
#lepsaAccountModal .acc-row:active { background: radial-gradient(circle at 30% 50%, rgba(0,234,255,.16), rgba(0,234,255,.03) 70%); transform: scale(.985); }
#lepsaAccountModal .acc-ico { width: 42px; height: 42px; border-radius: 14px; position: relative; font-size: 0;
    border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .25s ease; }
#lepsaAccountModal .acc-ico svg { width: 20px; height: 20px; }
#lepsaAccountModal .acc-row:active .acc-ico { transform: scale(.9) rotate(-4deg); }
#lepsaAccountModal .ic-cyan   { color: #5df2ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(0,234,255,.22); }
#lepsaAccountModal .ic-pink   { color: #ff7ad1; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(255,80,190,.2); }
#lepsaAccountModal .ic-violet { color: #b9a4ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(140,110,255,.24); }
#lepsaAccountModal .ic-green  { color: #5dffa6; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(40,230,130,.2); }
#lepsaAccountModal .ic-amber  { color: #ffc766; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(255,180,60,.2); }
#lepsaAccountModal .ic-blue   { color: #7db4ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(70,140,255,.22); }
#lepsaAccountModal .ic-red    { color: #ff7b8e; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(255,90,110,.28); }
#lepsaAccountModal .acc-txt strong { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
#lepsaAccountModal .acc-val { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #7ff3ff; background: rgba(0,234,255,.08); border: 1px solid rgba(0,234,255,.2); max-width: 96px; }
#lepsaAccountModal .acc-chev { color: #5b7d90; font-size: 22px; transition: transform .2s ease, color .2s ease; }
#lepsaAccountModal .acc-row:active .acc-chev { transform: translateX(4px); color: #00eaff; }

/* danger zone */
#lepsaAccountModal .acc-danger { background: linear-gradient(160deg, rgba(40,10,18,.7), rgba(12,6,12,.92)); box-shadow: 0 14px 38px rgba(0,0,0,.42), 0 0 28px rgba(255,70,100,.08); animation: accRise .55s cubic-bezier(.2,.8,.2,1) both, accDanger 3.2s ease-in-out 1s infinite; }
#lepsaAccountModal .acc-danger::before { background: linear-gradient(140deg, rgba(255,90,110,.65), rgba(255,90,110,.12) 50%, rgba(192,38,211,.4)); }
#lepsaAccountModal .acc-danger .acc-txt strong { color: #ff8da1; }
#lepsaAccountModal .acc-danger .acc-txt small { color: #b07884; }
#lepsaAccountModal .acc-danger .acc-row:active { background: radial-gradient(circle at 30% 50%, rgba(255,90,110,.2), rgba(255,90,110,.03) 70%); }
@keyframes accDanger { 50% { box-shadow: 0 14px 38px rgba(0,0,0,.42), 0 0 38px rgba(255,70,100,.2); } }

/* log out */
#lepsaAccountModal .acc-logout { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 26px; padding: 15px; border: none; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .06em; color: #ffd7de; -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, rgba(255,70,100,.16), rgba(192,38,211,.16)); box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 24px rgba(255,70,100,.1);
    transition: transform .15s ease, box-shadow .25s ease, color .2s ease; }
#lepsaAccountModal .acc-logout::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(120deg, rgba(255,110,130,.8), rgba(192,38,211,.5), rgba(255,110,130,.8));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
#lepsaAccountModal .acc-logout-ico { display: inline-flex; width: 20px; height: 20px; transition: transform .25s ease; }
#lepsaAccountModal .acc-logout-ico svg { width: 100%; height: 100%; }
#lepsaAccountModal .acc-logout:active { transform: scale(.96); box-shadow: 0 6px 20px rgba(0,0,0,.5), 0 0 34px rgba(255,70,100,.35); color: #fff; }
#lepsaAccountModal .acc-logout:active .acc-logout-ico { transform: translateX(5px); }
#lepsaAccountModal .acc-version { font-family: 'Orbitron', Arial, sans-serif; font-size: 10px; letter-spacing: .24em; color: #3b566a; margin-top: 18px; }

/* =====================================================================
   DELETE ACCOUNT dialog (opens above the Account screen, smooth spring-in)
   ===================================================================== */
.dz-back { position: fixed; inset: 0; z-index: 6000000; display: flex; align-items: flex-end; justify-content: center; padding: 0;
    background: radial-gradient(circle at 50% 100%, rgba(255,60,90,.22), rgba(2,4,9,.82) 60%); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    animation: dzFade .25s ease both; }
.dz-back.closing { animation: dzFadeOut .2s ease forwards; }
@keyframes dzFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dzFadeOut { to { opacity: 0; } }
.dz-card { position: relative; width: 100%; max-width: 440px; max-height: 94dvh; overflow-y: auto; box-sizing: border-box; padding: 26px 22px calc(22px + env(safe-area-inset-bottom, 0px)); text-align: center; color: #e8f3f7;
    border-radius: 30px 30px 0 0; background: linear-gradient(180deg, #120a12 0%, #0a0d17 45%, #060912 100%);
    border: 1px solid rgba(255,90,110,.32); border-bottom: none; box-shadow: 0 -20px 70px rgba(255,60,90,.18), 0 -4px 40px rgba(0,0,0,.6);
    animation: dzUp .5s cubic-bezier(.2,1.1,.3,1) both; }
.dz-back.closing .dz-card { animation: dzDown .22s ease forwards; }
@keyframes dzUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes dzDown { to { transform: translateY(100%); } }
@media (min-width: 600px) { .dz-back { align-items: center; } .dz-card { border-radius: 28px; border-bottom: 1px solid rgba(255,90,110,.32); } }
.dz-card.shake { animation: dzShake .42s ease; }
@keyframes dzShake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

.dz-ring { position: relative; width: 78px; height: 78px; margin: 2px auto 14px; display: flex; align-items: center; justify-content: center; }
.dz-ring::before, .dz-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,90,110,.5); animation: dzRing 2.2s ease-out infinite; }
.dz-ring::after { animation-delay: 1.1s; }
@keyframes dzRing { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.55); opacity: 0; } }
.dz-icon { position: relative; width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff;
    background: linear-gradient(135deg, #ff5d73, #c026d3); box-shadow: 0 0 30px rgba(255,70,100,.6); animation: dzPop .6s cubic-bezier(.2,1.4,.4,1) both; }
.dz-icon svg { width: 28px; height: 28px; }
@keyframes dzPop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.dz-title { margin: 0 0 6px; font-family: 'Orbitron', Arial, sans-serif; font-size: 18px; letter-spacing: .06em; color: #ff8da1; }
.dz-sub { margin: 0 auto 14px; max-width: 330px; font-size: 13.5px; line-height: 1.55; color: #b9a9b0; }
.dz-sub b { color: #ffd0d8; }
.dz-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 18px; }
.dz-chips span { padding: 5px 11px; border-radius: 999px; font-size: 11.5px; color: #ffb3c0; background: rgba(255,90,110,.09); border: 1px solid rgba(255,90,110,.25); text-decoration: line-through; text-decoration-color: rgba(255,90,110,.55); }
.dz-lbl { display: block; text-align: left; margin: 12px 4px 6px; font-size: 12px; color: #9fb0b8; }
.dz-lbl b { color: #e8f3f7; word-break: break-all; }
.dz-lbl i { color: #6f828b; font-style: normal; }
.dz-field { position: relative; }
.dz-field input { width: 100%; box-sizing: border-box; padding: 14px 44px 14px 14px; border-radius: 16px; font: inherit; font-size: 15px; color: #fff; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); outline: none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.dz-field input:focus { border-color: rgba(255,120,140,.7); box-shadow: 0 0 0 3px rgba(255,90,110,.14); }
.dz-field.ok input { border-color: rgba(34,224,122,.75); background: rgba(34,224,122,.07); box-shadow: 0 0 0 3px rgba(34,224,122,.12); }
.dz-tick { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 800; color: #04180d; background: #22e07a; transform: scale(0); transition: transform .25s cubic-bezier(.2,1.5,.4,1); }
.dz-field.ok .dz-tick { transform: scale(1); }
.dz-eye { position: absolute; right: 8px; top: 50%; margin-top: -16px; width: 32px; height: 32px; border: none; border-radius: 50%; background: transparent; color: #8aa0aa; font-size: 12px; cursor: pointer; }
.dz-msg { min-height: 18px; margin: 10px 4px 2px; font-size: 12.5px; color: #ff8da1; text-align: left; }
.dz-msg.info { color: #8fd9ff; }
.dz-del { position: relative; width: 100%; margin-top: 10px; padding: 15px; border: none; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: .06em; color: #fff; cursor: pointer; overflow: hidden;
    background: linear-gradient(135deg, #ff4d6d, #c026d3); box-shadow: 0 10px 30px rgba(255,60,100,.35);
    transition: transform .15s ease, opacity .25s ease, filter .25s ease, box-shadow .25s ease; }
.dz-del:disabled { opacity: .35; filter: grayscale(.6); box-shadow: none; cursor: not-allowed; }
.dz-del:not(:disabled):active { transform: scale(.97); }
.dz-del.busy::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.85); transform-origin: left; animation: dzBar 1.6s ease-in-out infinite; }
@keyframes dzBar { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.dz-cancel { width: 100%; margin-top: 10px; padding: 14px; border-radius: 999px; font: inherit; font-size: 14.5px; font-weight: 700; color: #bfeaf2; cursor: pointer; background: rgba(0,234,255,.07); border: 1px solid rgba(0,234,255,.28); transition: transform .15s ease, background .2s ease; }
.dz-cancel:active { transform: scale(.97); background: rgba(0,234,255,.16); }

.dz-done { padding: 26px 6px 12px; }
.dz-done .dz-check { width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #04180d; background: #22e07a; box-shadow: 0 0 40px rgba(34,224,122,.55); animation: dzPop .6s cubic-bezier(.2,1.4,.4,1) both; }
.dz-done .dz-check svg { width: 36px; height: 36px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: dzDraw .5s .3s ease forwards; }
@keyframes dzDraw { to { stroke-dashoffset: 0; } }
.dz-done h3 { margin: 0 0 6px; font-family: 'Orbitron', Arial, sans-serif; font-size: 17px; letter-spacing: .06em; color: #7dffb4; }
.dz-done p { margin: 0; font-size: 13.5px; color: #9fb0b8; }

@media (prefers-reduced-motion: reduce) {
    #lepsaAccountModal .settings-scroll-body > *, .acc-plan-card::before, .apc-shine, .apc-live i, #lepsaAccountModal .acc-danger, .dz-ring::before, .dz-ring::after, .dz-del.busy::after { animation: none !important; }
    .dz-back, .dz-card, .dz-icon { animation-duration: .01s !important; }
}

/* =====================================================
   MOCK TEST v2: exam cards, real sectional timer, bilingual, analysis
===================================================== */
.mk-hero2 { margin: 6px 0 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(0,229,255,.16), rgba(112,76,255,.18)); border: 1px solid rgba(0,229,255,.28); }
.mk-hero2 b { display: block; font-size: 18px; letter-spacing: .2px; }
.mk-hero2 span { display: block; margin-top: 3px; font-size: 13px; color: #b6c2cf; line-height: 1.45; }
.mk-cats { margin-bottom: 10px; }
.mk-cats .mk-chip { padding: 7px 13px; font-size: 13px; }
.mk-exgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mk-ex { position: relative; text-align: left; padding: 11px 12px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); color: inherit; font: inherit; cursor: pointer; transition: transform .15s ease, border-color .2s, background .2s; }
.mk-ex:active { transform: scale(.97); }
.mk-ex b { display: block; font-size: 14px; line-height: 1.3; }
.mk-ex small { display: block; margin-top: 3px; font-size: 11.5px; color: #8e9aa8; }
.mk-ex em { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 99px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #ffd27a; background: rgba(255,193,7,.14); }
.mk-ex.on { border-color: #00e5ff; background: linear-gradient(145deg, rgba(0,229,255,.2), rgba(112,76,255,.16)); box-shadow: 0 0 0 1px rgba(0,229,255,.35), 0 8px 22px rgba(0,229,255,.12); }
.mk-bp { display: flex; gap: 4px; margin: 12px 0 8px; }
.mk-bps { min-width: 0; padding: 8px 5px; border-radius: 10px; text-align: center; overflow: hidden; background: hsla(var(--h), 80%, 55%, .16); border: 1px solid hsla(var(--h), 80%, 62%, .55); }
.mk-bps b { display: block; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-bps small { display: block; margin-top: 2px; font-size: 10.5px; color: #c5ced9; white-space: nowrap; }
.mk-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mk-rule { padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 12px; color: #d5dbe3; }
.mk-rule.warn { background: rgba(255,193,7,.16); color: #ffd27a; }
.mk-sectbl { display: grid; gap: 6px; margin-top: 10px; }
.mk-sectbl div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); }
.mk-sectbl span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #00e5ff; color: #031018; }
.mk-sectbl b { flex: 1; font-size: 13.5px; }
.mk-sectbl small { color: #b6c2cf; font-size: 12px; }
.mk-ins li.mk-warn { padding: 8px 10px; border-radius: 10px; background: rgba(255,193,7,.12); border: 1px solid rgba(255,193,7,.35); list-style-position: inside; }
.mk-ins.hi { margin-top: 4px; color: #aeb9c6; font-size: 13.5px; }

/* in the test */
.mk-langbtn { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid rgba(0,229,255,.4); background: rgba(8,16,28,.8); color: inherit; cursor: pointer; flex-shrink: 0; }
.mk-langbtn span { padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #8e9aa8; transition: background .2s, color .2s; }
.mk-langbtn span.on { background: #00e5ff; color: #031018; }
.mk-cb-time .tot { text-transform: none; letter-spacing: 0; font-size: 10.5px; margin-top: 1px; }
.mk-cb-sec small { display: block; font-size: 10px; font-weight: 500; opacity: .75; }
.mk-cb-sec.done { opacity: .5; cursor: not-allowed; }
.mk-cb-sec.wait { opacity: .5; border-style: dashed; cursor: not-allowed; }
.mk-secbar { height: 3px; background: rgba(255,255,255,.08); }
.mk-secbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #00e5ff, #704cff); transition: width .5s linear; }
.mk-secbar.low i { background: #ff5d6c; }
.mk-pace-row { padding: 8px 14px 0; }
.mk-pace { display: inline-flex; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.07); color: #b6c2cf; }
.mk-pace.up { background: rgba(46,204,113,.16); color: #7dffb0; }
.mk-pace.down { background: rgba(255,93,108,.16); color: #ff9aa8; }
.mk-pace.mid { background: rgba(0,229,255,.12); color: #7ff3ff; }
.mk-sec-banner { position: absolute; left: 50%; top: 16%; z-index: 30; max-width: 90%; padding: 14px 20px; border-radius: 16px; text-align: center; font-weight: 800; color: #031018; background: linear-gradient(135deg, #00e5ff, #9b7bff); box-shadow: 0 14px 40px rgba(0,0,0,.6); pointer-events: none; animation: mkBan 3.6s ease forwards; }
@keyframes mkBan { 0% { opacity: 0; transform: translate(-50%, -14px); } 10% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* result */
.mk-hero { display: flex; align-items: center; gap: 16px; padding: 16px 6px 6px; }
.mk-hero-t { flex: 1; min-width: 0; }
.mk-ring { --p: 0; flex: 0 0 116px; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#00e5ff calc(var(--p) * 1%), rgba(255,255,255,.1) 0); box-shadow: 0 0 30px rgba(0,229,255,.18); }
.mk-ring > div { width: 92px; height: 92px; border-radius: 50%; background: #0a111d; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mk-ring b { font-size: 26px; color: #00e5ff; line-height: 1; }
.mk-ring small { margin-top: 4px; font-size: 12px; color: #b6c2cf; }
.mk-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.mk-tile { padding: 11px 13px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.mk-tile b { display: block; font-size: 21px; }
.mk-tile small { color: #8e9aa8; font-size: 11.5px; }
.mk-tile.g b { color: #5fe48f; } .mk-tile.r b { color: #ff7d8a; }
.mk-insight { margin: 6px 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,229,255,.06); border: 1px solid rgba(0,229,255,.2); font-size: 13.5px; line-height: 1.55; color: #d5dbe3; }
.mk-tl { display: flex; align-items: flex-end; gap: 2px; height: 78px; padding: 8px 8px 0; border-radius: 12px; background: rgba(255,255,255,.04); overflow: hidden; }
.mk-tl i { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: #2ecc71; }
.mk-tl i.bad { background: #ff5d6c; }
.mk-tl i.skip { background: #596477; }
.mk-tl i.gap { margin-left: 7px; }
.mk-tl-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11.5px; color: #8e9aa8; }
.mk-tl-leg .g { color: #5fe48f; } .mk-tl-leg .r { color: #ff7d8a; }
.mk-tab-lang { margin-left: auto; background: rgba(0,229,255,.14); border-color: rgba(0,229,255,.4); }
@media (max-width: 420px) { .mk-ring { flex-basis: 96px; width: 96px; height: 96px; } .mk-ring > div { width: 76px; height: 76px; } .mk-ring b { font-size: 21px; } }

/* ---------- handwritten answer check ---------- */
.st-hand { margin-top: 12px; border-color: rgba(192,38,211,.35); background: linear-gradient(145deg, rgba(192,38,211,.1), rgba(0,229,255,.05)); }
.st-hthumbs { display: flex; gap: 10px; overflow-x: auto; margin: 10px 0 4px; padding-bottom: 4px; }
.st-hth { position: relative; flex: 0 0 auto; width: 96px; }
.st-hth img { display: block; width: 96px; height: 128px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); }
.st-hth button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #ff5d6c; color: #fff; font-size: 12px; cursor: pointer; }
.st-hth span { display: block; text-align: center; margin-top: 4px; font-size: 11px; color: #8ea3ae; }
.st-filebtn { display: inline-flex; align-items: center; cursor: pointer; }
.st-filebtn.off { opacity: .4; pointer-events: none; }
.st-whand { padding: 10px 12px; border-radius: 12px; background: rgba(37,196,216,.08); border: 1px solid rgba(37,196,216,.28); }
.st-wleg { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.st-wleg > span { min-width: 56px; padding: 8px 10px; border-radius: 12px; text-align: center; font-size: 22px; font-weight: 800; background: rgba(255,255,255,.08); }
.st-wleg > span small { font-size: 12px; font-weight: 600; opacity: .7; }
.st-wleg em { font-style: normal; font-size: 13px; color: #d5dbe3; }
.st-wleg.good > span { color: #6ee7b7; } .st-wleg.mid > span { color: #fcd34d; } .st-wleg.low > span { color: #fca5a5; }
.st-wread { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.st-wread summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: #7ff3ff; }
.st-wtrans { margin: 8px 0; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.25); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: #d5dbe3; }
/* ---- Mock test: AI coach, adaptive notes (added with the question bank upgrade) ---- */
.mk-coach { margin: 14px 0; padding: 14px 14px 12px; border-radius: 18px; border: 1px solid transparent;
  background: linear-gradient(#0b1220, #0b1220) padding-box, linear-gradient(135deg, #00e5ff, #704cff, #c026d3) border-box;
  box-shadow: 0 0 28px rgba(112,76,255,.18); }
.mk-co-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: #00e5ff; margin-bottom: 6px; }
.mk-co-head { font-size: 15.5px; font-weight: 700; line-height: 1.45; color: #eef3f8; }
.mk-co-lab { margin: 14px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8e9aa8; }
.mk-co-dx { margin: 6px 0; padding: 9px 11px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 13.5px; line-height: 1.5; }
.mk-co-dx b { display: block; color: #7fe9ff; }
.mk-co-dx span { display: block; color: #d5dbe3; }
.mk-co-dx em { display: block; margin-top: 3px; font-style: normal; color: #5fe48f; }
.mk-co-ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: #d5dbe3; }
.mk-co-txt { font-size: 13.5px; line-height: 1.55; color: #d5dbe3; }
.mk-co-plan { display: grid; gap: 6px; }
.mk-co-plan div { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0,229,255,.06); border: 1px solid rgba(0,229,255,.16); font-size: 13.5px; line-height: 1.45; }
.mk-co-plan b { flex: 0 0 52px; color: #00e5ff; }
.mk-co-plan span { color: #d5dbe3; }
.mk-co-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mk-co-actions .mk-ghost { margin: 0; font-size: 13.5px; }
.mk-co-btn { margin-top: 10px; }
.mk-co-skel { display: grid; gap: 8px; margin: 10px 0 6px; }
.mk-co-skel i { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.16), rgba(255,255,255,.06)); background-size: 200% 100%; animation: mkShimmer 1.3s linear infinite; }
.mk-co-skel i:nth-child(2) { width: 82%; } .mk-co-skel i:nth-child(3) { width: 64%; }
@keyframes mkShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .mk-co-skel i { animation: none; } }
@media (max-width: 420px) { .mk-co-actions { grid-template-columns: 1fr; } }

/* ---- Write coach v2: rubric, trend, line fixes ---- */
.st-rub-row { display: grid; grid-template-columns: 86px 1fr 44px; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; color: #d5dbe3; }
.st-rub-row i { display: block; height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.st-rub-row u { display: block; height: 100%; border-radius: 6px; background: #25c4d8; transition: width .6s cubic-bezier(.16,1,.3,1); }
.st-rub-row i.mid u { background: #f59e0b; } .st-rub-row i.low u { background: #ef6b6b; }
.st-rub-row em { font-style: normal; text-align: right; color: #9fb1bb; font-size: 12px; }
.st-trend { margin: 10px 0 4px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.05); }
.st-trend.up { color: #5fe48f; background: rgba(95,228,143,.09); } .st-trend.down { color: #ff9a9a; background: rgba(239,107,107,.09); } .st-trend.same { color: #9fb1bb; }
.st-lfix { margin: 8px 0; padding: 9px 11px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 13.5px; line-height: 1.5; }
.st-lfix .w { color: #ff9a9a; text-decoration: line-through; text-decoration-color: rgba(255,154,154,.5); }
.st-lfix .b { color: #7fe9c2; margin-top: 3px; }
.st-lfix small { display: block; margin-top: 3px; color: #8e9aa8; }

/* ---- sidebar brand: Saturn + dark-cyan wordmark (same as login) ---- */
.side-planet { display: block; width: 68px; height: 52px; flex: 0 0 68px; margin: -4px -4px -4px -10px; }
.brand { gap: 6px; }
.brand-details .wordmark { display: flex; align-items: center; gap: 8px; font-family: 'Orbitron', Arial, sans-serif; font-weight: 900; font-size: 17px; letter-spacing: .18em; line-height: 1; }
.wm-lepsa { display: inline-block; background: linear-gradient(100deg, transparent 42%, rgba(255,255,255,.85) 50%, transparent 58%) 150% 0/250% 100% no-repeat, linear-gradient(180deg, #f0fdff 0%, #9fe9f3 46%, #25c4d8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; filter: drop-shadow(0 0 10px rgba(37,196,216,.35)); animation: wmsheen 6s ease-in-out infinite; }
.wm-ai { font-size: .6em; letter-spacing: .16em; padding: 4px 6px 3px 8px; border-radius: 7px; color: #8ceaf3; border: 1px solid rgba(37,196,216,.5); background: linear-gradient(180deg, rgba(15,149,173,.26), rgba(15,149,173,.08)); }
.brand-details .brand-badge { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 8px; letter-spacing: .4em; color: #1fa9bd; }
.brand-badge i { flex: none; width: 14px; height: 1px; background: linear-gradient(90deg, transparent, #1fa9bd); }
.brand-badge i:last-child { transform: scaleX(-1); }
@keyframes wmsheen { 0%, 55% { background-position: 150% 0, 0 0; } 100% { background-position: -60% 0, 0 0; } }

/* ---- trust chip under answers ---- */
.msg-action-bar { flex-wrap: wrap; }
.trust-chip { flex: 1 1 100%; order: 9; margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: #8ea3ae; }
.trust-chip.ok { color: #5fd6c2; } .trust-chip.warn { color: #f5b84a; } .trust-chip.info { color: #7fc8ee; } .trust-chip.mute { color: #7f8f99; }

/* ---- Scam Shield ---- */
.sc-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; max-width: 640px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.sc-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-hint { font-size: 13px; opacity: .7; margin: 0; }
.sc-ta, .sc-in { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: inherit; font: inherit; font-size: 15px; }
.sc-ta { resize: vertical; }
.sc-ta:focus, .sc-in:focus { outline: none; border-color: #00e5ff; }
.sc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-go { padding: 13px; border-radius: 12px; border: 0; background: #00e5ff; color: #00222a; font-weight: 700; font-size: 15px; cursor: pointer; }
.sc-go:disabled { opacity: .6; }
.sc-card { border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 14px; background: rgba(255,255,255,.04); font-size: 14px; }
.sc-card ul { margin: 6px 0 10px 18px; padding: 0; }
.sc-card li { margin: 3px 0; }
.sc-card.v-scam { border-color: #ff5d6c; }
.sc-card.v-suspicious { border-color: #ffb454; }
.sc-card.v-safe { border-color: rgba(0,229,255,.5); }
.sc-verdict { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.sc-verdict span { font-size: 13px; opacity: .7; }
.sc-meter { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); margin: 8px 0; overflow: hidden; }
.sc-meter i { display: block; height: 100%; background: #00e5ff; }
.v-suspicious .sc-meter i { background: #ffb454; }
.v-scam .sc-meter i { background: #ff5d6c; }
.sc-type { font-weight: 600; margin-bottom: 4px; }
.sc-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-top: 8px; }
.sc-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sc-err { color: #ff8a95; font-size: 14px; }
.sc-foot { font-size: 12px; opacity: .6; margin: 4px 0 0; }


/* ---- Add-to-chat bottom sheet (Claude-style) + Deep research toggle ---- */
.lepsa-glass-menu { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: 560px; margin: 0 auto; padding: 8px 14px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: #141719; border: 1px solid rgba(255,255,255,.08); border-bottom: 0; gap: 10px; box-shadow: 0 -20px 50px rgba(0,0,0,.6); backdrop-filter: none; -webkit-backdrop-filter: none; z-index: 100001; transform: none; }
.lepsa-glass-menu.show { animation: sheetUp .24s cubic-bezier(.16,1,.3,1); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.lepsa-sheet-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100000; }
.lepsa-sheet-backdrop.show { display: block; }
.sheet-grab { width: 44px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.2); margin: 2px auto 6px; }
.sheet-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; font-size: 17px; color: #f1f7fa; }
.sheet-x { width: 38px; height: 38px; border: 0; background: transparent; color: #f1f7fa; font-size: 18px; cursor: pointer; }
.sheet-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sheet-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 6px 14px; border-radius: 20px; border: 0; background: #1f2326; cursor: pointer; color: inherit; }
.sheet-tile .menu-icon-disc { width: 58px; height: 58px; min-width: 58px; }
.sheet-tile:active, .sheet-row:active { background: #272c30; }
.sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 20px; border: 0; background: #1f2326; cursor: pointer; text-align: left; color: inherit; }
.sheet-row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sheet-row-text b { font-size: 16px; font-weight: 600; color: #f1f7fa; }
.sheet-row-text small { font-size: 13px; color: rgba(241,247,250,.55); }
.sheet-chev { font-size: 26px; color: rgba(241,247,250,.45); }
.sheet-switch { position: relative; width: 46px; height: 27px; border-radius: 27px; background: #3a4046; transition: .2s; flex: none; }
.sheet-switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: .2s; }
.sheet-switch.on { background: #3d8bff; }
.sheet-switch.on i { transform: translateX(19px); }
.sheet-row.on .menu-icon-disc { background: rgba(61,139,255,.2); border-color: #3d8bff; }
.sheet-row.on .attach-svg-icon { color: #6ab0ff; }
.lepsa-deep-chip { position: absolute; left: 16px; bottom: calc(100% - 4px); z-index: 5; align-items: center; gap: 8px; width: fit-content; margin: 0; padding: 7px 8px 7px 13px; border-radius: 999px; background: rgba(61,139,255,.16); border: 1px solid #3d8bff; color: #6ab0ff; font-size: 14px; font-weight: 600; }
.lepsa-deep-chip button { border: 0; background: transparent; color: #6ab0ff; font-size: 14px; cursor: pointer; padding: 0 4px; }
.deep-progress { opacity: .8; font-size: 14px; animation: deepPulse 1.4s ease-in-out infinite; }
@keyframes deepPulse { 50% { opacity: .4; } }


/* ---- Voice mode: Saturn orb (replaces the multicolour bouncing ball) ---- */
.voice-saturn { position: relative; width: 168px; height: 134px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; }
.voice-saturn canvas { position: relative; z-index: 2; width: 100%; height: 100%; }
.vs-ring { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; border: 1.5px solid rgba(0,229,255,.45); opacity: 0; z-index: 1; pointer-events: none; }
.voice-saturn.listening .vs-ring, .voice-saturn.hearing .vs-ring, .voice-saturn.talking .vs-ring, .voice-saturn[data-state="thinking"] .vs-ring { animation: vsRing 2.6s ease-out infinite; }
.voice-saturn .vs-ring.r2 { animation-delay: .85s !important; }
.voice-saturn .vs-ring.r3 { animation-delay: 1.7s !important; }
.voice-saturn.hearing .vs-ring, .voice-saturn.talking .vs-ring { animation-duration: 1.5s; border-color: rgba(0,229,255,.7); }
.voice-saturn[data-state="thinking"] .vs-ring { animation-duration: 1.1s; border-style: dashed; }
@keyframes vsRing { 0% { transform: scale(.7); opacity: .65; } 100% { transform: scale(2.2); opacity: 0; } }
.voice-saturn::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: radial-gradient(circle, rgba(0,229,255,.14), transparent 68%); z-index: 0; animation: vsGlow 3s ease-in-out infinite; }
@keyframes vsGlow { 50% { transform: scale(1.15); opacity: .7; } }


/* ---- Adaptive planner insight ---- */
.pl-insight { margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: rgba(0,229,255,.07); border: 1px solid rgba(0,229,255,.28); font-size: 13.5px; line-height: 1.5; }
.pl-insight b:first-child { display: block; margin-bottom: 4px; color: #00e5ff; }


/* ---- Deep research: no chip above the chat; the + button turns blue instead. Edit button is replaced by hold-menu ---- */
.lepsa-deep-chip { display: none !important; }
.lepsa-dynamic-plus.deep-on { box-shadow: 0 0 0 2px #3d8bff, 0 0 14px rgba(61,139,255,.55); }
.lepsa-dynamic-plus.deep-on .plus-core { color: #6ab0ff; }
.msg-edit-btn { display: none !important; }
#messages .message.user { -webkit-touch-callout: none; }
#messages .message.user:not(.editing) { -webkit-user-select: none; user-select: none; }

/* ---- Agent in chat: calm, flat, no boxes ---- */
.agc-head { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.agc-dot { width: 9px; height: 9px; border-radius: 50%; background: #00e5ff; box-shadow: 0 0 10px #00e5ff; animation: deepPulse 1.2s ease-in-out infinite; flex: none; }
.agc-now { flex: 1; min-width: 0; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agc-stop { border: 0; background: transparent; color: #ff8a95; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.agc-log { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; opacity: .8; }
.agc-line { display: flex; gap: 8px; word-break: break-word; }
.agc-line.bad { color: #ff9aa4; }
.agc-line.ok { color: #7ee8b5; }
.agc-done { margin-bottom: 10px; font-size: 13px; opacity: .85; }
.agc-done summary { cursor: pointer; color: #00e5ff; }
.lepsa-dynamic-plus.deep-on { border-radius: 50%; }


/* ---- Exam readiness card ---- */
.st-ready-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.st-ready-label { font-size: 16px; font-weight: 700; color: #00e5ff; margin-top: 2px; }
.st-ready-score { font-size: 34px; font-weight: 800; line-height: 1; }
.st-ready-score small { font-size: 13px; opacity: .55; font-weight: 600; margin-left: 2px; }
.st-ready-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.06); }
.st-ready-row:first-of-type { margin-top: 8px; }


/* ---- Brain ---- */
.br-ask { display: flex; gap: 8px; }
.br-ask .sc-in { flex: 1; min-width: 0; }
.br-go { padding: 0 20px; }
.br-save { flex: 1; }
.br-item { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid rgba(255,255,255,.07); }
.br-it { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.br-it b { font-size: 14.5px; font-weight: 600; word-break: break-word; }
.br-it small { opacity: .6; font-size: 12px; }
.br-del { border: 0; background: transparent; font-size: 17px; cursor: pointer; opacity: .7; padding: 6px; }


/* ---- Mentor + Classes ---- */
.mn-hello { font-size: 20px; font-weight: 700; }
.mn-count { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(0,229,255,.35); background: rgba(0,229,255,.07); }
.mn-count b { font-size: 38px; color: #00e5ff; line-height: 1; }
.mn-count span { opacity: .8; font-size: 14px; }
.mn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mn-chip { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 13px; }
.mn-chip.warn { background: rgba(255,176,32,.16); color: #ffc34d; }
.mn-list { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14.5px; }
.mn-post { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.mn-post small { opacity: .6; }
.mn-tip { padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(0,229,255,.35); font-size: 13.5px; opacity: .9; }
.mn-actions { margin-top: 4px; }
.mn-hour { flex: 1; min-width: 0; }
.co-card { padding: 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); display: flex; flex-direction: column; gap: 10px; }
.co-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.co-head b { font-size: 16px; display: block; }
.co-head small { opacity: .65; font-size: 12.5px; }
.co-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .15em; padding: 4px 10px; border-radius: 10px; background: rgba(0,229,255,.12); color: #00e5ff; font-weight: 700; }
.co-code.big { align-self: flex-start; font-size: 26px; padding: 8px 16px; }
.co-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.co-stats div { padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.06); text-align: center; display: flex; flex-direction: column; }
.co-stats b { font-size: 19px; color: #00e5ff; }
.co-stats small { font-size: 10.5px; opacity: .65; }
.co-stu { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.07); }
.co-stu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-stu-main small { opacity: .65; font-size: 12px; }
.co-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.co-red { background: #ff5a6a; } .co-amber { background: #ffb020; } .co-green { background: #2ee59d; }


/* ---- mini Saturn (thinking / agent) ---- */
.sat-mini { padding: 0; }
.sat-mini-cv { width: 38px; height: 28px; display: block; }
.sat-agent { width: 30px; height: 24px; flex: none; }


/* ---- full-screen file viewer (LEPSA dark cyan) ---- */
body.fv-open { overflow: hidden; }
.fv { position: fixed; inset: 0; z-index: 10050; display: none; flex-direction: column; background: #050a12; }
.fv.show { display: flex; }
.fv-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid rgba(0,234,255,.18); background: linear-gradient(180deg, rgba(0,234,255,.08), transparent); }
.fv-title { flex: 1; text-align: center; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-x, .fv-more { width: 42px; height: 42px; border-radius: 13px; border: 1px solid rgba(0,234,255,.25); background: rgba(0,234,255,.07); color: #e8fbff; font-size: 20px; cursor: pointer; }
.fv-menu { position: absolute; right: 12px; top: 66px; z-index: 3; min-width: 230px; max-width: calc(100vw - 24px); padding: 8px; border-radius: 18px; background: #0b121c; border: 1px solid rgba(0,234,255,.28); box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.fv-menu[hidden] { display: none; }
.fv-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; background: transparent; color: #e8fbff; font-size: 15.5px; border-radius: 12px; cursor: pointer; text-align: left; }
.fv-menu button:active { background: rgba(0,234,255,.12); }
.fv-menu button span { width: 22px; text-align: center; color: #00eaff; }
.fv-menu button b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-menu button i { color: #00eaff; font-style: normal; }
.fv-menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.08); margin: 6px 4px; }
.fv-body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.fv-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.fv-code { display: flex; min-width: min-content; padding: 14px 0 40px; font: 13.5px/1.65 ui-monospace, Menlo, Consolas, monospace; }
.fv-gutter { padding: 0 12px 0 14px; text-align: right; color: rgba(143,183,194,.45); white-space: pre; user-select: none; position: sticky; left: 0; background: #050a12; }
.fv-code pre { margin: 0; padding: 0 16px 0 4px; background: transparent; overflow: visible; }
.fv-code code { white-space: pre; font: inherit; }


/* ---- Tutor / Practice ---- */
.tu-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tu-top b { font-size: 18px; display: block; } .tu-top small { opacity: .65; font-size: 12.5px; }
.tu-start { width: 100%; padding: 15px; font-size: 16px; }
.tu-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.tu-rn { flex: 1.3; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tu-rn small { opacity: .6; margin-left: 4px; }
.tu-bar { flex: 1; height: 9px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.tu-bar.big { flex: none; width: 100%; height: 6px; }
.tu-bar i { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.tu-bar i.hi { background: #00eaff; } .tu-bar i.mid { background: #ffb020; } .tu-bar i.low { background: #ff6a7a; } .tu-bar i.na { background: transparent; }
.tu-rs { width: 38px; text-align: right; font-size: 13px; opacity: .85; } .tu-rs.wide { width: auto; flex: 1; }
.tu-prog { display: flex; justify-content: space-between; font-size: 12.5px; opacity: .75; }
.tu-q { font-size: 18px; line-height: 1.5; font-weight: 600; margin: 8px 0 4px; white-space: pre-wrap; }
.tu-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 14px; border: 1px solid rgba(0,234,255,.25); background: rgba(0,234,255,.05); color: inherit; font-size: 15.5px; cursor: pointer; }
.tu-opt b { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,234,255,.14); color: #00eaff; font-size: 13px; }
.tu-opt span { flex: 1; min-width: 0; word-break: break-word; }
.tu-opt:disabled { cursor: default; opacity: .9; }
.tu-opt.right { border-color: #2ee59d; background: rgba(46,229,157,.14); }
.tu-opt.wrong { border-color: #ff6a7a; background: rgba(255,106,122,.14); }
.tu-fb { padding: 12px 14px; border-radius: 14px; margin: 6px 0; font-size: 14.5px; }
.tu-fb.ok { background: rgba(46,229,157,.1); border: 1px solid rgba(46,229,157,.4); } .tu-fb.no { background: rgba(255,106,122,.08); border: 1px solid rgba(255,106,122,.4); }
.tu-fb p { margin: 6px 0; } .tu-fb small { opacity: .7; } .tu-tag { color: #ffd27a; }
.tu-exp { margin-top: 8px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 14px; }
.tu-score { text-align: center; padding: 18px 0 6px; } .tu-score b { font-size: 44px; color: #00eaff; display: block; line-height: 1.1; } .tu-score span { opacity: .8; }
.co-advice { padding: 12px 14px; border-radius: 14px; background: rgba(0,234,255,.07); border: 1px solid rgba(0,234,255,.3); margin-bottom: 10px; font-size: 14px; }
.co-advice p { margin: 6px 0 0; }

/* ---- Labs ---- */
.lb-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.lb-item{padding:10px 12px;border:1px solid rgba(0,234,255,.18);border-radius:12px;margin:6px 0;cursor:pointer;background:rgba(0,234,255,.04)}
.lb-item b{display:block;font-size:14px}.lb-item small,.lb-head small{opacity:.65;font-size:12px}
.lb-head{margin-bottom:8px}.lb-head b{display:block;font-size:16px}
.lb-stage{flex:0 0 auto;border:1px solid rgba(0,234,255,.25);border-radius:14px;overflow:hidden;background:#050d12;height:min(300px,45vh);width:100%}
.lb-stage iframe{width:100%;height:100%;border:0;display:block}
.lb-read{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;min-height:8px}
.lb-read span{background:rgba(0,234,255,.08);border-radius:10px;padding:6px 10px;display:flex;flex-direction:column}
.lb-read small{opacity:.65;font-size:11px}.lb-read b{font-size:14px;color:#00eaff}
.lb-ctl{display:flex;flex-direction:column;gap:10px;margin:10px 0}
.lb-sl{display:block;font-size:13px}.lb-sl em{font-style:normal;color:#00eaff;margin-left:6px}
.lb-sl input{width:100%;accent-color:#00eaff}
.lb-card{border:1px solid rgba(0,234,255,.18);border-radius:12px;padding:4px 12px 10px;margin:12px 0;font-size:14px;line-height:1.5}
.lb-card ul{margin:4px 0;padding-left:18px}
.lb-q{margin:10px 0}.lb-qq{font-size:14px;margin-bottom:6px}
.lb-opt{display:block;width:100%;text-align:left;padding:9px 12px;margin:5px 0;border-radius:10px;border:1px solid rgba(0,234,255,.25);background:transparent;color:inherit;font:inherit;font-size:13px;cursor:pointer}
.lb-opt.ok{border-color:#2ee59d;background:rgba(46,229,157,.15)}.lb-opt.bad{border-color:#ff6a7a;background:rgba(255,106,122,.15)}
.lb-wait{display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 10px;text-align:center}
.lb-wait small{opacity:.65}
.lb-spin{width:34px;height:34px;border:3px solid rgba(0,234,255,.2);border-top-color:#00eaff;border-radius:50%;animation:lbspin 1s linear infinite}
@keyframes lbspin{to{transform:rotate(360deg)}}

.lb-tabs{display:flex;gap:6px;overflow-x:auto;padding:4px 0 8px;scrollbar-width:none}
.lb-tabs .mk-chip{white-space:nowrap}
.mk-chip.on{background:rgba(0,234,255,.18);border-color:#00eaff;color:#00eaff}
.lb-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.lb-card2{display:flex;flex-direction:column;gap:3px;padding:12px;border:1px solid rgba(0,234,255,.2);border-radius:14px;background:rgba(0,234,255,.05);cursor:pointer}
.lb-card2 span{font-size:22px}.lb-card2 b{font-size:13px;line-height:1.25}.lb-card2 small{opacity:.6;font-size:11px}
.lb-btns{flex-wrap:wrap}
.lb-ask{display:flex;gap:8px}.lb-ask .sc-in{flex:1;margin:0}
.lb-ans{border:1px solid rgba(0,234,255,.25);border-radius:12px;padding:10px 12px;margin:8px 0;font-size:14px;line-height:1.5;white-space:pre-wrap}
.lb-stage:fullscreen{width:100vw;height:100vh;border-radius:0}
.lb-stage:fullscreen iframe{width:100%;height:100%}

/* ---- Studio Agent (Cursor-style, LEPSA colours) ---- */
.st-agent { z-index: 6; }
.ag-log { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.ag-m { flex: 0 0 auto; font-size: 14px; line-height: 1.55; word-wrap: break-word; }
.ag-bot { color: #d6eef5; padding: 2px 2px; }
.ag-user { align-self: flex-end; max-width: 90%; padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: rgba(0,234,255,.14); border: 1px solid rgba(0,234,255,.32); color: #eafcff; }
.ag-warn { padding: 9px 12px; border-radius: 10px; background: rgba(255,176,32,.08); border: 1px solid rgba(255,176,32,.35); color: #ffd58a; font-size: 13px; }
.ag-empty { padding: 6px 0; }
.ag-hello { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 14px; }
.ag-hello b { display: block; font-size: 16px; color: #eafcff; }
.ag-hello small { display: block; color: #8fb7c2; font-size: 13px; line-height: 1.5; margin-top: 2px; }
.ag-hi { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; color: #00eaff; background: rgba(0,234,255,.1); border: 1px solid rgba(0,234,255,.3); }
.ag-sug { display: grid; gap: 8px; }
.ag-sug button { display: flex; align-items: center; gap: 11px; text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer; font: inherit; font-size: 14px; color: #d6eef5; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.09); }
.ag-sug button:hover { border-color: rgba(0,234,255,.4); background: rgba(0,234,255,.06); }
.ag-sug .lico { color: #00eaff; }
.ag-row { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.025); overflow: hidden; }
.ag-rh { display: flex; align-items: center; gap: 9px; padding: 9px 11px; font-size: 13.5px; color: #cfeaf2; cursor: default; min-width: 0; }
.ag-row:has(.ag-rb) .ag-rh { cursor: pointer; }
.ag-ri { display: grid; place-items: center; width: 18px; color: #8fb7c2; flex: 0 0 18px; }
.ag-rl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-rl b { color: #eafcff; font-weight: 600; }
.ag-rm { display: flex; gap: 6px; font: 600 12px ui-monospace, Menlo, Consolas, monospace; flex: 0 0 auto; }
.ag-rm em { font-style: normal; }
.ag-a { color: #2ee59d; } .ag-d { color: #ff6a7a; }
.ag-rc { display: grid; place-items: center; color: #6f8794; transition: transform .15s; flex: 0 0 auto; }
.ag-row.open .ag-rc { transform: rotate(90deg); }
.ag-rb { display: none; border-top: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.35); }
.ag-row.open .ag-rb { display: block; }
.ag-rb pre { margin: 0; padding: 7px 0; overflow-x: auto; font: 12px/1.55 ui-monospace, Menlo, Consolas, monospace; max-height: 260px; }
.ag-rb pre span { display: block; padding: 0 12px; white-space: pre; }
.ag-add { background: rgba(46,229,157,.13); color: #8ff3c4; } .ag-del { background: rgba(255,106,122,.13); color: #ff9aa6; } .ag-ctx { color: #6f8794; }
.ag-outp { color: #cfeaf2; white-space: pre-wrap !important; } .ag-outp { padding: 9px 12px !important; }
.ag-errp { color: #ff9aa6; }
.ag-row.run.ok .ag-ri { color: #2ee59d; } .ag-row.run.bad { border-color: rgba(255,106,122,.4); } .ag-row.run.bad .ag-ri { color: #ff6a7a; }
.ag-row.reverted { opacity: .55; } .ag-row.reverted .ag-rl { text-decoration: line-through; }
.ag-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.ag-mini { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: #bfe9f3; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.ag-mini:hover { border-color: rgba(0,234,255,.5); color: #fff; }
.ag-spin { width: 14px; height: 14px; border: 2px solid rgba(0,234,255,.25); border-top-color: #00eaff; border-radius: 50%; animation: lbspin .9s linear infinite; }
.ag-row.think .ag-rl { color: #8fb7c2; }
.ag-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(0,234,255,.06); border: 1px solid rgba(0,234,255,.22); font-size: 13px; color: #cfeaf2; }
.ag-sum div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ag-sum button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: #021016; background: #00eaff; border: 0; }
.ag-sum button[data-ag=undo], .ag-sum button[data-ag=back] { color: #bfe9f3; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.ag-comp { margin: 6px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 16px; background: rgba(8,16,28,.9); border: 1px solid rgba(0,234,255,.28); }
.ag-comp:focus-within { border-color: rgba(0,234,255,.65); }
.ag-comp textarea { width: 100%; resize: none; background: transparent; color: #eafcff; border: 0; padding: 12px 14px 4px; font: 14.5px/1.45 inherit; box-sizing: border-box; }
.ag-comp textarea:focus { outline: none; }
.ag-tools { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; }
.ag-modes { display: flex; gap: 5px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ag-modes::-webkit-scrollbar { display: none; }
.ag-modes button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: #8fb7c2; background: transparent; border: 1px solid rgba(255,255,255,.1); }
.ag-modes button.on { color: #00eaff; border-color: rgba(0,234,255,.6); background: rgba(0,234,255,.1); }
.ag-modes button span { display: none; } .ag-modes button.on span { display: inline; }
@media (min-width: 420px) { .ag-modes button span { display: inline; } }
.ag-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #8fb7c2; cursor: pointer; flex: 0 0 auto; }
.ag-auto input { display: none; }
.ag-sw { width: 28px; height: 16px; border-radius: 9px; background: rgba(255,255,255,.14); position: relative; transition: background .15s; }
.ag-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ag-auto input:checked + .ag-sw { background: #00c9dd; } .ag-auto input:checked + .ag-sw::after { transform: translateX(12px); }
.ag-send { width: 36px; height: 36px; border-radius: 11px; border: 0; cursor: pointer; display: grid; place-items: center; color: #021016; background: #00eaff; flex: 0 0 auto; }
.ag-send:disabled { opacity: .4; }
.st-back { display: inline-flex; align-items: center; gap: 6px; }
.lb-btns .mk-chip, .lb-tabs .mk-chip { display: inline-flex; align-items: center; gap: 6px; }
.lb-card2 span { display: block; color: #00eaff; }

/* ---- Verify by execution ---- */
.vf-btn .lico { width: 18px; height: 18px; }
.verify-box { margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); }
.vf-row { display: flex; gap: 10px; align-items: flex-start; }
.vf-ic { flex: 0 0 18px; margin-top: 1px; display: grid; place-items: center; }
.vf-tx { flex: 1; min-width: 0; color: #d6eef5; }
.vf-ok { border-color: rgba(46,229,157,.45); background: rgba(46,229,157,.07); } .vf-ok .vf-ic { color: #2ee59d; }
.vf-bad { border-color: rgba(255,106,122,.5); background: rgba(255,106,122,.08); } .vf-bad .vf-ic { color: #ff6a7a; }
.vf-warn { border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.07); } .vf-warn .vf-ic { color: #ffb020; }
.vf-info .vf-ic { color: #8fb7c2; }
.vf-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.ag-hot { color: #021016 !important; background: #00eaff !important; border-color: #00eaff !important; }
.vf-code { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.4); font: 12px/1.55 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; color: #cfeaf2; }

/* LEPSA Score card */
.tu-score-card { border: 1px solid rgba(0,229,255,.25); border-radius: 14px; padding: 14px; margin: 10px 0 14px; background: rgba(0,229,255,.05); }
.tsc-main { display: flex; align-items: center; gap: 14px; }
.tsc-num { font-size: 40px; font-weight: 800; line-height: 1; color: #00e5ff; }
.tsc-num small { font-size: 14px; opacity: .6; font-weight: 600; }
.tsc-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.tsc-txt b { font-size: 14px; } .tsc-txt span { opacity: .7; } .tsc-txt .tsc-delta { opacity: 1; color: #00e5ff; }
.tsc-streak { display: flex; flex-direction: column; align-items: center; font-size: 11px; opacity: .85; } .tsc-streak b { font-size: 18px; }
.tsc-plan { margin-top: 12px; font-size: 13px; } .tsc-plan ol { margin: 6px 0 0 18px; padding: 0; line-height: 1.6; }
.vf-auto { margin-top: 6px; }
.tu-notes { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 2px; }

/* Code Intelligence rows */
.ci-file { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); } .ci-file b { font-size: 13px; } .ci-file small, .ci-tip { display: block; opacity: .65; font-size: 11.5px; margin-top: 2px; }
.ci-syms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ci-sym { font: inherit; font-size: 11.5px; padding: 3px 8px; border-radius: 7px; cursor: pointer; color: #bfe9f3; background: rgba(0,234,255,.07); border: 1px solid rgba(0,234,255,.22); }
.ci-sym:hover { background: rgba(0,234,255,.16); color: #fff; }
.ci-use { display: flex; flex-direction: column; gap: 2px; padding: 5px 0; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.05); }
.ci-use code { font-size: 11.5px; opacity: .8; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 480px) { .ag-modes button:not(.on) span { display: none; } .ag-modes button { padding: 6px 9px; } }

/* AI Control */
.ctl-card { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; margin: 8px 0; padding: 12px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); }
.ctl-card.on { border-color: #00e5ff; background: rgba(0,229,255,.08); }
.ctl-card b { display: block; font-size: 14px; } .ctl-card small { display: block; opacity: .7; font-size: 12px; margin-top: 2px; line-height: 1.4; }
.ctl-ci { color: #00e5ff; margin-top: 1px; }
.ctl-log { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 12.5px; } .ctl-log b { color: #00e5ff; text-transform: capitalize; } .ctl-log small { grid-column: 2; opacity: .55; }
.ctl-gate { position: fixed; inset: 0; z-index: 200000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: 20px; }
.ctl-box { max-width: 340px; width: 100%; background: #0d121b; border: 1px solid rgba(0,229,255,.3); border-radius: 16px; padding: 18px; color: #e8ecf1; } .ctl-box p { opacity: .75; font-size: 13px; line-height: 1.5; margin: 6px 0 14px; } .ctl-ic { color: #00e5ff; margin-bottom: 6px; }
.ctl-btns { display: flex; gap: 10px; justify-content: flex-end; } .ctl-btns button { font: inherit; padding: 8px 14px; border-radius: 10px; cursor: pointer; border: 1px solid rgba(255,255,255,.15); background: transparent; color: inherit; } .ctl-btns .ctl-yes { background: #00e5ff; color: #04121a; border-color: #00e5ff; font-weight: 700; }
.ctl-ask { display: flex; gap: 8px; align-items: flex-start; } .ctl-ask-btns { display: flex; gap: 8px; margin-top: 8px; }
