:root {
    --bg-app: #f0f2f5;
    --bg-card: #ffffff;
    --bg-card2: #f8f9fb;
    --bg-input: #ffffff;
    --bg-modal: #ffffff;
    --bg-overlay: rgba(0, 0, 0, .45);
    --tx-primary: #1a1d21;
    --tx-secondary: #5f6368;
    --tx-tertiary: #9aa0a6;
    --tx-inverse: #ffffff;
    --ac-primary: #1a73e8;
    --ac-primary-light: #e8f0fe;
    --ac-primary-dark: #1557b0;
    --ac-success: #1e8e3e;
    --ac-success-light: #e6f4ea;
    --ac-error: #d93025;
    --ac-error-light: #fce8e6;
    --ac-warn: #e37400;
    --ac-warn-light: #fef7e0;
    --ac-info: #1a73e8;
    --ac-info-light: #e8f0fe;
    --border: #dadce0;
    --border-light: #e8eaed;
    --hover: rgba(32, 33, 36, .04);
    --r8: 8px;
    --r12: 12px;
    --r16: 16px;
    --r20: 20px;
    --r24: 24px;
    --r28: 28px;
    --rfull: 9999px;
    --s1: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
    --s2: 0 4px 12px rgba(0, 0, 0, .1), 0 2px 4px rgba(0, 0, 0, .06);
    --s3: 0 12px 28px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .06);
    --s-up: 0 -2px 8px rgba(0, 0, 0, .06);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --trans: all .25s cubic-bezier(.4, 0, .2, 1);

    /* Stage — panggung avatar/voice/mindmap (immersive surface) */
    --stage-bg: radial-gradient(circle at 20% 15%, rgba(26,115,232, .16), transparent 55%),
                radial-gradient(circle at 80% 85%, rgba(66,133,244, .14), transparent 55%),
                #eef0f7;
    --stage-bg-solid: #eef0f7;
    --stage-bg2: rgba(20, 20, 40, .05);
    --stage-tx: #1a1d21;
    --stage-border: rgba(20, 20, 40, .12);
    --stage-card: rgba(255, 255, 255, .75);

    /* Apple Spatial Glass */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    --glass-blur: blur(24px) saturate(200%);
}

.dark {
    --bg-app: #1a1d21;
    --bg-card: #292c31;
    --bg-card2: #2f3237;
    --bg-input: #35383d;
    --bg-modal: #292c31;
    --bg-overlay: rgba(0, 0, 0, .65);
    --tx-primary: #e8eaed;
    --tx-secondary: #9aa0a6;
    --tx-tertiary: #6b7280;
    --tx-inverse: #1a1d21;
    --ac-primary: #8ab4f8;
    --ac-primary-light: rgba(138, 180, 248, .15);
    --ac-primary-dark: #aecbfa;
    --ac-success: #81c995;
    --ac-success-light: rgba(129, 201, 149, .15);
    --ac-error: #f28b82;
    --ac-error-light: rgba(242, 139, 130, .15);
    --ac-warn: #fdd663;
    --ac-warn-light: rgba(253, 214, 99, .15);
    --ac-info: #8ab4f8;
    --ac-info-light: rgba(138, 180, 248, .15);
    --border: #3c4043;
    --border-light: #444749;
    --hover: rgba(232, 234, 237, .08);
    --s1: 0 1px 3px rgba(0, 0, 0, .3);
    --s2: 0 4px 12px rgba(0, 0, 0, .35);
    --s3: 0 12px 28px rgba(0, 0, 0, .4);
    --s-up: 0 -2px 8px rgba(0, 0, 0, .3);

    /* Stage — panggung tetap dark & immersive, disamakan dengan bahasa desain baru */
    --stage-bg: #050505;
    --stage-bg-solid: #050505;
    --stage-bg2: rgba(255, 255, 255, .05);
    --stage-tx: #ffffff;
    --stage-border: rgba(255, 255, 255, .14);
    --stage-card: rgba(18, 18, 18, .72);

    /* Apple Spatial Glass (Dark Mode) */
    --glass-bg: rgba(30, 33, 38, 0.55);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    --glass-blur: blur(24px) saturate(200%);
}

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

body {
    font-family: var(--font);
    background: var(--bg-app);
    color: var(--tx-primary);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background .3s, color .3s;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* ===== APP BAR ===== */
.app-bar {
    background: var(--bg-card);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: var(--s1);
    z-index: 100;
    flex-shrink: 0;
    gap: 10px;
    transition: var(--trans)
}

.app-logo {
    width: 38px;
    height: 38px;
    border-radius: var(--rfull);
    background: linear-gradient(135deg, #1a73e8 0%, #6c5ce7 50%, #4285f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26, 115, 232, .3)
}

.app-titles {
    flex: 1;
    min-width: 0
}

.app-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.app-sub {
    font-size: 11px;
    color: var(--tx-secondary);
    font-weight: 400
}

.step-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--ac-primary-light);
    border-radius: var(--rfull);
    padding: 4px 10px;
    flex-shrink: 0
}

.step-badge span {
    font-size: 11px;
    font-weight: 600;
    color: var(--ac-primary)
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--rfull);
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tx-secondary);
    transition: var(--trans);
    flex-shrink: 0
}

.btn-icon:hover {
    background: var(--hover)
}

/* ===== STEP PROGRESS ===== */
.step-prog {
    background: var(--bg-card);
    padding: 10px 16px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--trans)
}

.step-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ac-primary)
}

.step-time {
    font-size: 11px;
    color: var(--tx-tertiary)
}

.step-bar-bg {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden
}

.step-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ac-primary), #6c5ce7);
    border-radius: 2px;
    transition: width .6s cubic-bezier(.4, 0, .2, 1)
}

.step-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 4px
}

.step-dots::-webkit-scrollbar {
    display: none
}

.sdot {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0
}

.sdot-c {
    width: 26px;
    height: 26px;
    border-radius: var(--rfull);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--tx-tertiary);
    background: var(--bg-card);
    transition: var(--trans);
    z-index: 1
}

.sdot.active .sdot-c {
    background: var(--ac-primary);
    border-color: var(--ac-primary);
    color: #fff;
    box-shadow: 0 0 0 3px var(--ac-primary-light)
}

.sdot.done .sdot-c {
    background: var(--ac-success);
    border-color: var(--ac-success);
    color: #fff
}

.sdot-l {
    height: 2px;
    width: 16px;
    background: var(--border);
    flex-shrink: 0;
    transition: var(--trans)
}

.sdot-l.done {
    background: var(--ac-success)
}

/* ===== CHAT ===== */
.chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth
}

.chat::-webkit-scrollbar {
    width: 4px
}

.chat::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px
}

/* ===== MESSAGES ===== */
.msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: msgIn .35s cubic-bezier(.4, 0, .2, 1);
    max-width: 100%
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.msg.ai {
    align-self: flex-start
}

.msg.usr {
    align-self: flex-end;
    flex-direction: row-reverse
}

.mav {
    width: 34px;
    height: 34px;
    border-radius: var(--rfull);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--s1)
}

.mav.ai-av {
    background: linear-gradient(135deg, #1a73e8, #6c5ce7);
    color: #fff
}

.mav.usr-av {
    background: linear-gradient(135deg, #34a853, #0f9d58);
    color: #fff
}

.mbub {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--r20);
    font-size: 14px;
    line-height: 1.7;
    box-shadow: var(--s1);
    position: relative;
    transition: var(--trans)
}

.msg.ai .mbub {
    background: var(--bg-card);
    color: var(--tx-primary);
    border-bottom-left-radius: 4px
}

.msg.usr .mbub {
    background: var(--ac-primary);
    color: #fff;
    border-bottom-right-radius: 4px
}

.dark .msg.usr .mbub {
    background: #3b6cd4
}

.mbub.typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 20px
}

.dot-typing {
    width: 7px;
    height: 7px;
    border-radius: var(--rfull);
    background: var(--tx-tertiary);
    animation: dotPulse 1.2s infinite
}

.dot-typing:nth-child(2) {
    animation-delay: .2s
}

.dot-typing:nth-child(3) {
    animation-delay: .4s
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(.7);
        opacity: .4
    }

    40% {
        transform: scale(1.1);
        opacity: 1
    }
}

/* Typing status text */
.typing-status {
    font-size: 12px;
    color: var(--tx-tertiary);
    padding: 0 44px;
    animation: fadeInOut 3s infinite
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: .6
    }

    50% {
        opacity: 1
    }
}

/* ===== STEP CARD ===== */
.step-card {
    background: linear-gradient(135deg, #1a73e8 0%, #6c5ce7 50%, #4285f4 100%);
    color: #fff;
    border-radius: var(--r20);
    padding: 18px 20px;
    margin-bottom: 4px;
    box-shadow: var(--s2);
    animation: stepCardIn .5s cubic-bezier(.4, 0, .2, 1)
}

@keyframes stepCardIn {
    from {
        opacity: 0;
        transform: scale(.95) translateY(12px)
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

.sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, .2);
    border-radius: var(--rfull);
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px)
}

.sc-name {
    font-size: 18px;
    font-weight: 600;
    margin-top: 8px
}

.sc-desc {
    font-size: 13px;
    opacity: .85;
    margin-top: 4px;
    line-height: 1.5
}

/* ===== CHIPS ===== */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 4px 42px;
    animation: msgIn .3s ease-out .15s both
}

.chip {
    border: 1.5px solid var(--ac-primary);
    border-radius: var(--rfull);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ac-primary);
    cursor: pointer;
    background: var(--bg-card);
    transition: var(--trans);
    box-shadow: var(--s1);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font);
    white-space: nowrap
}

.chip:hover {
    background: var(--ac-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--s2)
}

.chip .material-icons-round {
    font-size: 16px
}

/* ===== BOTTOM BAR ===== */
.bottom {
    background: var(--bg-card);
    padding: 10px 12px 14px;
    box-shadow: var(--s-up);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--trans)
}

.voice-viz {
    height: 36px;
    background: var(--bg-card2);
    border-radius: var(--r12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 12px;
    overflow: hidden
}

.vb {
    width: 3px;
    background: var(--ac-primary);
    border-radius: 2px;
    height: 6px;
    transition: height .1s;
    opacity: .3
}

.vb.active {
    opacity: 1;
    animation: vAnim .5s infinite alternate
}

@keyframes vAnim {
    from {
        height: 6px
    }

    to {
        height: 26px
    }
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px
}

.ti {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: var(--r24);
    padding: 10px 16px;
    font-family: var(--font);
    font-size: 16px;
    outline: none;
    color: var(--tx-primary);
    background: var(--bg-input);
    resize: none;
    min-height: 44px;
    max-height: 100px;
    line-height: 1.5;
    transition: var(--trans)
}

.ti:focus {
    border-color: var(--ac-primary);
    box-shadow: 0 0 0 3px var(--ac-primary-light)
}

.ti::placeholder {
    color: var(--tx-tertiary)
}

.fab {
    width: 44px;
    height: 44px;
    border-radius: var(--rfull);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--trans);
    flex-shrink: 0;
    box-shadow: var(--s2)
}

.fab.send {
    background: linear-gradient(135deg, #1a73e8, #6c5ce7)
}

.fab.send:hover {
    transform: scale(1.08)
}

.fab.mic {
    background: var(--ac-error)
}

.fab.mic.listening {
    animation: micPulse 1.2s infinite
}

@keyframes micPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(217, 48, 37, .4)
    }

    50% {
        box-shadow: 0 0 0 10px rgba(217, 48, 37, 0)
    }
}

.fab.voice {
    background: var(--bg-card2);
    color: var(--tx-secondary);
    border: 1.5px solid var(--border)
}

.fab.voice.active {
    background: var(--ac-primary);
    color: #fff;
    border-color: var(--ac-primary);
    box-shadow: 0 0 15px rgba(26, 115, 232, 0.4);
    animation: voicePulse 2s infinite
}

