:root {
    --developer-contact-accent: #7c5cff;
    --developer-contact-accent-bright: #9b86ff;
    --developer-contact-panel: rgba(10, 12, 24, 0.96);
    --developer-contact-text: #f7f7fb;
    --developer-contact-muted: #aeb5ca;
    --developer-contact-border: rgba(255, 255, 255, 0.12);
}

.developer-contact {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1300;
    font-family: var(--studio-font, var(--font-body), Inter, Arial, sans-serif);
    color: var(--developer-contact-text);
}

.developer-contact *,
.developer-contact *::before,
.developer-contact *::after {
    box-sizing: border-box;
}

.developer-contact-tab {
    position: fixed;
    right: 0;
    bottom: 72px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 142px;
    gap: 10px;
    padding: 14px 11px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0.015em;
    text-decoration: none;
    background:
        radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.22), transparent 32%),
        linear-gradient(160deg, #8a6cff 0%, #5c3fdf 56%, #38259d 100%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-right: 0;
    border-radius: 13px 0 0 13px;
    box-shadow: -10px 10px 30px rgba(31, 20, 97, 0.38);
    isolation: isolate;
    transition: width 180ms ease, transform 180ms ease, box-shadow 180ms ease, opacity 140ms ease;
}

.developer-contact-tab::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 45%);
    opacity: 0;
    transition: opacity 180ms ease;
}

.developer-contact-tab > span:last-child {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.developer-contact-tab:hover,
.developer-contact-tab:focus-visible {
    width: 54px;
    color: #fff;
    transform: translateX(-2px);
    box-shadow: -14px 14px 34px rgba(31, 20, 97, 0.5);
    outline: none;
}

.developer-contact-tab:hover::before,
.developer-contact-tab:focus-visible::before {
    opacity: 1;
}

.developer-contact-tab:focus-visible {
    box-shadow: 0 0 0 3px #fff, -14px 14px 34px rgba(31, 20, 97, 0.5);
}

.developer-contact-mark,
.developer-contact-signature-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    transform: rotate(45deg);
}

.developer-contact.is-open .developer-contact-tab {
    pointer-events: none;
    opacity: 0;
    transform: translateX(100%);
}

.developer-contact-panel {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 40px));
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    color: var(--developer-contact-text);
    background:
        radial-gradient(circle at 8% 0%, rgba(124, 92, 255, 0.22), transparent 16rem),
        var(--developer-contact-panel);
    border: 1px solid var(--developer-contact-border);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(124, 92, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(calc(100% + 30px), 0, 0) scale(0.98);
    transform-origin: right bottom;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease, visibility 0s linear 220ms;
}

.developer-contact.is-open .developer-contact-panel {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0) scale(1);
    transition-delay: 0s;
}

.developer-contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--developer-contact-border);
}

.developer-contact-identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.developer-contact-logo {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    background: rgba(124, 92, 255, 0.12);
    border: 1px solid rgba(155, 134, 255, 0.45);
    border-radius: 12px;
}

.developer-contact-logo span {
    width: 13px;
    height: 13px;
    border: 1.5px solid var(--developer-contact-accent-bright);
    border-radius: 3px;
    transform: rotate(45deg);
}

.developer-contact-kicker,
.developer-contact-identity h2,
.developer-contact-question,
.developer-contact-copy,
.developer-contact-response-time,
.developer-contact-status {
    margin: 0;
}

.developer-contact-kicker {
    margin-bottom: 3px;
    color: var(--developer-contact-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.developer-contact-identity h2 {
    overflow: hidden;
    color: var(--developer-contact-text);
    font-size: 15px;
    font-weight: 780;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.developer-contact-close {
    position: relative;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--developer-contact-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--developer-contact-border);
    border-radius: 12px;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.developer-contact-close span::before,
.developer-contact-close span::after {
    position: absolute;
    top: 18px;
    left: 11px;
    width: 15px;
    height: 1.5px;
    content: "";
    background: currentColor;
    border-radius: 1px;
}

.developer-contact-close span::before {
    transform: rotate(45deg);
}

.developer-contact-close span::after {
    transform: rotate(-45deg);
}

.developer-contact-close:hover,
.developer-contact-close:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.24);
    outline: none;
}

.developer-contact-close:focus-visible,
.developer-contact-intent:focus-visible,
.developer-contact-submit:focus-visible,
.developer-contact-footer a:focus-visible,
.developer-contact-form textarea:focus-visible {
    outline: 2px solid var(--developer-contact-accent-bright);
    outline-offset: 2px;
}

.developer-contact-body {
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 134, 255, 0.38) transparent;
}

