.prism-assistant {
    position: fixed;
    top: 148px;
    left: 40px;
    z-index: 80;
    width: min(270px, calc(100vw - 56px));
    color: #1f3037;
    font-family: Arial, Helvetica, sans-serif;
    overflow: visible;
}

.prism-assistant * {
    box-sizing: border-box;
}

.prism-assistant-shell {
    position: relative;
    overflow: visible;
    border: 1px solid #cfe1dd;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 16px 38px rgba(23, 39, 48, 0.16);
}

.prism-assistant-top {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px 14px 14px;
    text-align: center;
}

.prism-assistant-title {
    margin: 0;
    color: #17353b;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0;
}

.prism-assistant-mark {
    position: relative;
    display: grid;
    place-items: center;
    overflow: visible !important;
    width: 140px;
    height: 140px;
    margin-top: 4px;
    border: 1px solid #d7eee8;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 58%, #effaf6 100%);
    box-shadow: 0 10px 26px rgba(37, 130, 108, 0.16);
    cursor: pointer;
    animation: prismBreath 2.5s ease-in-out infinite;
}

.prism-assistant-mark:hover,
.prism-assistant-mark:focus-visible {
    border-color: #25826c;
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 130, 108, 0.16), 0 12px 30px rgba(37, 130, 108, 0.24);
}

.prism-assistant-mark:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.prism-assistant-mark img {
    width: 118px;
    max-width: 100%;
    pointer-events: none;
}

.prism-assistant.is-running .prism-assistant-mark {
    border-color: #1497c8;
    box-shadow: 0 0 0 5px rgba(20, 151, 200, 0.16), 0 12px 30px rgba(20, 151, 200, 0.24);
}

.prism-assistant-mark::after,
.prism-assistant-state {
    position: absolute;
    top: 7px;
    left: 6px;
    z-index: 3;
    min-width: 34px;
    padding: 3px 7px;
    border: 1px solid #bfded7;
    border-radius: 999px;
    background: #ffffff;
    color: #6b7b82;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(23, 39, 48, 0.14);
    pointer-events: none;
}

.prism-assistant-mark::after {
    content: "Off";
    display: block !important;
}

.prism-assistant-state {
    display: none !important;
}

.prism-assistant.is-running .prism-assistant-mark::after,
.prism-assistant.is-running .prism-assistant-state {
    border-color: #1497c8;
    background: #1497c8;
    color: #ffffff;
}

.prism-assistant.is-running .prism-assistant-mark::after {
    content: "On";
}

.prism-assistant-hint {
    color: #25826c;
    font-size: 0.92rem;
    font-weight: 900;
}

.prism-assistant-status {
    min-height: 18px;
    color: #607179;
    font-size: 0.82rem;
}

.prism-speak-now {
    width: 100%;
    border: 1px solid #1497c8;
    background: #1497c8;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(20, 151, 200, 0.2);
}

.prism-assistant-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 14px 16px;
}

.prism-assistant button {
    min-height: 42px;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
}

.prism-assistant button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.prism-assistant .prism-stop {
    border: 1px solid #cfdedb;
    background: #ffffff;
    color: #687a80;
}

.prism-assistant .prism-contact-toggle {
    border: 1px solid #25826c;
    background: #25826c;
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(37, 130, 108, 0.18);
}

.prism-contact-panel {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 12px);
    width: min(340px, calc(100vw - 350px));
    gap: 8px;
    max-height: min(520px, calc(100vh - 172px));
    min-height: 0;
    padding: 18px 20px;
    border: 1px solid #cfe1dd;
    border-radius: 8px;
    background: #fbfcfc;
    box-shadow: 0 16px 38px rgba(23, 39, 48, 0.18);
}

.prism-contact-panel.is-open {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    animation: prismDrawerIn 150ms ease-out;
}

.prism-contact-fields {
    display: grid;
    gap: 16px;
    min-height: 0;
    overflow-y: auto;
    padding: 0 !important;
    overscroll-behavior: contain;
}

.prism-contact-field {
    display: grid !important;
    grid-template-rows: auto auto;
    gap: 8px;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.prism-contact-field > label {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #52646c;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.25;
    text-align: left;
}

.prism-contact-panel input,
.prism-contact-panel textarea {
    display: block !important;
    clear: both;
    float: none !important;
    position: static !important;
    width: 100%;
    min-width: 0;
    height: 50px;
    margin: 0 !important;
    border: 1px solid #cfd9dd;
    border-radius: 8px;
    padding: 10px 12px;
    color: #1f3037;
    background: #fff;
    font: inherit;
    line-height: 1.25;
}

.prism-contact-panel textarea {
    height: auto;
    min-height: 94px;
    resize: vertical;
}

.prism-contact-foot {
    display: flex;
    justify-content: center;
    padding: 18px 0 0;
    border-top: 1px solid #e1e9eb;
    background: #fbfcfc;
    border-radius: 0 0 8px 8px;
}

.prism-contact-submit {
    display: block !important;
    width: 80%;
    min-width: 190px;
    margin-right: auto !important;
    margin-left: auto !important;
    border: 1px solid #25826c;
    background: #25826c;
    color: #ffffff;
    box-shadow: 0 -8px 14px rgba(251, 252, 252, 0.94);
}

.prism-assistant-log {
    display: none;
}

@media (min-width: 701px) and (max-width: 760px) {
    .prism-contact-panel {
        position: fixed;
        top: 112px;
        right: 24px;
        bottom: 24px;
        left: 24px;
        width: auto;
        max-height: none;
    }
}

@keyframes prismBreath {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.055);
    }
}

@keyframes prismDrawerIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 700px) {
    .prism-assistant {
        top: 8px;
        right: 126px;
        left: auto;
        z-index: 9998;
        width: 58px;
        height: 58px;
        color: #17353b;
    }

    .prism-assistant-shell {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .prism-assistant-top {
        display: block;
        padding: 0;
        text-align: left;
    }

    .prism-assistant-title,
    .prism-assistant-hint,
    .prism-speak-now,
    .prism-assistant-status,
    .prism-assistant-actions {
        display: none;
    }

    .prism-assistant-mark {
        width: 54px;
        height: 54px;
        margin: 0;
        border: 2px solid rgba(255, 255, 255, 0.78);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
    }

    .prism-assistant-mark img {
        width: 44px;
    }

    .prism-assistant-mark::after,
    .prism-assistant-state {
        top: -5px;
        left: -7px;
        z-index: 4;
        min-width: 28px;
        padding: 3px 5px;
        font-size: 0.58rem;
    }

    .prism-contact-panel {
        position: fixed;
        top: 74px;
        right: 14px;
        bottom: 14px;
        left: 14px;
        width: auto;
        z-index: 9999;
        max-height: none;
        padding: 16px !important;
        border: 1px solid #cfe1dd;
        border-radius: 10px;
        background: #fbfcfc;
        box-shadow: 0 18px 44px rgba(23, 39, 48, 0.28);
    }

    .prism-contact-panel.is-open {
        display: grid;
    }

    .prism-contact-fields {
        padding: 0 !important;
    }

    .prism-contact-foot {
        padding: 16px 0 0;
    }
}

@media (max-width: 420px) {
    .prism-assistant {
        right: 108px;
        left: auto;
        top: 10px;
    }

    .prism-assistant-mark {
        width: 50px;
        height: 50px;
    }

    .prism-assistant-mark img {
        width: 40px;
    }
}