@keyframes voicePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, .4)
    }

    50% {
        box-shadow: 0 0 0 10px rgba(26, 115, 232, 0)
    }
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px
}

.status-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--tx-tertiary)
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--rfull);
    background: var(--border);
    transition: var(--trans)
}

.status-dot.active {
    background: var(--ac-success);
    box-shadow: 0 0 4px rgba(30, 142, 62, .4)
}

.status-dot.recording {
    background: var(--ac-error);
    animation: blink 1s infinite
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.speaking-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ac-primary);
    font-weight: 500
}

.speaking-indicator.show {
    display: flex
}

.speak-waves {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 14px
}

.speak-waves span {
    width: 2px;
    background: var(--ac-primary);
    border-radius: 1px;
    animation: wave .7s infinite alternate
}

.speak-waves span:nth-child(1) {
    height: 5px;
    animation-delay: 0s
}

.speak-waves span:nth-child(2) {
    height: 10px;
    animation-delay: .1s
}

.speak-waves span:nth-child(3) {
    height: 7px;
    animation-delay: .2s
}

.speak-waves span:nth-child(4) {
    height: 12px;
    animation-delay: .15s
}

@keyframes wave {
    from {
        transform: scaleY(.4)
    }

    to {
        transform: scaleY(1)
    }
}

/* ===== WELCOME ===== */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px 24px;
    text-align: center;
    flex: 1
}

.wico {
    width: 88px;
    height: 88px;
    border-radius: var(--rfull);
    background: linear-gradient(135deg, #1a73e8 0%, #6c5ce7 50%, #4285f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: #fff;
    box-shadow: var(--s3);
    animation: float 3s ease-in-out infinite
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

.wtitle {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.wsub {
    font-size: 14px;
    color: var(--tx-secondary);
    line-height: 1.7;
    max-width: 320px
}

.btn-primary {
    background: linear-gradient(135deg, #1a73e8, #6c5ce7);
    color: #fff;
    border: none;
    border-radius: var(--rfull);
    padding: 14px 32px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--s2);
    transition: var(--trans);
    display: flex;
    align-items: center;
    gap: 8px
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--s3)
}

/* ===== RESUME DIALOG ===== */
.resume-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px
}

.resume-overlay.open {
    display: flex
}

.resume-card {
    background: var(--bg-card);
    border-radius: var(--r24);
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--s3);
    animation: scaleIn .3s cubic-bezier(.4, 0, .2, 1);
    text-align: center
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(.9)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

.resume-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px
}

.resume-card p {
    font-size: 13px;
    color: var(--tx-secondary);
    margin-bottom: 20px;
    line-height: 1.6
}

.resume-btns {
    display: flex;
    gap: 10px
}

.resume-btns button {
    flex: 1;
    padding: 12px;
    border-radius: var(--r12);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--trans)
}

.btn-resume {
    background: var(--ac-primary);
    color: #fff;
    border: none;
    box-shadow: var(--s1)
}

.btn-resume:hover {
    opacity: .9
}

.btn-new {
    background: var(--bg-card2);
    color: var(--tx-primary);
    border: 1px solid var(--border)
}

.btn-new:hover {
    background: var(--hover)
}

/* ===== MODAL BASE ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center
}

.modal-overlay.open {
    display: flex
}

.modal-sheet {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--r24) var(--r24) 0 0;
    padding: 20px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    animation: slideUp .35s cubic-bezier(.4, 0, .2, 1);
    transition: var(--trans)
}

@keyframes slideUp {
    from {
        transform: translateY(100%)
    }

    to {
        transform: translateY(0)
    }
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px
}

.modal-subtitle {
    font-size: 13px;
    color: var(--tx-secondary);
    margin-bottom: 16px;
    line-height: 1.5
}



/* Review phase */


/* ===== REPORT MODAL ===== */
.report-modal {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 250;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px
}

.report-modal.open {
    display: flex
}

.report-card {
    background: var(--bg-card);
    border-radius: var(--r24);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--s3);
    animation: scaleIn .35s cubic-bezier(.4, 0, .2, 1)
}

.report-header {
    background: linear-gradient(135deg, #1a73e8 0%, #6c5ce7 50%, #4285f4 100%);
    color: #fff;
    padding: 24px 20px;
    border-radius: var(--r24) var(--r24) 0 0;
    text-align: center
}

.report-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px
}

.report-header p {
    font-size: 12px;
    opacity: .85
}

.report-body {
    padding: 20px
}

.report-section {
    margin-bottom: 18px
}

.report-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--tx-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px
}

.report-section h4 .material-icons-round {
    font-size: 16px;
    color: var(--ac-primary)
}

.report-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--tx-primary)
}

.report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px
}

.report-tag {
    padding: 4px 10px;
    border-radius: var(--rfull);
    font-size: 12px;
    font-weight: 500
}

.report-tag.y {
    background: var(--ac-success-light);
    color: var(--ac-success)
}

.report-tag.n {
    background: var(--ac-error-light);
    color: var(--ac-error)
}

.report-tag.s {
    background: var(--ac-info-light);
    color: var(--ac-info)
}

.report-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px
}

.report-actions button {
    flex: 1;
    padding: 12px;
    border-radius: var(--r12);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--trans)
}

.btn-download {
    background: var(--ac-primary);
    color: #fff;
    border: none
}

.btn-download:hover {
    opacity: .9
}

.btn-close-report {
    background: var(--bg-card2);
    color: var(--tx-primary);
    border: 1px solid var(--border)
}

.btn-close-report:hover {
    background: var(--hover)
}

/* ===== MISC ===== */
.ws-card {
    background: var(--bg-card);
    border-radius: var(--r16);
    border: 1.5px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--s1);
    font-size: 13px;
    max-width: 80%
}

.ws-hdr {
    background: var(--bg-card2);
    padding: 10px 14px;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-light)
}

.ws-hdr .material-icons-round {
    font-size: 18px;
    color: var(--ac-primary)
}

/* ===== RESPONSIVE ===== */
@media(max-width:480px) {
    .app-bar {
        height: 56px;
        padding: 0 10px;
        gap: 8px
    }

    .app-title {
        font-size: 15px
    }

    .mbub {
        max-width: 88%;
        font-size: 13.5px;
        padding: 10px 14px
    }

    .chips {
        padding-left: 0;
        gap: 6px
    }

    .chip {
        padding: 6px 12px;
        font-size: 12px
    }

    .step-card {
        padding: 14px 16px
    }

    .sc-name {
        font-size: 16px
    }

    .modal-sheet {
        max-height: 92vh;
        padding: 16px
    }

    .report-card {
        max-width: 100%
    }
}

/* ===== VOICE UI OVERLAY ===== */
.voice-overlay-ui {
    position: fixed;
    inset: 0;
    background: var(--stage-bg);
    z-index: 999;
    display: flex;
    flex-direction: column;
    color: var(--stage-tx);
    font-family: var(--font);
    opacity: 1;
}

.vu-top { display: none; }

/* ===== VOICE UI STEP INFO — compact pill ===== */
.vu-step-container {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.coach-subnav-btn {
    font-size: 18px !important;
    color: color-mix(in srgb, var(--stage-tx) 45%, transparent);
    padding: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}
.coach-subnav-btn:hover {
    color: var(--stage-tx);
    background: color-mix(in srgb, var(--stage-tx) 8%, transparent);
}
.coach-subnav-btn.active {
    color: #4285f4;
    background: rgba(66,133,244, 0.15);
}

.vu-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: rgba(66,133,244, 0.12);
    border: 1px solid rgba(66,133,244, 0.25);
    border-radius: var(--r20);
    backdrop-filter: blur(8px);
}

#vuStepBadgeText {
    font-size: 10px;
    font-weight: 700;
    color: #4285f4;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.vu-step-label {
    font-size: 12px;
    font-weight: 600;
    color: color-mix(in srgb, var(--stage-tx) 75%, transparent);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* divider antara label dan dots */
.vu-step-label::after {
    content: '';
}

.vu-step-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.vu-sdot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--stage-tx) 20%, transparent);
    transition: all 0.3s ease;
}

.vu-sdot.done {
    background: rgba(66,133,244, 0.45);
}

.vu-sdot.active {
    background: #4285f4;
    width: 6px;
    height: 6px;
    box-shadow: 0 0 6px rgba(66,133,244, 0.8);
}

.vu-status {
    font-size: 11px;
    font-weight: 500;
    color: color-mix(in srgb, var(--stage-tx) 45%, transparent);
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

@media (min-width: 769px) {
    #vuActiveCoachingContent {
        padding-top: 86px !important;
    }
}

.vu-center {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 120px;
}

.face-card {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 1002;
    width: min(284px, calc(100vw - 28px));
    min-height: 72px;
    border: 1px solid color-mix(in srgb, var(--stage-tx) 14%, transparent);
    border-radius: var(--r16);
    background: var(--stage-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
    backdrop-filter: blur(16px);
    padding: 10px 12px;
    color: var(--stage-tx);
    cursor: pointer;
    transform: translateX(-50%);
    transition: var(--trans)
}

.face-card:hover {
    background: color-mix(in srgb, var(--stage-tx) 12%, transparent);
    transform: translateX(-50%) translateY(-1px)
}

.face-row {
    display: flex;
    align-items: center;
    gap: 9px
}

.face-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--rfull);
    background: color-mix(in srgb, var(--stage-tx) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.face-icon .material-icons-round {
    font-size: 17px
}

.face-copy {
    flex: 1;
    min-width: 0
}

.face-title {
    font-size: 11px;
    color: color-mix(in srgb, var(--stage-tx) 58%, transparent);
    line-height: 1.2
}

.face-status {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.face-signal {
    width: 8px;
    height: 8px;
    border-radius: var(--rfull);
    background: #6b7280;
    box-shadow: 0 0 0 0 rgba(107, 114, 128, .4);
    flex-shrink: 0
}

.face-card.active .face-signal {
    background: #10b981;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, .14)
}

.face-card.warn .face-signal {
    background: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, .14)
}

.face-tags {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    overflow: hidden
}

.face-tag {
    flex: 1;
    min-width: 0;
    border-radius: var(--rfull);
    background: color-mix(in srgb, var(--stage-tx) 10%, transparent);
    padding: 4px 7px;
    font-size: 10.5px;
    color: color-mix(in srgb, var(--stage-tx) 76%, transparent);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.face-media {
    display: none
}

@media(max-width:640px) {
    .face-card {
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 14px;
        right: 14px;
        width: auto;
        min-height: 66px;
        transform: none
    }

    .face-card:hover {
        transform: translateY(-1px)
    }

    .face-tags {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}


/* ====================================================
       MR ZERO AI — CLOSE-UP FACE AVATAR
       Faithful to reference: yellow oval face, blue hood,
       big white eyes, precise border-curve mouth.
    ==================================================== */

.vu-orb {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter .4s ease, width .4s ease, height .4s ease;
    animation: idleBodyFloat 4.4s ease-in-out infinite;
    background: transparent;
    border-radius: 50%;
    overflow: hidden;
}

/* 3D canvas inside orb */
#voxelAvatarContainer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
}
#voxelAvatarContainer canvas {
    border-radius: 50%;
    width: 100% !important;
    height: 100% !important;
}

/* Ambient glow around voxel face */
.vu-face-glow {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 43% 55%, rgba(26, 115, 232, .25), transparent 44%),
        radial-gradient(circle at 60% 62%, rgba(219, 39, 196, .18), transparent 36%);
    filter: blur(22px);
    opacity: .7;
    z-index: 3;
    animation: faceAura 3.8s ease-in-out infinite;
    pointer-events: none;
}