.developer-contact-question {
    color: var(--developer-contact-text);
    font-size: 22px;
    font-weight: 780;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.developer-contact-copy {
    margin-top: 7px;
    color: var(--developer-contact-muted);
    font-size: 13px;
    line-height: 1.5;
}

.developer-contact-intents {
    display: grid;
    gap: 9px;
    margin-top: 18px;
}

.developer-contact-intent {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    align-items: center;
    width: 100%;
    min-height: 50px;
    gap: 10px;
    padding: 10px 12px;
    color: #dfe3ef;
    font: inherit;
    font-size: 13px;
    font-weight: 680;
    line-height: 1.3;
    text-align: left;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--developer-contact-border);
    border-radius: 13px;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.developer-contact-intent:hover {
    color: #fff;
    background: rgba(124, 92, 255, 0.1);
    border-color: rgba(155, 134, 255, 0.34);
    transform: translateY(-1px);
}

.developer-contact-intent.is-selected {
    color: #fff;
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.19), rgba(124, 92, 255, 0.06));
    border-color: rgba(155, 134, 255, 0.62);
}

.developer-contact-intent-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--developer-contact-accent-bright);
    background: rgba(124, 92, 255, 0.13);
    border-radius: 8px;
}

.developer-contact-intent-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.developer-contact-intent-check {
    width: 15px;
    height: 15px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
}

.developer-contact-intent.is-selected .developer-contact-intent-check {
    background: var(--developer-contact-accent);
    border: 4px solid #22184f;
    box-shadow: 0 0 0 1px var(--developer-contact-accent-bright);
}

.developer-contact-form {
    margin-top: 18px;
}

.developer-contact-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    color: var(--developer-contact-muted);
    font-size: 11px;
    line-height: 1.3;
}

.developer-contact-field-head label {
    color: #dfe3ef;
    font-size: 12px;
    font-weight: 700;
}

.developer-contact-form textarea {
    display: block;
    width: 100%;
    min-height: 112px;
    resize: vertical;
    padding: 12px 13px;
    color: #fff;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--developer-contact-border);
    border-radius: 13px;
    caret-color: var(--developer-contact-accent-bright);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.developer-contact-form textarea::placeholder {
    color: #7e859a;
}

.developer-contact-form textarea:hover,
.developer-contact-form textarea:focus {
    background: rgba(0, 0, 0, 0.32);
    border-color: rgba(155, 134, 255, 0.48);
}

.developer-contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 47px;
    gap: 9px;
    margin-top: 10px;
    padding: 10px 15px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 760;
    background: linear-gradient(135deg, #8a6cff, #5e42db);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    box-shadow: 0 12px 28px rgba(64, 42, 167, 0.34);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.developer-contact-submit svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.developer-contact-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 15px 34px rgba(64, 42, 167, 0.44);
}

.developer-contact-response-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
    color: var(--developer-contact-muted);
    font-size: 11px;
    line-height: 1.4;
}

.developer-contact-status-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    background: #60d69a;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(96, 214, 154, 0.1);
}

.developer-contact-status {
    min-height: 0;
    color: #c7f5dd;
    font-size: 11px;
    line-height: 1.4;
}

.developer-contact-status:not(:empty) {
    margin-top: 8px;
}

.developer-contact-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 13px 20px 15px;
    color: #777f94;
    font-size: 10px;
    line-height: 1.35;
    border-top: 1px solid var(--developer-contact-border);
}

.developer-contact-footer a {
    color: #aeb5ca;
    text-decoration: none;
}

.developer-contact-footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.developer-contact-signature {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
}

.developer-contact-signature-mark {
    width: 8px;
    height: 8px;
    color: var(--developer-contact-accent-bright);
    border-radius: 2px;
}

@media (max-width: 640px) {
    .developer-contact-tab {
        bottom: calc(24px + env(safe-area-inset-bottom));
        width: 46px;
        min-height: 118px;
        padding: 12px 10px;
        font-size: 12px;
        border-radius: 12px 0 0 12px;
    }

    .developer-contact-panel {
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: min(88dvh, 720px);
        padding-bottom: env(safe-area-inset-bottom);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
        transform: translate3d(0, calc(100% + 20px), 0);
    }

    .developer-contact-header {
        padding: 16px 16px 13px;
    }

    .developer-contact-body {
        padding: 17px 16px;
    }

    .developer-contact-question {
        font-size: 20px;
    }

    .developer-contact-footer {
        padding: 12px 16px 14px;
    }
}

@media (max-height: 680px) and (min-width: 641px) {
    .developer-contact-panel {
        right: 12px;
        bottom: 12px;
        max-height: calc(100dvh - 24px);
    }

    .developer-contact-header {
        padding-top: 14px;
        padding-bottom: 12px;
    }

    .developer-contact-body {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .developer-contact-intents,
    .developer-contact-form {
        margin-top: 12px;
    }

    .developer-contact-form textarea {
        min-height: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .developer-contact-tab,
    .developer-contact-panel,
    .developer-contact-intent,
    .developer-contact-submit {
        scroll-behavior: auto;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .developer-contact {
        display: none !important;
    }
}