/* Blue outer shell — the "hood" from the toy reference */
.vu-face-bot {
    width: 158px;
    height: 152px;
    position: relative;
    z-index: 10;
    border-radius: 50% 50% 48% 48%;
    background:
        radial-gradient(circle at 30% 14%, rgba(255, 255, 255, 0.32), transparent 18%),
        linear-gradient(150deg, #3430da 0%, #1620a9 55%, #071471 100%);
    box-shadow:
        inset 0 7px 16px rgba(255, 255, 255, 0.22),
        inset 0 -12px 20px rgba(0, 9, 66, .4),
        0 18px 36px rgba(0, 0, 0, .26);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: idleHeadSway 6s ease-in-out infinite;
    transform-origin: 50% 62%;
    transition: all .4s cubic-bezier(.4, 0, .2, 1);
}

/* Yellow face — the main oval */
.vu-face-inner {
    position: relative;
    width: 135px;
    height: 129px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.64) 0 17px, rgba(255, 255, 255, 0.22) 18px 28px, transparent 30px),
        radial-gradient(circle at 70% 16%, rgba(255, 255, 255, 0.3) 0 10px, transparent 12px),
        linear-gradient(165deg, #ffe84e 0%, #ffd600 48%, #f4bf00 100%);
    box-shadow:
        inset 0 -16px 26px rgba(155, 105, 0, .2),
        inset 0 10px 18px rgba(255, 255, 255, 0.52);
    overflow: visible;
}

/* Shine blobs on face (reflections from toy image) */
.vu-shine {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.vu-shine.s1 {
    width: 22px;
    height: 22px;
    top: 12px;
    left: 18px;
    background: rgba(255, 255, 255, 0.48);
    filter: blur(3px);
}

.vu-shine.s2 {
    width: 10px;
    height: 10px;
    top: 16px;
    left: 44px;
    background: rgba(255, 255, 255, 0.35);
    filter: blur(1.5px);
}

/* ─── EYEBROWS ─── */
.vu-brows {
    position: absolute;
    top: 26px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 18px;
    z-index: 6;
    pointer-events: none;
}

.vu-brow {
    width: 30px;
    height: 8px;
    border-top: 4px solid #101858;
    border-radius: 50% 50% 0 0;
    transform: rotate(-8deg);
    transform-origin: center bottom;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1), top .28s ease;
    filter: drop-shadow(0 1.5px 0 rgba(255, 255, 255, 0.3));
}

.vu-brow.right {
    transform: rotate(8deg);
}

/* ─── EYES ─── */
.vu-face-eyes {
    position: absolute;
    top: 38px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}

.vu-eye {
    width: 36px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--stage-tx) 0%, #f0f7ff 100%);
    box-shadow:
        inset 0 -5px 10px rgba(20, 40, 90, .1),
        0 3px 10px rgba(0, 0, 0, .12),
        0 0 0 2px rgba(16, 24, 88, .08);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: eyeBlink 5.5s ease-in-out infinite;
    transition: height .2s ease, margin-top .2s ease, border-radius .2s ease;
    transform-origin: center;
}

/* ─── PUPILS ─── */
.vu-pupil {
    width: 14px;
    height: 17px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, #2038d0, #0a0e5e);
    position: relative;
    animation: pupilLook 5.4s ease-in-out infinite;
    flex-shrink: 0;
    transition: opacity .2s ease;
}

/* Specular highlight on pupil */
.vu-pupil::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
}

/* ─── BLUSH CHEEKS (visible in excited/speaking states) ─── */
.vu-cheek {
    position: absolute;
    bottom: 30px;
    width: 24px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 110, 110, .24);
    filter: blur(5px);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.vu-cheek.left {
    left: 8px;
}

.vu-cheek.right {
    right: 8px;
}

/* ─── MOUTH ─── (pure border-curve, ZERO layout disruption)
       Shape = border-bottom drawn as U-curve.
       Open/close = animate padding-bottom only.
       Width is fixed — never causes reflow.
    ─────────────────────────────────────────────────── */
.vu-mouth {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%) scaleX(var(--mouth-wide, 1));

    /* Fixed dimensions — never change width in animations */
    width: 50px;
    height: 0;
    box-sizing: content-box;

    /* Border-bottom IS the smile curve */
    border: 0;
    border-bottom: 5px solid #101858;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-radius: 0 0 66px 66px;

    /* padding-bottom controls depth of curve (mouth open amount) */
    padding-bottom: 20px;

    /* Clean transition — only animatable props */
    transition:
        padding-bottom .18s cubic-bezier(.4, 0, .2, 1),
        padding-top .18s cubic-bezier(.4, 0, .2, 1),
        height .14s ease,
        border-bottom-width .18s ease,
        border-top-width .18s ease,
        border-left-width .18s ease,
        border-right-width .18s ease,
        background-color .14s ease,
        border-radius .22s ease,
        width .2s ease,
        bottom .2s ease,
        transform .14s ease;

    z-index: 6;
    pointer-events: none;
}

/* No pseudo-elements — they were causing the dark blob */
.vu-mouth::before {
    display: none !important;
}

.vu-mouth::after {
    display: none !important;
}

/* ========================================================
       STATES — each state overrides face properties
    ======================================================== */

/* ── IDLE (default) ── */
.vu-orb {
    animation: idleBodyFloat 4.4s ease-in-out infinite;
}

.vu-orb .vu-face-bot {
    animation: idleHeadSway 6s ease-in-out infinite;
}

/* Idle: gentle relaxed smile */
.vu-orb .vu-mouth {
    width: 66px;
    padding-bottom: 20px;
    border-radius: 0 0 66px 66px;
}

/* ── LISTENING ── */
.vu-orb.listening {
    animation: listeningBob 2.8s ease-in-out infinite;
}

.vu-orb.listening .vu-face-bot {
    animation: listeningHeadLean 2.8s ease-in-out infinite;
}

/* Listening: attentive, one brow up */
.vu-orb.listening .vu-brow.left {
    transform: rotate(-14deg) translateY(-3px);
}

/* Slightly smaller smile, mouth slightly open as if ready to respond */
.vu-orb.listening .vu-mouth {
    width: 56px;
    padding-bottom: 14px;
}

/* ── PROCESSING / THINKING ──
       Matches reference image:
       • Eyes  → wide flat white pill (squint horizontal)
       • Brows → nearly flat/straight dark lines, close to eyes
       • Mouth → tiny thin flat line (barely a curve)
    ── */
.vu-orb.processing {
    animation: thinkingBodyTilt 3.2s ease-in-out infinite;
}

.vu-orb.processing .vu-face-bot {
    animation: thinkingHeadTilt 3.2s ease-in-out infinite;
}

/* Eyes: wide flat capsule — like in the reference image */
.vu-orb.processing .vu-eye {
    width: 58px;
    /* wider than normal */
    height: 14px;
    /* very flat */
    border-radius: 999px;
    /* full pill shape */
    margin-top: 14px;
    /* push down slightly */
    background: var(--stage-tx);
    box-shadow:
        inset 0 -2px 6px rgba(20, 40, 90, .1),
        0 2px 8px rgba(0, 0, 0, .1);
    animation: thinkingEyePulse 3s ease-in-out infinite;
}

/* Pupils completely hidden — eyes are pure white pills */
.vu-orb.processing .vu-pupil {
    opacity: 0;
    animation: none;
}

/* Brows: nearly horizontal/flat, close to squinted eyes,
       dark thin line — like the image shows */
.vu-orb.processing .vu-brow {
    width: 44px;
    transform: rotate(1deg) translateY(4px);
    /* nearly flat, shifted down toward eye */
    border-top-width: 5px;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.vu-orb.processing .vu-brow.right {
    transform: rotate(-1deg) translateY(4px);
    /* mirror — both almost flat */
}

/* Mouth: tiny thin flat line — barely a curve, centered */
.vu-orb.processing .vu-mouth {
    width: 34px;
    padding-bottom: 4px;
    /* extremely shallow = nearly flat */
    border-radius: 0 0 34px 34px;
    border-bottom-width: 3.5px;
    border-bottom-color: #101858;
    border-left-color: transparent;
    border-right-color: transparent;
    bottom: 26px;
    animation: thinkingMouthTick 4s ease-in-out infinite;
    /* very subtle twitch */
}


/* ── SPEAKING ── */
.vu-orb.speaking {
    animation: speakingBodyBounce 1s ease-in-out infinite;
}

.vu-orb.speaking .vu-face-bot {
    animation: speakingHeadNod 1s ease-in-out infinite;
}

.vu-orb.speaking .vu-face-glow {
    animation: speakGlow 1s ease-in-out infinite;
}

/* Happy squint eyes while speaking */
.vu-orb.speaking .vu-eye {
    animation: speakingHappyEye 2.2s ease-in-out infinite;
}

/* Raised brows = enthusiasm */
.vu-orb.speaking .vu-brow {
    transform: rotate(-10deg) translateY(-2px);
}

.vu-orb.speaking .vu-brow.right {
    transform: rotate(10deg) translateY(-2px);
}

/* Blush cheeks when speaking */
.vu-orb.speaking .vu-cheek {
    opacity: 1;
}

/* 
       SPEAKING MOUTH — precision lip-sync:
       Only padding-bottom animates (open ↔ closed).
       Width is FIXED at 72px. No scaleX. No layout shift.
    */
.vu-orb.speaking .vu-mouth {
    width: 72px;
    padding-bottom: 20px;
    /* baseline */
    border-radius: 0 0 72px 72px;
    border-bottom-width: 5px;
    /* CSS animation removed: now using Web Audio API real-time lip-sync */
}

.vu-orb.speaking .vu-mouth.viseme-rest {
    width: 50px;
    padding-bottom: 6px;
    height: 0;
    border-radius: 0 0 52px 52px;
    border-width: 0 4px 4px 4px;
    border-color: transparent transparent #101858 transparent;
    background: transparent;
    transform: translateX(-50%) scaleX(.9);
}

.vu-orb.speaking .vu-mouth.viseme-m {
    width: 46px;
    padding-bottom: 2px;
    height: 0;
    border-radius: 999px;
    border-width: 0 0 5px 0;
    border-color: transparent transparent #101858 transparent;
    background: transparent;
    transform: translateX(-50%) scaleX(1.08);
}

.vu-orb.speaking .vu-mouth.viseme-a {
    width: 42px;
    height: var(--mouth-open, 24px);
    padding-bottom: 0;
    border-radius: 46% 46% 48% 48%;
    border: 5px solid #101858;
    background: #101858;
    transform: translateX(-50%) scaleX(var(--mouth-wide, .96));
}

.vu-orb.speaking .vu-mouth.viseme-e {
    width: 64px;
    height: var(--mouth-open, 14px);
    padding-bottom: 0;
    border-radius: 999px;
    border: 5px solid #101858;
    background: #101858;
    transform: translateX(-50%) scaleX(var(--mouth-wide, 1.16));
}

.vu-orb.speaking .vu-mouth.viseme-o {
    width: 28px;
    height: var(--mouth-open, 22px);
    padding-bottom: 0;
    border-radius: 50%;
    border: 3px solid #6b4a1a;
    background: #1a0a00;
    transform: translateX(-50%) scaleX(var(--mouth-wide, .88));
}

/* ── SURPRISED (triggered via JS class) ── */
.vu-orb.surprised .vu-face-bot {
    animation: surprisedBounce .5s cubic-bezier(.4, 0, .2, 1) forwards;
}

.vu-orb.surprised .vu-eye {
    height: 62px;
    /* wide open */
    animation: none;
}

.vu-orb.surprised .vu-brow {
    transform: rotate(-14deg) translateY(-5px);
}

.vu-orb.surprised .vu-brow.right {
    transform: rotate(14deg) translateY(-5px);
}

/* O-shaped surprised mouth */
.vu-orb.surprised .vu-mouth {
    width: 30px;
    height: 26px;
    padding-bottom: 0;
    border-radius: 50%;
    border: 3px solid #6b4a1a;
    background: #1a0a00;
    transform: translateX(-50%) scaleX(0.9);
    animation: none;
    bottom: 18px;
}

/* ── SAD / EMPATHETIC ── */
.vu-orb.sad .vu-face-bot {
    transform: translateY(2px);
}

.vu-orb.sad .vu-eye {
    height: 24px;
    transform: translateY(2px);
    border-top: 3px solid #101858;
    /* Heavy eyelid effect */
    border-radius: 40% 40% 50% 50%;
    opacity: 0.85;
    animation: none;
}

.vu-orb.sad .vu-brow {
    transform: rotate(25deg) translateY(4px) translateX(4px);
}

.vu-orb.sad .vu-brow.right {
    transform: rotate(-25deg) translateY(4px) translateX(-4px);
}

.vu-orb.sad .vu-mouth {
    width: 44px;
    padding-bottom: 0px;
    padding-top: 14px;
    /* deeper frown */
    border-radius: 72px 72px 0 0;
    border-bottom-color: transparent;
    /* hide default bottom smile */
    border-bottom-width: 0;
    border-top-color: #101858;
    /* show top frown curve */
    border-top-width: 6px;
    border-left-color: transparent;
    border-right-color: transparent;
    transform: translateX(-50%) translateY(12px);
    background: transparent;
    animation: none;
}

/* Make speaking-sad look natural */
.vu-orb.speaking.sad .vu-mouth {
    /* Real-time lip-sync via JS */
}

/* ── EXCITED (triggered via JS class) ── */
.vu-orb.excited {
    animation: excitedShake .4s ease-in-out infinite alternate;
}

.vu-orb.excited .vu-eye {
    animation: excitedEye 1s ease-in-out infinite;
}

.vu-orb.excited .vu-brow {
    transform: rotate(-14deg) translateY(-4px);
}

.vu-orb.excited .vu-brow.right {
    transform: rotate(14deg) translateY(-4px);
}

.vu-orb.excited .vu-cheek {
    opacity: 1;
}

/* Wide grin */
.vu-orb.excited .vu-mouth {
    width: 76px;
    padding-bottom: 35px;
    /* Huge open smile */
    border-radius: 0 0 90px 90px;
    border-bottom-width: 6px;
    border-bottom-color: #101858;
    background: #101858;
    /* Fill the mouth */
    /* Real-time lip-sync via JS */
}

.vu-orb.happy .vu-eye,
.vu-orb.confident .vu-eye {
    animation: speakingHappyEye 2.8s ease-in-out infinite;
}

.vu-orb.happy .vu-brow {
    transform: rotate(-12deg) translateY(-3px);
}

.vu-orb.happy .vu-brow.right {
    transform: rotate(12deg) translateY(-3px);
}

.vu-orb.happy .vu-cheek,
.vu-orb.confident .vu-cheek {
    opacity: .85;
}

.vu-orb.happy .vu-mouth {
    width: 76px;
    padding-bottom: 26px;
    border-radius: 0 0 86px 86px;
    border-bottom-width: 6px;
}

.vu-orb.thoughtful .vu-face-bot,
.vu-orb.confused .vu-face-bot {
    animation: thinkingHeadTilt 3.4s ease-in-out infinite;
}

.vu-orb.thoughtful .vu-eye {
    height: 34px;
    margin-top: 8px;
    animation: thinkingEyePulse 3.5s ease-in-out infinite;
}

.vu-orb.thoughtful .vu-brow {
    transform: rotate(5deg) translateY(2px);
}

.vu-orb.thoughtful .vu-brow.right {
    transform: rotate(-8deg) translateY(-2px);
}

.vu-orb.thoughtful .vu-mouth {
    width: 36px;
    padding-bottom: 5px;
    border-bottom-width: 4px;
    transform: translateX(-50%) rotate(-4deg);
}

.vu-orb.concerned .vu-eye {
    height: 36px;
    margin-top: 6px;
    animation: none;
}

.vu-orb.concerned .vu-brow {
    transform: rotate(18deg) translateY(2px) translateX(2px);
}

.vu-orb.concerned .vu-brow.right {
    transform: rotate(-18deg) translateY(2px) translateX(-2px);
}

.vu-orb.concerned .vu-mouth {
    width: 42px;
    padding-bottom: 3px;
    border-bottom-width: 4px;
    transform: translateX(-50%) rotate(3deg);
}

.vu-orb.confident .vu-brow {
    transform: rotate(-6deg) translateY(-1px);
}

.vu-orb.confident .vu-brow.right {
    transform: rotate(5deg) translateY(1px);
}

.vu-orb.confident .vu-mouth {
    width: 62px;
    padding-bottom: 14px;
    border-bottom-width: 5px;
    transform: translateX(-50%) rotate(-2deg);
}

.vu-orb.confused .vu-eye:first-child {
    height: 42px;
    margin-top: 3px;
}

.vu-orb.confused .vu-eye:last-child {
    height: 52px;
    margin-top: -2px;
}

.vu-orb.confused .vu-brow {
    transform: rotate(18deg) translateY(1px);
}

.vu-orb.confused .vu-brow.right {
    transform: rotate(-18deg) translateY(-5px);
}

.vu-orb.confused .vu-mouth {
    width: 30px;
    padding-bottom: 6px;
    border-bottom-width: 4px;
    transform: translateX(-50%) rotate(8deg);
}

.vu-orb.speaking .vu-mouth.viseme-rest {
    width: 50px;
    height: 0;
    padding-top: 0;
    padding-bottom: 6px;
    border-width: 0 4px 4px 4px;
    border-color: transparent transparent #101858 transparent;
    border-radius: 0 0 52px 52px;
    background: transparent;
    transform: translateX(-50%) scaleX(.9);
}

.vu-orb.speaking .vu-mouth.viseme-m {
    width: 46px;
    height: 0;
    padding-top: 0;
    padding-bottom: 2px;
    border-width: 0 0 5px 0;
    border-color: transparent transparent #101858 transparent;
    border-radius: 999px;
    background: transparent;
    transform: translateX(-50%) scaleX(1.08);
}

.vu-orb.speaking .vu-mouth.viseme-a {
    width: 42px;
    height: var(--mouth-open, 24px);
    padding: 0;
    border: 5px solid #101858;
    border-radius: 46% 46% 48% 48%;
    background: #101858;
    transform: translateX(-50%) scaleX(var(--mouth-wide, .96));
}

.vu-orb.speaking .vu-mouth.viseme-e {
    width: 64px;
    height: var(--mouth-open, 14px);
    padding: 0;
    border: 5px solid #101858;
    border-radius: 999px;
    background: #101858;
    transform: translateX(-50%) scaleX(var(--mouth-wide, 1.16));
}

.vu-orb.speaking .vu-mouth.viseme-o {
    width: 30px;
    height: var(--mouth-open, 25px);
    padding: 0;
    border: 6px solid #101858;
    border-radius: 50%;
    background: transparent;
    transform: translateX(-50%) scaleX(var(--mouth-wide, .86));
}

/* ── SAD / MUTED ── */
.vu-orb.muted {
    animation: none;
    filter: grayscale(.55) brightness(.78);
}

.vu-orb.muted .vu-face-bot {
    animation: none;
}

.vu-orb.muted .vu-eye {
    height: 9px;
    margin-top: 22px;
    border-radius: 999px;
    animation: none;
}

.vu-orb.muted .vu-pupil {
    opacity: 0;
    animation: none;
}

/* Sad droopy brows */
.vu-orb.muted .vu-brow {
    transform: rotate(6deg);
}

.vu-orb.muted .vu-brow.right {
    transform: rotate(-6deg);
}

/* Sad flat mouth (very shallow curve → looks neutral/sad) */
.vu-orb.muted .vu-mouth {
    width: 46px;
    padding-bottom: 6px;
    border-radius: 0 0 46px 46px;
    border-bottom-width: 4px;
    bottom: 22px;
    animation: none;
}

/* ========================================================
       ALL KEYFRAMES
    ======================================================== */

/* Ambient glow pulse */
@keyframes faceAura {

    0%,
    100% {
        opacity: .55;
        transform: scale(.97);
    }

    50% {
        opacity: .75;
        transform: scale(1.02);
    }
}

/* ── IDLE ── */
@keyframes idleBodyFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    28% {
        transform: translateY(-6px) rotate(.4deg);
    }

    58% {
        transform: translateY(-3px) rotate(-.3deg);
    }

    80% {
        transform: translateY(-7px) rotate(.2deg);
    }
}

@keyframes idleHeadSway {

    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    22% {
        transform: rotate(1.4deg) translateY(-1px);
    }

    54% {
        transform: rotate(-1.2deg) translateY(1px);
    }

    80% {
        transform: rotate(.7deg) translateY(0);
    }
}

/* ── EYES ── */
/* Double-blink pattern: blink, gap, blink again */
@keyframes eyeBlink {

    0%,
    34%,
    38%,
    46%,
    100% {
        transform: scaleY(1);
    }

    36% {
        transform: scaleY(.05);
    }

    44% {
        transform: scaleY(.05);
    }
}

/* Pupils visit 5 gaze points */
@keyframes pupilLook {

    0%,
    100% {
        transform: translate(0, 0);
    }

    18% {
        transform: translate(-4px, 1px);
    }

    36% {
        transform: translate(3px, -2px);
    }

    54% {
        transform: translate(4px, 2px);
    }

    72% {
        transform: translate(-2px, 2.5px);
    }

    88% {
        transform: translate(0, -1px);
    }
}

/* ── LISTENING ── */
@keyframes listeningBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px) rotate(.6deg);
    }
}

@keyframes listeningHeadLean {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(3.5deg);
    }
}

/* ── PROCESSING ── */
@keyframes thinkingBodyTilt {

    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    38% {
        transform: rotate(-2deg) translateY(-2px);
    }

    72% {
        transform: rotate(1.4deg) translateY(-1px);
    }
}

@keyframes thinkingHeadTilt {

    0%,
    100% {
        transform: rotate(0deg);
    }

    42% {
        transform: rotate(-4deg);
    }

    72% {
        transform: rotate(2deg);
    }
}

/* Eyes pulse very subtly — like eyelids slowly blinking while thinking */
@keyframes thinkingEyePulse {

    0%,
    100% {
        height: 14px;
        opacity: 1;
    }

    45% {
        height: 10px;
        opacity: .88;
    }

    /* lids droop a little */
    65% {
        height: 14px;
        opacity: 1;
    }
}

/* Mouth micro-twitch — tiny side-to-side like "hmm..." expression */
@keyframes thinkingMouthTick {

    0%,
    100% {
        transform: translateX(-50%) rotate(0deg);
    }

    28% {
        transform: translateX(-50%) rotate(-3deg);
    }

    58% {
        transform: translateX(-50%) rotate(2deg);
    }

    80% {
        transform: translateX(-50%) rotate(-1.5deg);
    }
}

/* Keep old name as alias so nothing breaks */
@keyframes thinkingMouthWiggle {

    0%,
    100% {
        transform: translateX(-50%) rotate(-3deg);
    }

    50% {
        transform: translateX(-50%) rotate(3deg);
    }
}


/* ── SPEAKING ── */
@keyframes speakingBodyBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    35% {
        transform: translateY(-5px);
    }

    65% {
        transform: translateY(-2px);
    }
}

@keyframes speakingHeadNod {

    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    30% {
        transform: rotate(-2deg) translateY(-2px);
    }

    65% {
        transform: rotate(1.4deg) translateY(.5px);
    }
}

@keyframes speakGlow {

    0%,
    100% {
        opacity: .6;
    }

    50% {
        opacity: .95;
    }
}

@keyframes speakingHappyEye {

    0%,
    100% {
        transform: scaleY(1);
    }

    45% {
        transform: scaleY(.78);
    }
}

/* Keyframes for mouth removed (now handled by JS lip sync) */


.vu-subs {
    flex: 1;
    padding: 10px 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--stage-tx) 20%, transparent) transparent;
}

.vu-subs::-webkit-scrollbar {
    width: 4px;
}
.vu-subs::-webkit-scrollbar-track {
    background: transparent;
}
.vu-subs::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--stage-tx) 20%, transparent);
    border-radius: 4px;
}

.vu-sub-ai {
    font-size: 15px;
    font-weight: 400;
    color: var(--stage-tx);
    line-height: 1.5;
    text-shadow: none;
    transition: opacity .3s
}

.vu-sub-user {
    font-size: 14px;
    color: color-mix(in srgb, var(--stage-tx) 60%, transparent);
    line-height: 1.5;
    min-height: 20px;
    transition: opacity .3s;
    font-style: italic;
}

.vu-controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 30px);
    z-index: 1002;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 0;
    pointer-events: none
}

.vu-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--stage-tx);
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .3);
    background: color-mix(in srgb, var(--stage-tx) 10%, transparent);
    pointer-events: auto
}

.vu-btn:hover {
    transform: scale(1.1);
    background: color-mix(in srgb, var(--stage-tx) 20%, transparent)
}

.vu-btn.primary {
    background: color-mix(in srgb, var(--stage-tx) 20%, transparent);
    width: 70px;
    height: 70px
}

.vu-btn.primary .material-icons-round {
    font-size: 32px
}

.vu-btn.danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444
}


.vu-btn.secondary {
    background: transparent;
    border: 2px solid color-mix(in srgb, var(--stage-tx) 30%, transparent)
}

.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    width: 100%;
    overflow-y: auto;
}

#faceCard.active .face-media {
    width: 100% !important;
    height: 100% !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    object-fit: cover !important;
    border-radius: 12px !important;
}

.bottom-nav-bar {
    position: fixed;
    bottom: max(15px, env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 360px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 40px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    transition: all 0.25s ease;
    color: var(--tx-tertiary);
}

.nav-item:hover {
    color: var(--tx-primary);
    background: var(--hover);
}

.nav-item.active {
    color: #4285f4;
    background: rgba(66,133,244, 0.15);
    border: 1px solid rgba(66,133,244, 0.3);
    box-shadow: 0 4px 15px rgba(66,133,244, 0.2);
}

.nav-item .material-icons-round {
    font-size: 22px;
}

/* Tombol tengah navbar: keahlian AI Coach — dibuat menonjol ala Duolingo/IG */
.nav-item-center {
    width: 54px;
    height: 54px;
    margin-top: -20px;
    background: linear-gradient(135deg, #4285f4, #669df6);
    color: #fff;
    box-shadow: 0 6px 18px rgba(66,133,244, 0.5);
    border: 3px solid var(--bg-modal);
}

@keyframes aiOrbAnim {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255,255,255,0.25)); }
    50%       { filter: drop-shadow(0 0 7px rgba(255,255,255,0.85)); }
}

.nav-item-center .material-icons-round {
    font-size: 23px;
    animation: aiOrbAnim 2.6s ease-in-out infinite;
}

.nav-item-center:hover {
    color: #fff;
    background: linear-gradient(135deg, #b366f9, #f472b6);
}

.nav-item-center:active {
    transform: scale(0.88);
    transition: transform 0.12s ease;
}

.nav-item-center.active {
    background: linear-gradient(135deg, #b366f9, #f472b6);
    border-color: rgba(66,133,244, 0.6);
    box-shadow: 0 8px 24px rgba(66,133,244, 0.65);
}

/* ===== HISTORY CARD STYLES ===== */
.history-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
}

.history-card:hover {
    background: var(--hover);
    border-color: var(--border-light);
}

.vu-btn-small {
    flex: 1;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--tx-primary);
    border-radius: 30px;
    height: 32px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

/* ===== SETTINGS / AKUN STYLES ===== */
.settings-group {
    background: linear-gradient(135deg, rgba(66,133,244,0.08), rgba(26,115,232,0.06));
    border: 1px solid rgba(66,133,244,0.15);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.settings-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--tx-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.setting-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-icon {
    color: #4285f4;
    font-size: 20px;
}

.setting-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--tx-primary);
}

.setting-desc {
    font-size: 11px;
    color: var(--tx-tertiary);
    margin-top: 2px;
}


/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #4285f4;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

@keyframes vuSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.vu-spin {
    animation: vuSpin 1.5s linear infinite;
    display: inline-block;
}

/* ===== SESSION TYPE CHOOSER ===== */
.session-type-chooser {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 10px 16px 30px;
    gap: 20px;
}

.session-type-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.session-type-header .session-type-icon {
    font-size: 40px;
    color: #4285f4;
    background: rgba(66,133,244, 0.12);
    border: 1px solid rgba(66,133,244, 0.25);
    border-radius: 50%;
    padding: 12px;
    margin-bottom: 4px;
}

.session-type-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--stage-tx);
    margin: 0;
}

.session-type-header p {
    font-size: 13px;
    color: color-mix(in srgb, var(--stage-tx) 55%, transparent);
    line-height: 1.55;
    max-width: 320px;
    margin: 0;
}

.session-type-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.session-type-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--stage-tx) 10%, transparent);
    background: color-mix(in srgb, var(--stage-tx) 4%, transparent);
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font);
}

.session-type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(66,133,244, 0.4);
    background: rgba(66,133,244, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.session-type-card:active {
    transform: translateY(0);
}

.session-type-card.compact {
    padding: 14px 16px;
}

.session-type-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.session-type-card-icon.voice {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.2), rgba(66,133,244, 0.2));
    border: 1px solid rgba(66,133,244, 0.3);
    color: #4285f4;
}

.session-type-card-icon.text {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.session-type-card-icon .material-icons-round {
    font-size: 24px;
}

.session-type-card-body {
    flex: 1;
    min-width: 0;
}

.session-type-card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--stage-tx);
    margin: 0 0 4px;
}

.session-type-card-body p {
    font-size: 12px;
    color: color-mix(in srgb, var(--stage-tx) 50%, transparent);
    line-height: 1.45;
    margin: 0;
}

.session-type-arrow {
    color: color-mix(in srgb, var(--stage-tx) 30%, transparent);
    font-size: 20px;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.2s;
}

.session-type-card:hover .session-type-arrow {
    color: #4285f4;
    transform: translateX(3px);
}

/* ===== iOS AUDIO GATE ===== */
.ios-audio-gate {
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 14, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.ios-audio-gate-card {
    background: rgba(18, 20, 29, 0.98);
    border: 1px solid rgba(66,133,244, 0.25);
    border-radius: 24px;
    padding: 28px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ios-audio-gate-card .material-icons-round {
    font-size: 42px;
    color: #4285f4;
    background: rgba(66,133,244, 0.12);
    border-radius: 50%;
    padding: 14px;
}

.ios-audio-gate-card h3 {
    color: var(--stage-tx);
    font-size: 18px;
    margin: 0;
}

.ios-audio-gate-card p {
    color: color-mix(in srgb, var(--stage-tx) 60%, transparent);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.ios-audio-gate-btn {
    margin-top: 8px;
    width: 100%;
    border: none;
    border-radius: 30px;
    padding: 16px 20px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    color: var(--stage-tx);
    cursor: pointer;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(66,133,244,.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.ios-audio-gate-btn:active {
    transform: scale(0.97);
    box-shadow: 0 3px 12px rgba(66,133,244,.3);
}

.vu-btn,
.face-card,
.nav-item,
.session-type-card {
    touch-action: manipulation;
}

.ios-voice-hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: color-mix(in srgb, var(--stage-tx) 45%, transparent);
    line-height: 1.4;
}
/* ============================================================
   NEW FACIAL EXPRESSIONS — Extended emotion palette
   ============================================================ */

/* ── ANGRY ── */
.vu-orb.angry {
    animation: angryShake .25s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 18px rgba(239,68,68,.55));
}
.vu-orb.angry .vu-face-bot {
    animation: none;
}
.vu-orb.angry .vu-face-glow {
    background: radial-gradient(circle at 50% 55%, rgba(239,68,68,.45), transparent 52%) !important;
}
/* Brows pinched hard inward and down */
.vu-orb.angry .vu-brow {
    transform: rotate(30deg) translateY(6px) translateX(5px);
    border-top-color: #5b0000;
    border-top-width: 5px;
}
.vu-orb.angry .vu-brow.right {
    transform: rotate(-30deg) translateY(6px) translateX(-5px);
}
.vu-orb.angry .vu-eye {
    height: 28px;
    animation: none;
    border-top: 4px solid #8b1a1a;
    border-radius: 30% 30% 50% 50%;
}
/* Tight small scowl */
.vu-orb.angry .vu-mouth {
    width: 36px;
    padding-top: 10px;
    padding-bottom: 0;
    border-top-width: 5px;
    border-top-color: #5b0000;
    border-bottom-width: 0;
    border-left-color: transparent;
    border-right-color: transparent;
    border-radius: 72px 72px 0 0;
    transform: translateX(-50%) translateY(8px);
    background: transparent;
}

@keyframes angryShake {
    0%   { transform: translateX(-1.5px) rotate(-0.5deg); }
    100% { transform: translateX(1.5px)  rotate(0.5deg);  }
}

/* ── NERVOUS ── */
.vu-orb.nervous {
    animation: nervousJitter .18s ease-in-out infinite alternate;
}
.vu-orb.nervous .vu-face-bot {
    animation: nervousHeadBob 1.2s ease-in-out infinite;
}
.vu-orb.nervous .vu-eye {
    animation: nervousBlink 1.8s ease-in-out infinite;
    height: 34px;
}
.vu-orb.nervous .vu-brow {
    transform: rotate(15deg) translateY(3px) translateX(3px);
}
.vu-orb.nervous .vu-brow.right {
    transform: rotate(-15deg) translateY(3px) translateX(-3px);
}
.vu-orb.nervous .vu-cheek {
    opacity: .45;
}
/* Slightly wavy uncertain mouth */
.vu-orb.nervous .vu-mouth {
    width: 38px;
    padding-bottom: 5px;
    border-bottom-width: 4px;
    transform: translateX(-50%) rotate(6deg);
    animation: nervousMouth 1.6s ease-in-out infinite;
}

@keyframes nervousJitter {
    0%   { transform: translateX(0) translateY(0); }
    100% { transform: translateX(1px) translateY(-1px); }
}
@keyframes nervousHeadBob {
    0%,100% { transform: rotate(0deg) translateY(0); }
    35%      { transform: rotate(-3deg) translateY(-2px); }
    70%      { transform: rotate(2deg) translateY(0); }
}
@keyframes nervousBlink {
    0%,90%,100% { transform: scaleY(1); }
    94%          { transform: scaleY(.05); }
}
@keyframes nervousMouth {
    0%,100% { transform: translateX(-50%) rotate(6deg); }
    50%      { transform: translateX(-50%) rotate(-4deg); }
}

/* ── PEACEFUL ── */
.vu-orb.peaceful {
    animation: peacefulFloat 5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(94,215,177,.3));
}
.vu-orb.peaceful .vu-face-bot {
    animation: peacefulSway 6.5s ease-in-out infinite;
}
/* Half-closed blissful eyes */
.vu-orb.peaceful .vu-eye {
    height: 22px;
    border-top: 4px solid rgba(16,24,88,.3);
    border-radius: 40% 40% 50% 50%;
    animation: peacefulEye 5s ease-in-out infinite;
}
.vu-orb.peaceful .vu-brow {
    transform: rotate(-4deg) translateY(1px);
}
.vu-orb.peaceful .vu-brow.right {
    transform: rotate(4deg) translateY(1px);
}
.vu-orb.peaceful .vu-cheek {
    opacity: .55;
    background: rgba(94,215,177,.18);
}
/* Gentle soft smile */
.vu-orb.peaceful .vu-mouth {
    width: 52px;
    padding-bottom: 16px;
    border-radius: 0 0 60px 60px;
    border-bottom-width: 4px;
}

@keyframes peacefulFloat {
    0%,100% { transform: translateY(0) rotate(0deg); }
    45%      { transform: translateY(-8px) rotate(.3deg); }
}
@keyframes peacefulSway {
    0%,100% { transform: rotate(0deg); }
    40%      { transform: rotate(1deg); }
    70%      { transform: rotate(-.8deg); }
}
@keyframes peacefulEye {
    0%,100% { height: 22px; }
    50%      { height: 18px; }
}

/* ── WINKING ── */
.vu-orb.winking .vu-eye:first-child {
    transform: scaleY(.05);
    animation: none;
}
.vu-orb.winking .vu-eye:last-child {
    animation: eyeBlink 4s ease-in-out infinite;
}
.vu-orb.winking .vu-brow.left {
    transform: rotate(-18deg) translateY(-4px);
}
.vu-orb.winking .vu-cheek.left {
    opacity: .7;
}
.vu-orb.winking .vu-mouth {
    width: 60px;
    padding-bottom: 18px;
    border-radius: 0 0 70px 70px;
    border-bottom-width: 5px;
    transform: translateX(-50%) rotate(-3deg);
}

/* ── BORED ── */
.vu-orb.bored {
    animation: boredDroop 6s ease-in-out infinite;
}
.vu-orb.bored .vu-face-bot {
    animation: boredHeadDrop 6s ease-in-out infinite;
}
/* Heavy droopy eyelids */
.vu-orb.bored .vu-eye {
    height: 18px;
    border-top: 6px solid rgba(16,24,88,.55);
    border-radius: 35% 35% 50% 50%;
    animation: boredBlink 8s ease-in-out infinite;
    margin-top: 10px;
}
.vu-orb.bored .vu-pupil {
    opacity: .6;
    animation: boredPupil 8s ease-in-out infinite;
}
.vu-orb.bored .vu-brow {
    transform: rotate(3deg) translateY(6px);
}
.vu-orb.bored .vu-brow.right {
    transform: rotate(-3deg) translateY(6px);
}
/* Barely-there flat line */
.vu-orb.bored .vu-mouth {
    width: 40px;
    padding-bottom: 2px;
    border-radius: 0 0 40px 40px;
    border-bottom-width: 3px;
    bottom: 22px;
    animation: none;
}

@keyframes boredDroop {
    0%,100% { transform: translateY(0) rotate(0); }
    40%      { transform: translateY(3px) rotate(.3deg); }
    70%      { transform: translateY(1px) rotate(-.2deg); }
}
@keyframes boredHeadDrop {
    0%,100% { transform: rotate(0deg) translateY(0); }
    55%      { transform: rotate(2deg) translateY(3px); }
}
@keyframes boredBlink {
    0%,88%,100% { transform: scaleY(1); }
    92%          { transform: scaleY(.05); }
}
@keyframes boredPupil {
    0%,100% { transform: translate(0,3px); }
    30%      { transform: translate(-3px, 4px); }
    60%      { transform: translate(3px, 3px); }
}

/* ── OVERWHELMED ── */
.vu-orb.overwhelmed {
    animation: overwhelmedTremor .15s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 22px rgba(245,158,11,.45));
}
.vu-orb.overwhelmed .vu-face-bot {
    animation: overwhelmedSway 1s ease-in-out infinite;
}
/* Very wide open eyes */
.vu-orb.overwhelmed .vu-eye {
    height: 56px;
    animation: overwhelmedEye .9s ease-in-out infinite;
    box-shadow:
        inset 0 -5px 10px rgba(20,40,90,.12),
        0 3px 14px rgba(245,158,11,.2),
        0 0 0 2px rgba(245,158,11,.12);
}
.vu-orb.overwhelmed .vu-brow {
    transform: rotate(-22deg) translateY(-7px);
}
.vu-orb.overwhelmed .vu-brow.right {
    transform: rotate(22deg) translateY(-7px);
}
.vu-orb.overwhelmed .vu-cheek {
    opacity: .6;
    background: rgba(245,158,11,.2);
}
/* Slightly open O-ish mouth */
.vu-orb.overwhelmed .vu-mouth {
    width: 34px;
    padding-bottom: 22px;
    border-radius: 50%;
    border-left-color: #101858;
    border-right-color: #101858;
    border-top-color: #101858;
    border-width: 5px;
    background: transparent;
}

@keyframes overwhelmedTremor {
    0%   { transform: translate(-1px,-1px); }
    100% { transform: translate(1px,0); }
}
@keyframes overwhelmedSway {
    0%,100% { transform: rotate(0deg); }
    25%      { transform: rotate(-2.5deg); }
    75%      { transform: rotate(2deg); }
}
@keyframes overwhelmedEye {
    0%,100% { height: 56px; }
    45%      { height: 48px; }
}

/* ── EMBARRASSED ── */
.vu-orb.embarrassed {
    animation: embarrassedBob 3s ease-in-out infinite;
}
.vu-orb.embarrassed .vu-face-glow {
    background: radial-gradient(circle at 50% 60%, rgba(251,113,133,.3), transparent 48%) !important;
}
.vu-orb.embarrassed .vu-eye {
    height: 28px;
    animation: embarrassedEye 4s ease-in-out infinite;
    margin-top: 8px;
}
/* Eyes looking slightly downward via pupil position is handled by JS */
.vu-orb.embarrassed .vu-pupil {
    transform: translateY(4px);
    animation: none;
}
.vu-orb.embarrassed .vu-brow {
    transform: rotate(-5deg) translateY(2px);
}
.vu-orb.embarrassed .vu-brow.right {
    transform: rotate(5deg) translateY(2px);
}
.vu-orb.embarrassed .vu-cheek {
    opacity: .9;
    width: 32px;
    height: 18px;
    background: rgba(251,113,133,.35);
}
/* Small shy smile */
.vu-orb.embarrassed .vu-mouth {
    width: 38px;
    padding-bottom: 10px;
    border-radius: 0 0 50px 50px;
    border-bottom-width: 4px;
    transform: translateX(-50%) rotate(-2deg);
}

@keyframes embarrassedBob {
    0%,100% { transform: translateY(0) rotate(0); }
    40%      { transform: translateY(-4px) rotate(-.5deg); }
    70%      { transform: translateY(-2px) rotate(.4deg); }
}
@keyframes embarrassedEye {
    0%,85%,100% { transform: scaleY(1); }
    90%          { transform: scaleY(.1); }
}

/* ── CELEBRATING ── */
.vu-orb.celebrating {
    animation: celebrateJump .5s cubic-bezier(.4,0,.2,1) infinite alternate;
    filter: drop-shadow(0 0 26px rgba(66,133,244,.7));
}
.vu-orb.celebrating .vu-face-bot {
    animation: celebrateNod .5s ease-in-out infinite;
}
.vu-orb.celebrating .vu-eye {
    animation: celebrateEye .6s ease-in-out infinite;
}
.vu-orb.celebrating .vu-brow {
    transform: rotate(-18deg) translateY(-6px);
}
.vu-orb.celebrating .vu-brow.right {
    transform: rotate(18deg) translateY(-6px);
}
.vu-orb.celebrating .vu-cheek {
    opacity: 1;
    width: 30px;
    height: 16px;
}
.vu-orb.celebrating .vu-mouth {
    width: 80px;
    padding-bottom: 38px;
    border-radius: 0 0 96px 96px;
    border-bottom-width: 7px;
    border-bottom-color: #101858;
    background: #101858;
}

@keyframes celebrateJump {
    0%   { transform: translateY(0) scale(1); }
    100% { transform: translateY(-12px) scale(1.04); }
}
@keyframes celebrateNod {
    0%,100% { transform: rotate(0deg); }
    50%      { transform: rotate(-5deg) translateY(-3px); }
}
@keyframes celebrateEye {
    0%,100% { transform: scaleY(1); }
    45%      { transform: scaleY(.75); }
}

/* ── CURIOUS ── */
.vu-orb.curious {
    animation: curiousTilt 3s ease-in-out infinite;
}
.vu-orb.curious .vu-face-bot {
    animation: curiousHeadTilt 3s ease-in-out infinite;
}
.vu-orb.curious .vu-brow.left {
    transform: rotate(-16deg) translateY(-4px);
}
.vu-orb.curious .vu-brow.right {
    transform: rotate(6deg) translateY(2px);
}
.vu-orb.curious .vu-eye:first-child {
    height: 52px;
}
.vu-orb.curious .vu-eye:last-child {
    height: 38px;
}
.vu-orb.curious .vu-mouth {
    width: 44px;
    padding-bottom: 10px;
    border-radius: 0 0 50px 50px;
    border-bottom-width: 4px;
    transform: translateX(-50%) rotate(4deg);
}

@keyframes curiousTilt {
    0%,100% { transform: translateY(0) rotate(0); }
    40%      { transform: translateY(-5px) rotate(3deg); }
    70%      { transform: translateY(-3px) rotate(-1deg); }
}
@keyframes curiousHeadTilt {
    0%,100% { transform: rotate(0deg); }
    40%      { transform: rotate(6deg); }
}

/* ============================================================
   MOBILE & RESPONSIVE IMPROVEMENTS
   ============================================================ */

/* ── Small phones (≤ 390px) ── */
@media (max-width: 390px) {
    .vu-orb {
        width: 138px;
        height: 134px;
    }
    .vu-face-bot {
        width: 128px;
        height: 123px;
    }
    .vu-face-inner {
        width: 108px;
        height: 104px;
    }
    .vu-face-eyes { top: 32px; gap: 8px; }
    .vu-eye { width: 30px; height: 35px; }
    .vu-pupil { width: 12px; height: 14px; }
    .vu-brows { top: 22px; gap: 14px; }
    .vu-brow { width: 26px; }
    .vu-mouth { bottom: 12px; }
    .vu-center { height: 210px; margin-bottom: 100px; }
    .vu-controls {
        bottom: calc(max(8px, env(safe-area-inset-bottom)) + 20px);
        gap: 18px;
    }
    .vu-btn { width: 50px; height: 50px; }
    .vu-btn.primary { width: 62px; height: 62px; }
    .vu-subs { padding: 8px 16px; font-size: 13px; }
    .vu-sub-ai { font-size: 13px; }
    .vu-sub-user { font-size: 12px; }
    .bottom-nav-bar { width: 95%; padding: 6px 8px; }
    .nav-item { width: 42px; height: 42px; }
    .nav-item .material-icons-round { font-size: 20px; }
}

/* ── Standard mobile (≤ 480px) ── */
@media (max-width: 480px) {
    /* Tighter session chooser on small screens */
    .session-type-chooser {
        padding: 8px 14px 24px;
        gap: 14px;
    }
    .session-type-header h2 { font-size: 18px; }
    .session-type-header p { font-size: 12px; }
    .session-type-card { padding: 14px 14px; gap: 12px; }
    .session-type-card-icon { width: 42px; height: 42px; border-radius: 12px; }
    .session-type-card-body h3 { font-size: 14px; }

    /* Avatar sizing */
    .vu-orb { width: 152px; height: 148px; }
    .vu-face-bot { width: 142px; height: 136px; }
    .vu-face-inner { width: 120px; height: 116px; }
    .vu-face-eyes { top: 34px; gap: 8px; }
    .vu-eye { width: 32px; height: 38px; }
    .vu-pupil { width: 13px; height: 15px; }
    .vu-brows { top: 24px; gap: 14px; }
    .vu-brow { width: 28px; }
    .vu-mouth { bottom: 13px; }

    /* Controls tighter */
    .vu-controls {
        bottom: calc(max(10px, env(safe-area-inset-bottom)) + 24px);
        gap: 20px;
    }

    /* Step info compact */
    .vu-step-container { gap: 6px; }
    #vuStepBadgeText { font-size: 9px; }
    .vu-step-label { font-size: 11px; }

    /* Subtitle area */
    .vu-subs { padding: 8px 18px; gap: 12px; }

    /* Modals full width */
    .modal-sheet { border-radius: 20px 20px 0 0; }
    .report-card { border-radius: 20px 20px 0 0; max-height: 94vh; }



    /* Bottom nav — pill slightly wider on mobile */
    .bottom-nav-bar {
        width: 92%;
        max-width: 340px;
        padding: 7px 10px;
    }
}

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {
    .report-card { max-width: 100%; border-radius: var(--r24) var(--r24) 0 0; }
    .resume-card { max-width: 100%; }
}

/* ============================================================
   ULTRA-MODERN DESIGN ENHANCEMENTS
   ============================================================ */

/* Micro-interactions on interactive elements */
.session-type-card,
.chip,
.fab,
.vu-btn,
.btn-primary {
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
}

/* Improved orb glow layers per emotion */
.vu-orb.angry    .vu-face-glow { filter: blur(20px); opacity: .75; }
.vu-orb.excited  .vu-face-glow { filter: blur(22px); opacity: .8;  }
.vu-orb.peaceful .vu-face-glow { filter: blur(24px); opacity: .5;  }

/* Subtle pulsing ring around orb during speaking */
.vu-orb.speaking::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(66,133,244,.35);
    animation: speakRing 1s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes speakRing {
    0%,100% { transform: scale(1); opacity: .35; }
    50%      { transform: scale(1.06); opacity: .7; }
}

/* Listening pulse ring */
.vu-orb.listening::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(26,115,232,.3);
    animation: listenRing 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes listenRing {
    0%,100% { transform: scale(1); opacity: .3; }
    50%      { transform: scale(1.04); opacity: .55; }
}

/* Processing spinning arc */
.vu-orb.processing::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(66,133,244,.6);
    border-right-color: rgba(26,115,232,.3);
    animation: processingSpin 1.4s linear infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes processingSpin {
    to { transform: rotate(360deg); }
}

/* Sweat drop for nervous — pure CSS pseudo */
.vu-orb.nervous .vu-face-inner::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 14px;
    width: 6px;
    height: 9px;
    background: rgba(147,197,253,.7);
    border-radius: 50% 50% 60% 60% / 40% 40% 60% 60%;
    transform: rotate(-15deg);
    animation: sweatDrop 1.6s ease-in-out infinite;
    filter: blur(.5px);
}
@keyframes sweatDrop {
    0%,40%   { opacity: 0; transform: rotate(-15deg) translateY(-4px); }
    50%,90%  { opacity: 1; transform: rotate(-15deg) translateY(0); }
    100%     { opacity: 0; transform: rotate(-15deg) translateY(4px); }
}

/* Sparkle dots for celebrating */
.vu-orb.celebrating .vu-face-inner::before {
    content: '✦';
    position: absolute;
    top: 4px;
    right: 10px;
    font-size: 12px;
    color: rgba(253,224,71,.9);
    animation: sparkleSpin 1s linear infinite;
    line-height: 1;
}
@keyframes sparkleSpin {
    0%   { transform: rotate(0deg) scale(1);   opacity: 1; }
    50%  { transform: rotate(180deg) scale(1.3); opacity: .8; }
    100% { transform: rotate(360deg) scale(1);  opacity: 1; }
}

/* Improved app-bar glass effect */
.app-bar {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
}

/* Better bottom nav animation */
.bottom-nav-bar {
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.bottom-nav-bar.hidden {
    transform: translateX(-50%) translateY(120%);
    opacity: 0;
    pointer-events: none;
}

/* Nav active indicator dot */
.nav-item.active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #4285f4;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}
.nav-item { position: relative; }

/* Glass chip improved */
.chip {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Smooth page-transition feel for tabs */
.tab-content.active {
    display: flex;
    animation: tabFadeIn .22s ease-out both;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar polish for dark UI */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(66,133,244,.3) transparent;
}
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: rgba(66,133,244,.3);
    border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
    background: rgba(66,133,244,.55);
}

/* ============================================================
   EXCITE ANIMATED GRADIENT BG behind orb (voice mode only)
   ============================================================ */
.voice-overlay-ui::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(26,115,232,.07) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 75%, rgba(66,133,244,.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: bgShift 12s ease-in-out infinite alternate;
}
@keyframes bgShift {
    0%   { opacity: .6; transform: scale(1); }
    100% { opacity: 1;  transform: scale(1.05); }
}

/* Ensure voice overlay children are above pseudo */
.vu-top, .vu-center, .vu-subs, .vu-controls {
    position: relative;
    z-index: 1;
}

/* Sub-nav AI Coach (Avatar/Teks/Riwayat) — di layar sempit turun ke bawah step
   pill agar tidak tumpang tindih, dan mengecil supaya tetap muat. */
@media (max-width: 480px) {
    #coachSubnav {
        top: 54px !important;
        right: 8px !important;
        padding: 3px !important;
    }
    #coachSubnav .coach-subnav-btn {
        font-size: 16px !important;
        padding: 5px !important;
    }
}

/* ============================================================
   SOCIAL DASHBOARD — Avatar, Insights, Connections
   ============================================================ */

/* ── Avatar Circle ─────────────────────────────────────────── */
.sd-avatar {
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.sd-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.sd-avatar-ring {
    padding: 3px;
    background: linear-gradient(135deg, #4285f4, #1a73e8, #22d3ee);
    border-radius: 50%;
    display: inline-flex;
    flex-shrink: 0;
}
.sd-avatar-ring .sd-avatar { border: 2.5px solid var(--bg-card); }

/* ── Hero Header Card ──────────────────────────────────────── */
.sd-hero {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.sd-hero::before {
    content:'';
    position:absolute; top:-40px; right:-40px;
    width:160px; height:160px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(66,133,244,.2),transparent 70%);
    pointer-events:none;
}
.sd-hero::after {
    content:'';
    position:absolute; bottom:-30px; left:20%;
    width:100px; height:100px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(26,115,232,.15),transparent 70%);
    pointer-events:none;
}
.sd-hero-info { flex:1; position:relative; z-index:1; min-width:0; }
.sd-hero-greeting { font-size:12px; color:color-mix(in srgb, var(--tx-primary) 55%, transparent); margin-bottom:2px; }
.sd-hero-name { font-size:22px; font-weight:800; color:var(--tx-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sd-hero-meta { font-size:12px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sd-hero-badges { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.sd-badge { background:color-mix(in srgb, var(--tx-primary) 8%, transparent); border-radius:10px; padding:5px 10px; text-align:center; }
.sd-badge-val { font-size:15px; font-weight:800; color:var(--tx-primary); line-height:1; }
.sd-badge-lbl { font-size:9px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); line-height:1.2; margin-top:2px; }
.sd-hero-edit {
    position:absolute; top:14px; right:14px;
    width:32px; height:32px; border-radius:50%; border:none;
    background:color-mix(in srgb, var(--tx-primary) 8%, transparent);
    color:color-mix(in srgb, var(--tx-primary) 60%, transparent);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; transition:var(--trans); z-index:2;
    font-family:'Material Icons Round'; font-size:18px;
}
.sd-hero-edit:hover { background:color-mix(in srgb, var(--tx-primary) 14%, transparent); color:var(--tx-primary); }
.sd-avatar-wrap { position:relative; cursor:pointer; z-index:1; }
.sd-avatar-upload-hint {
    position:absolute; inset:0; border-radius:50%;
    background:rgba(0,0,0,.5); display:flex; align-items:center;
    justify-content:center; opacity:0; transition:opacity .2s; color:#fff; font-size:20px;
    font-family:'Material Icons Round';
}
.sd-avatar-wrap:hover .sd-avatar-upload-hint { opacity:1; }

/* ── Insight Cards ─────────────────────────────────────────── */
.sd-insights-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.sd-insight-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.sd-insight-card.full-width { grid-column:1/-1; }
.sd-insight-title {
    font-size:11px; font-weight:700;
    color:color-mix(in srgb, var(--tx-primary) 50%, transparent);
    text-transform:uppercase; letter-spacing:.04em;
    display:flex; align-items:center; gap:5px;
}
.sd-insight-title .material-icons-round { font-size:14px; }

/* Bar Chart */
.sd-bar-chart { display:flex; align-items:flex-end; gap:4px; height:60px; }
.sd-bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; height:100%; justify-content:flex-end; }
.sd-bar { width:100%; border-radius:5px 5px 0 0; background:linear-gradient(to top,#1a73e8,#4285f4); min-height:3px; transition:height .4s cubic-bezier(.34,1.56,.64,1); }
.sd-bar.empty { background:color-mix(in srgb, var(--tx-primary) 8%, transparent); }
.sd-bar.today { background:linear-gradient(to top,#22c55e,#34d399); }
.sd-bar-day { font-size:9px; color:color-mix(in srgb, var(--tx-primary) 40%, transparent); font-weight:600; }

/* Donut Chart */


/* Heatmap */
.sd-heatmap { display:flex; flex-direction:column; gap:3px; }
.sd-heatmap-row { display:flex; gap:3px; }
.sd-heatmap-cell {
    width:12px; height:12px; border-radius:3px;
    background:color-mix(in srgb, var(--tx-primary) 8%, transparent);
    transition:background .2s; cursor:default; flex-shrink:0;
}
.sd-heatmap-cell[data-level="1"] { background:rgba(26,115,232,.25); }
.sd-heatmap-cell[data-level="2"] { background:rgba(26,115,232,.5); }
.sd-heatmap-cell[data-level="3"] { background:rgba(26,115,232,.75); }
.sd-heatmap-cell[data-level="4"] { background:#1a73e8; }
.sd-heatmap-cell.today-cell { outline:1.5px solid #4285f4; outline-offset:1px; }

/* ── Connections ───────────────────────────────────────────── */
.sd-section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:2px; }
.sd-feature-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; }
.sd-feature-item { display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; }
.sd-feature-item:active { transform: scale(0.94); }
.sd-feature-icon { width:52px; height:52px; border-radius:16px; display:flex; align-items:center; justify-content:center; transition:transform 0.15s; }
.sd-feature-icon .material-icons-round { font-size:24px; }
.sd-feature-item:hover .sd-feature-icon { transform:scale(1.08); }
.sd-feature-label { font-size:10px; font-weight:600; color:color-mix(in srgb, var(--tx-primary) 70%, transparent); text-align:center; line-height:1.2; }
.sd-section-title { font-size:13px; font-weight:700; color:var(--tx-primary); display:flex; align-items:center; gap:6px; }
.sd-section-title .material-icons-round { font-size:16px; }
.sd-section-action {
    font-size:12px; font-weight:600; color:#4285f4;
    background:none; border:none; cursor:pointer;
    padding:4px 8px; border-radius:8px; transition:background .2s; font-family:var(--font);
}
.sd-section-action:hover { background:rgba(66,133,244,.1); }
.sd-conn-grid { display:flex; gap:12px; flex-wrap:wrap; }
.sd-conn-item { display:flex; flex-direction:column; align-items:center; gap:5px; cursor:pointer; position:relative; }
.sd-conn-item:hover .sd-conn-avatar { transform:scale(1.06); }
.sd-conn-avatar { transition:transform .2s cubic-bezier(.34,1.56,.64,1); }
.sd-conn-name { font-size:10px; font-weight:600; color:var(--tx-primary); max-width:54px; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sd-conn-role { font-size:9px; color:color-mix(in srgb, var(--tx-primary) 45%, transparent); max-width:54px; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sd-conn-add-btn {
    width:54px; height:54px; border-radius:50%;
    border:2px dashed color-mix(in srgb, var(--tx-primary) 20%, transparent);
    background:color-mix(in srgb, var(--tx-primary) 4%, transparent);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; color:color-mix(in srgb, var(--tx-primary) 40%, transparent);
    font-size:22px; transition:var(--trans); font-family:'Material Icons Round';
}
.sd-conn-add-btn:hover { border-color:#4285f4; background:rgba(66,133,244,.08); color:#4285f4; transform:scale(1.05); }
.sd-pending-badge {
    position:absolute; top:-3px; right:-3px;
    min-width:16px; height:16px; border-radius:8px;
    background:#ef4444; color:#fff; font-size:9px; font-weight:700;
    display:flex; align-items:center; justify-content:center;
    padding:0 3px; border:2px solid var(--bg-card); z-index:1;
}

/* ── Activity Feed ─────────────────────────────────────────── */
.sd-feed-item { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid color-mix(in srgb, var(--tx-primary) 6%, transparent); }
.sd-feed-item:last-child { border-bottom:none; }
.sd-feed-text { flex:1; font-size:12px; color:var(--tx-primary); line-height:1.4; }
.sd-feed-text strong { font-weight:700; }
.sd-feed-time { font-size:10px; color:color-mix(in srgb, var(--tx-primary) 40%, transparent); white-space:nowrap; margin-top:2px; }

/* ── Modal (bottom sheet) ──────────────────────────────────── */
.sd-modal-overlay {
    position:fixed; inset:0; z-index:4000;
    background:rgba(0,0,0,.6);
    display:flex; align-items:flex-end; justify-content:center;
    animation:sdOverlayIn .2s ease;
}
@keyframes sdOverlayIn { from{opacity:0} to{opacity:1} }
.sd-modal {
    background:var(--bg-card); border-radius:28px 28px 0 0;
    padding:24px 20px 40px; width:100%; max-width:520px; max-height:90vh;
    overflow-y:auto; animation:sdModalUp .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes sdModalUp { from{transform:translateY(60px);opacity:0} to{transform:translateY(0);opacity:1} }
.sd-modal-handle { width:36px; height:4px; border-radius:2px; background:color-mix(in srgb, var(--tx-primary) 15%, transparent); margin:0 auto 18px; }
.sd-modal-title { font-size:18px; font-weight:800; color:var(--tx-primary); margin-bottom:16px; }
.sd-search-input { width:100%; padding:12px 16px; border-radius:14px; border:1.5px solid var(--border); background:var(--bg-input); color:var(--tx-primary); font-size:14px; font-family:var(--font); outline:none; transition:border-color .2s; }
.sd-search-input:focus { border-color:#4285f4; }
.sd-search-results { margin-top:10px; display:flex; flex-direction:column; gap:6px; }
.sd-search-result-item { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:var(--bg-card2); cursor:pointer; transition:background .15s; }
.sd-search-result-item:hover { background:rgba(66,133,244,.08); }
.sd-search-result-info { flex:1; min-width:0; }
.sd-search-result-name { font-size:14px; font-weight:600; color:var(--tx-primary); }
.sd-search-result-meta { font-size:11px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sd-conn-form { display:flex; flex-direction:column; gap:12px; margin-top:4px; animation:sdFadeIn .2s ease; }
@keyframes sdFadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.sd-conn-form label { font-size:11px; font-weight:700; color:color-mix(in srgb, var(--tx-primary) 55%, transparent); text-transform:uppercase; letter-spacing:.04em; display:block; margin-bottom:4px; }
.sd-conn-form input,.sd-conn-form select { width:100%; padding:10px 14px; border-radius:12px; border:1.5px solid var(--border); background:var(--bg-input); color:var(--tx-primary); font-size:13px; font-family:var(--font); outline:none; transition:border-color .2s; }
.sd-conn-form input:focus,.sd-conn-form select:focus { border-color:#4285f4; }
.sd-perm-row { display:flex; gap:8px; }
.sd-perm-chip { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 6px; border-radius:12px; border:1.5px solid var(--border); background:var(--bg-input); cursor:pointer; transition:var(--trans); user-select:none; text-align:center; }
.sd-perm-chip.active { border-color:#4285f4; background:rgba(66,133,244,.1); }
.sd-perm-chip .material-icons-round { font-size:18px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); }
.sd-perm-chip.active .material-icons-round { color:#4285f4; }
.sd-perm-chip span:last-child { font-size:10px; font-weight:600; color:color-mix(in srgb, var(--tx-primary) 60%, transparent); }
.sd-perm-chip.active span:last-child { color:#4285f4; }
.sd-btn-primary { width:100%; padding:15px; border-radius:16px; border:none; background:linear-gradient(135deg,#1a73e8,#4285f4); color:#fff; font-size:14px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:opacity .2s,transform .15s; font-family:var(--font); box-shadow:0 6px 20px rgba(66,133,244,.3); }
.sd-btn-primary:hover { opacity:.92; transform:translateY(-1px); }
.sd-btn-primary:active { transform:translateY(0); }
.sd-btn-primary:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.sd-btn-ghost { width:100%; padding:13px; border-radius:14px; border:1.5px solid var(--border); background:none; color:var(--tx-primary); font-size:13px; font-weight:600; cursor:pointer; font-family:var(--font); transition:background .15s; }
.sd-btn-ghost:hover { background:color-mix(in srgb, var(--tx-primary) 5%, transparent); }

/* Peer modal */
.sd-peer-header { display:flex; flex-direction:column; align-items:center; gap:10px; padding:10px 0 18px; border-bottom:1px solid color-mix(in srgb, var(--tx-primary) 8%, transparent); margin-bottom:16px; }
.sd-peer-name { font-size:20px; font-weight:800; color:var(--tx-primary); text-align:center; }
.sd-peer-meta { font-size:12px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); text-align:center; }
.sd-peer-tabs { display:flex; gap:0; border-radius:12px; background:color-mix(in srgb, var(--tx-primary) 6%, transparent); padding:3px; margin-bottom:14px; }
.sd-peer-tab { flex:1; padding:8px; border:none; background:none; border-radius:10px; font-size:12px; font-weight:600; color:color-mix(in srgb, var(--tx-primary) 55%, transparent); cursor:pointer; transition:var(--trans); font-family:var(--font); }
.sd-peer-tab.active { background:var(--bg-card); color:var(--tx-primary); box-shadow:var(--s1); }


/* Pending card */
.sd-pending-card { background:linear-gradient(135deg,rgba(66,133,244,.08),rgba(26,115,232,.06)); border:1px solid rgba(66,133,244,.2); border-radius:16px; padding:14px; display:flex; align-items:center; gap:12px; }
.sd-pending-card-info { flex:1; min-width:0; }
.sd-pending-card-name { font-size:13px; font-weight:700; color:var(--tx-primary); }
.sd-pending-card-desc { font-size:11px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); margin-top:1px; }
.sd-pending-btns { display:flex; gap:6px; flex-shrink:0; }
.sd-accept-btn { padding:7px 14px; border-radius:10px; border:none; background:linear-gradient(135deg,#1a73e8,#4285f4); color:#fff; font-size:12px; font-weight:700; cursor:pointer; font-family:var(--font); }
.sd-decline-btn { padding:7px 12px; border-radius:10px; border:1px solid var(--border); background:none; color:color-mix(in srgb, var(--tx-primary) 55%, transparent); font-size:12px; font-weight:600; cursor:pointer; font-family:var(--font); }

/* Empty state */
.sd-empty { text-align:center; padding:24px 16px; color:color-mix(in srgb, var(--tx-primary) 40%, transparent); font-size:13px; }
.sd-empty .material-icons-round { font-size:36px; display:block; margin-bottom:8px; color:color-mix(in srgb, var(--tx-primary) 25%, transparent); }

/* RKH tasks */
.sd-task-list { display:flex; flex-direction:column; gap:0; }
.sd-task-item { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid color-mix(in srgb, var(--tx-primary) 5%, transparent); }
.sd-task-item:last-child { border-bottom:none; }
.sd-task-check { width:20px; height:20px; border-radius:50%; border:2px solid var(--border); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; transition:var(--trans); background:none; }
.sd-task-check.done { border-color:#22c55e; background:#22c55e; color:#fff; }
.sd-task-check .material-icons-round { font-size:13px; }
.sd-task-text { font-size:13px; color:var(--tx-primary); flex:1; line-height:1.35; }
.sd-task-text.done { text-decoration:line-through; color:color-mix(in srgb, var(--tx-primary) 40%, transparent); }
.sd-progress-bar-wrap { height:6px; border-radius:3px; background:color-mix(in srgb, var(--tx-primary) 8%, transparent); overflow:hidden; margin-top:4px; }
.sd-progress-bar-fill { height:100%; border-radius:3px; background:linear-gradient(90deg,#1a73e8,#22c55e); transition:width .5s cubic-bezier(.34,1.56,.64,1); }

/* Connection manager in Akun */
.sd-conn-manage-item { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid color-mix(in srgb, var(--tx-primary) 6%, transparent); }
.sd-conn-manage-item:last-child { border-bottom:none; }
.sd-conn-manage-info { flex:1; min-width:0; }
.sd-conn-manage-name { font-size:13px; font-weight:600; color:var(--tx-primary); }
.sd-conn-manage-meta { font-size:11px; color:color-mix(in srgb, var(--tx-primary) 50%, transparent); }
.sd-conn-perm-pills { display:flex; gap:4px; flex-wrap:wrap; margin-top:3px; }
.sd-perm-pill { font-size:9px; font-weight:700; padding:2px 6px; border-radius:6px; background:rgba(26,115,232,.12); color:#1a73e8; }

/* Spinner */
.sd-spinner { width:20px; height:20px; border:2.5px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:sdSpin .7s linear infinite; }
@keyframes sdSpin { to{transform:rotate(360deg)} }

/* ========================================================
   STORY / WRAPPED MODAL STYLES (RANGKUMAN BULANAN)
   ======================================================== */
.story-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex; flex-direction: column;
}
.story-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #1e1b4b, #3b0764, #4c1d95);
    background-size: 200% 200%;
    animation: storyBgAnim 15s ease infinite;
    z-index: 1;
}
@keyframes storyBgAnim { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.story-header {
    position: relative; z-index: 10;
    padding: 15px 10px 0;
    display: flex; flex-direction: column; gap: 8px;
}
.story-progress-container {
    display: flex; gap: 4px; width: 100%;
}
.story-progress-bar {
    flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden;
}
.story-progress-fill {
    height: 100%; background: #fff; width: 0%;
}
.story-controls {
    display: flex; justify-content: space-between; align-items: center; padding: 0 5px;
}
.story-close {
    background: none; border: none; color: #fff; cursor: pointer; padding: 5px; opacity: 0.8;
}
.story-content {
    position: relative; z-index: 10; flex: 1;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 30px 20px; text-align: center; color: #fff;
    overflow: hidden;
}
.story-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 30px 20px;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.story-slide.active {
    opacity: 1; pointer-events: auto;
}
.story-tap-area {
    position: absolute; top: 80px; bottom: 0; width: 100%; z-index: 20; display: flex;
}
.story-tap-left { flex: 1; }
.story-tap-right { flex: 2; }
.story-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 24px; padding: 24px;
    width: 100%; max-width: 340px; margin: 0 auto; text-align: left;
}
.story-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.story-stat-row:last-child { border-bottom: none; }
.story-stat-val { font-size: 24px; font-weight: 800; color: #4285f4; }
.story-pill {
    background: rgba(255,255,255,0.15); padding: 6px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 600; margin-bottom: 15px; display: inline-block;
}

/* ── Avatar Ring ────────────────────────────────────────────────── */
@keyframes avatarRingSpin {
    0%   { --ring-angle: 0deg; }
    100% { --ring-angle: 360deg; }
}
@property --ring-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
.avatar-ring {
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(from var(--ring-angle), #4285f4, #1a73e8, #669df6, #ff7a2f, #4285f4);
    animation: avatarRingSpin 3s linear infinite;
    box-shadow:
        0 0 18px rgba(66,133,244, 0.35),
        0 0 40px rgba(26,115,232, 0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}
.avatar-ring > img,
.avatar-ring > div {
    border: 3px solid var(--bg-card2, #fff);
    border-radius: 50%;
    position: relative;
    z-index: 1;
}
.avatar-ring:hover {
    transform: scale(1.06);
    box-shadow:
        0 0 24px rgba(66,133,244, 0.5),
        0 0 56px rgba(26,115,232, 0.25);
}
.avatar-ring::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from var(--ring-angle), transparent 60%, rgba(255,255,255,0.35) 80%, transparent 100%);
    animation: avatarRingSpin 2s linear infinite;
    pointer-events: none;
}
