:root {
    --aha-q-point: var(--aha-primary);
    --aha-q-point-hover: var(--aha-primary-hover);
    --aha-q-surface: rgba(17, 17, 22, .94);
    --aha-q-surface-solid: #111116;
    --aha-q-text: #f7f5f1;
    --aha-q-line: rgba(255, 255, 255, .11);
    --aha-q-shadow: rgba(0, 0, 0, .28);
    --aha-q-overlay: rgba(5, 5, 7, .72);
}

body.aha-light-theme {
    --aha-q-surface: rgba(255, 255, 255, .96);
    --aha-q-surface-solid: #fff;
    --aha-q-text: #151419;
    --aha-q-line: rgba(20, 18, 28, .10);
    --aha-q-shadow: rgba(31, 24, 55, .11);
    --aha-q-overlay: rgba(5, 5, 7, .58);
}

.aha-quick,
.aha-quick *,
.aha-consult-drawer,
.aha-consult-drawer *,
.aha-consult-overlay {
    box-sizing: border-box;
}

.aha-quick,
.aha-consult-drawer {
    font-family: var(--aha-font-sans, "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.aha-quick {
    position: fixed;
    top: auto;
    right: 20px;
    bottom: 20px;
    left: auto;
    z-index: 2147483000;
}

.aha-quick-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aha-quick-item {
    display: flex;
    justify-content: flex-end;
    width: auto;
    height: 52px;
    margin: 0;
    padding: 0;
}

.aha-quick-phone,
.aha-quick-item.is-mobile-main,
.aha-mobile-top-floating {
    display: none;
}

.aha-quick-top-desktop {
    order: 999;
}

.aha-quick-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 52px;
    min-width: 52px;
    max-width: 154px;
    height: 52px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--aha-q-line);
    border-radius: 9999px;
    color: var(--aha-q-text);
    background: var(--aha-q-surface);
    box-shadow: 0 12px 30px var(--aha-q-shadow);
    text-decoration: none;
    cursor: pointer;
    transition: width .3s cubic-bezier(.22, .8, .24, 1), background .2s ease, border-color .2s ease;
}

.aha-quick-btn:hover {
    width: 154px;
    color: var(--aha-q-text);
    border-color: rgba(79, 47, 193, .46);
    background: var(--aha-q-surface-solid);
}

.aha-quick-btn.is-primary,
.aha-mobile-main-toggle,
.aha-mobile-main-toggle:focus {
    color: #fff;
    border-color: #7875ff;
    background: #7875ff;
    box-shadow: 0 10px 26px rgba(120, 117, 255, .24);
}

.aha-quick-btn.is-primary:hover,
.aha-mobile-main-toggle:hover {
    border-color: var(--aha-primary);
    background: var(--aha-primary);
}

body.aha-light-theme .aha-quick-btn.is-primary,
body.aha-light-theme .aha-mobile-main-toggle,
body.aha-light-theme .aha-mobile-main-toggle:focus,
body.aha-home-light-section .aha-quick-btn.is-primary,
body.aha-home-light-section .aha-mobile-main-toggle,
body.aha-home-light-section .aha-mobile-main-toggle:focus {
    border-color: var(--aha-primary);
    background: var(--aha-primary);
    box-shadow: 0 10px 26px rgba(79, 47, 193, .24);
}

.aha-quick-icon {
    position: relative;
    order: 2;
    display: grid;
    place-items: center;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
}

.aha-quick-icon svg,
.aha-mobile-top-floating svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aha-quick-label {
    position: relative;
    order: 1;
    width: auto;
    padding: 0 4px 0 17px;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.025em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity .16s ease .06s, visibility .16s ease .06s, transform .22s ease .04s;
}

.aha-quick-btn:hover .aha-quick-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.aha-quick .js-aha-consult-open .aha-quick-label {
    color: #fff;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.aha-quick-top-desktop .aha-quick-btn,
.aha-quick-top-desktop .aha-quick-btn:hover,
.aha-quick-top-desktop .aha-quick-btn:focus,
.aha-mobile-top-floating,
.aha-mobile-top-floating:hover,
.aha-mobile-top-floating:focus {
    width: 52px;
    max-width: 52px;
    color: #fff;
    border-color: rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .68);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
}

.aha-quick-top-desktop .aha-quick-label {
    display: none;
}

body.aha-consult-lock {
    overflow: hidden;
}

body.aha-consult-lock .aha-quick-top-desktop,
body.aha-consult-lock .aha-mobile-top-floating {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.aha-consult-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    width: 100vw;
    height: 100dvh;
    background: var(--aha-q-overlay);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(5px);
    transition: opacity .28s ease, visibility .28s ease;
}

.aha-consult-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.aha-consult-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 2147483002;
    width: min(520px, 100vw);
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: #17151d;
    background: radial-gradient(circle at 100% 0, rgba(79, 47, 193, .055), transparent 27%), #fff;
    box-shadow: -32px 0 90px rgba(31, 24, 55, .14);
    transform: translate3d(105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform .42s cubic-bezier(.2, .75, .25, 1), visibility .42s;
}

.aha-consult-drawer.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
}

.aha-consult-inner {
    min-height: 100%;
    padding: 64px 46px 48px;
    color: #17151d;
    background: radial-gradient(circle at 100% 0, rgba(79, 47, 193, .045), transparent 26%), #fff;
}

.aha-consult-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2147483646;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(23, 21, 29, .10);
    border-radius: 50%;
    color: #17151d;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(31, 24, 55, .12);
    cursor: pointer;
}

.aha-consult-close:hover,
.aha-consult-close:focus {
    color: var(--aha-q-point);
    border-color: rgba(79, 47, 193, .35);
    background: #fff;
}

.aha-consult-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.aha-consult-eyebrow {
    margin: 0 0 14px;
    color: var(--aha-q-point);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.aha-consult-title {
    margin: 0;
    color: #17151d;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.045em;
}

.aha-consult-desc {
    margin: 18px 0 34px;
    color: #716c78;
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: -.02em;
    word-break: keep-all;
}

.aha-consult-form {
    display: grid;
    gap: 20px;
}

.aha-consult-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.aha-consult-field {
    display: grid;
    gap: 9px;
}

.aha-consult-field.is-full {
    grid-column: 1 / -1;
}

.aha-consult-field label,
.aha-consult-label {
    color: #302c35;
    font-size: 13px;
    font-weight: 700;
}

.aha-consult-field input,
.aha-consult-field select,
.aha-consult-field textarea {
    width: 100%;
    border: 1px solid #e6e3e9;
    border-radius: 12px;
    outline: none;
    color: #17151d;
    background-color: #f8f7fa;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.aha-consult-field input,
.aha-consult-field select {
    height: 52px;
    padding: 0 15px;
}

.aha-consult-field textarea {
    min-height: 132px;
    padding: 15px;
    resize: vertical;
    line-height: 1.65;
}

.aha-consult-field select {
    appearance: none;
    padding-right: 42px;
    background-image: linear-gradient(45deg, transparent 50%, #8f899b 50%), linear-gradient(135deg, #8f899b 50%, transparent 50%);
    background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.aha-consult-field input::placeholder,
.aha-consult-field textarea::placeholder {
    color: #a19ba7;
    opacity: 1;
}

.aha-consult-field input:focus,
.aha-consult-field select:focus,
.aha-consult-field textarea:focus {
    border-color: rgba(79, 47, 193, .62);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(79, 47, 193, .07);
}

.aha-consult-field select option {
    color: #17151d;
    background: #fff;
}

.aha-consult-agree {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #716c78;
    font-size: 12px;
    line-height: 1.55;
}

.aha-consult-agree input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--aha-q-point);
}

.aha-consult-agree a {
    color: var(--aha-q-point);
    text-decoration: underline;
}

.aha-consult-submit {
    width: 100%;
    height: 58px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--aha-q-point);
    box-shadow: 0 14px 30px rgba(79, 47, 193, .22);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.aha-consult-submit:hover {
    background: var(--aha-q-point-hover);
    transform: translateY(-2px);
}

.aha-consult-submit:disabled {
    cursor: wait;
    opacity: .58;
    transform: none;
}

.aha-consult-message {
    display: none;
    padding: 15px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
}

.aha-consult-message.is-show {
    display: block;
}

.aha-consult-message.is-error {
    color: #9f2d17;
    border: 1px solid rgba(190, 56, 30, .20);
    background: rgba(190, 56, 30, .07);
}

.aha-consult-message.is-success {
    color: #23643f;
    border: 1px solid rgba(46, 145, 91, .19);
    background: rgba(46, 145, 91, .07);
}

.aha-consult-success {
    display: none;
    min-height: calc(100dvh - 110px);
    align-items: center;
    justify-content: center;
    text-align: center;
}

.aha-consult-success.is-show {
    display: flex;
}

.aha-consult-success-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    color: #fff;
    background: var(--aha-q-point);
    box-shadow: 0 18px 42px rgba(79, 47, 193, .25);
}

.aha-consult-success-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aha-consult-success h3 {
    margin: 0 0 12px;
    color: #17151d;
    font-size: 28px;
    letter-spacing: -.04em;
}

.aha-consult-success p {
    margin: 0;
    color: #716c78;
    font-size: 14px;
    line-height: 1.75;
}

.aha-consult-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 1023px) {
    .aha-quick-top-desktop {
        display: none;
    }

    .aha-quick {
        right: 16px;
        bottom: 80px;
        width: auto;
        height: auto;
    }

    .aha-quick-list {
        position: relative;
        gap: 10px;
    }

    .aha-quick-item {
        width: auto;
        height: auto;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(8px) scale(.96);
        transition: opacity .2s ease, visibility .2s ease, transform .24s cubic-bezier(.2, .75, .25, 1);
    }

    .aha-quick-item.is-mobile-main {
        order: 99;
        display: flex;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .aha-quick.is-open .aha-quick-item:not(.is-mobile-main):not(.aha-quick-top-desktop) {
        position: relative;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .aha-quick:not(.is-open) .aha-quick-item:not(.is-mobile-main) {
        position: absolute;
        right: 0;
        bottom: 62px;
    }

    .aha-quick-phone {
        display: flex;
        order: 1;
    }

    .aha-quick-btn,
    .aha-quick-btn:hover,
    .aha-quick-btn:focus {
        display: grid;
        place-items: center;
        justify-content: center;
        align-content: center;
        width: 52px;
        min-width: 52px;
        max-width: 52px;
        height: 52px;
        padding: 0;
        overflow: hidden;
        border-radius: 50%;
        transform: none;
    }

    .aha-quick-icon {
        position: relative;
        inset: auto;
        order: initial;
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
    }

    .aha-quick-label {
        position: absolute;
        top: 50%;
        right: 62px;
        order: initial;
        width: auto;
        padding: 9px 12px;
        border: 1px solid var(--aha-q-line);
        border-radius: 6px;
        color: var(--aha-q-text);
        background: var(--aha-q-surface-solid);
        box-shadow: 0 8px 20px var(--aha-q-shadow);
        font-size: 13px;
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .aha-quick-item.is-mobile-main .aha-quick-label {
        display: none;
    }

    .aha-mobile-main-toggle .aha-quick-icon {
        position: absolute;
        inset: 50% auto auto 50%;
        transform: translate(-50%, -50%);
    }

    .aha-mobile-main-toggle .aha-quick-icon-close,
    .aha-quick.is-open .aha-mobile-main-toggle .aha-quick-icon-open {
        display: none;
    }

    .aha-quick.is-open .aha-mobile-main-toggle .aha-quick-icon-close {
        display: grid;
    }

    .aha-mobile-top-floating {
        position: fixed;
        right: 16px;
        bottom: 18px;
        z-index: 2147483000;
        display: grid;
        place-items: center;
        width: 52px;
        height: 52px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 50%;
        cursor: pointer;
    }

    /*
     * MOBILE OPEN STATE
     * X는 독립 TOP과 같은 최하단 슬롯을 사용한다.
     * 닫힘: 메인 토글(문의) bottom 80px + TOP bottom 18px
     * 열림: CHAT/PHONE은 기존 위치 유지, X만 TOP 자리(bottom 18px)로 이동
     */
    .aha-quick.is-open .aha-quick-item.is-mobile-main {
        position: fixed;
        right: 16px;
        bottom: 18px;
        z-index: 2147483000;
    }

    .aha-quick.is-open + .aha-mobile-top-floating {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .aha-consult-drawer {
        inset: 0;
        width: 100vw;
        height: 100dvh;
        transform: translate3d(0, 105%, 0);
    }

    .aha-consult-drawer.is-open {
        transform: translate3d(0, 0, 0);
    }

    .aha-consult-inner {
        padding: calc(70px + env(safe-area-inset-top)) 18px 30px;
    }

    .aha-consult-close {
        top: calc(14px + env(safe-area-inset-top));
        right: 14px;
        width: 42px;
        height: 42px;
    }

    .aha-consult-eyebrow {
        margin: 4px 48px 10px 0;
        font-size: 11px;
        letter-spacing: .12em;
    }

    .aha-consult-title {
        padding-right: 52px;
        font-size: 26px;
        line-height: 1.24;
        letter-spacing: -.04em;
    }

    .aha-consult-desc {
        margin: 12px 0 22px;
        font-size: 13px;
        line-height: 1.65;
    }

    .aha-consult-form {
        gap: 16px;
    }

    .aha-consult-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 13px 12px;
    }

    .aha-consult-field {
        min-width: 0;
        gap: 7px;
    }

    .aha-consult-field label,
    .aha-consult-label {
        font-size: 12px;
    }

    .aha-consult-field input,
    .aha-consult-field select,
    .aha-consult-field textarea {
        min-width: 0;
        border-radius: 10px;
        font-size: 16px;
    }

    .aha-consult-field input,
    .aha-consult-field select {
        height: 48px;
        padding: 0 13px;
    }

    .aha-consult-field textarea {
        min-height: 112px;
        padding: 13px;
        resize: none;
    }

    .aha-consult-agree {
        gap: 8px;
        font-size: 11px;
    }

    .aha-consult-agree input {
        flex: 0 0 17px;
        width: 17px;
        height: 17px;
    }

    .aha-consult-submit {
        height: 54px;
        border-radius: 10px;
        font-size: 14px;
        touch-action: manipulation;
    }
}

@media (max-width: 767px) {
    .aha-consult-grid {
        grid-template-columns: 1fr;
    }

    .aha-consult-field.is-full {
        grid-column: auto;
    }
}

@media (max-width: 380px) {
    .aha-consult-inner {
        padding-right: 14px;
        padding-left: 14px;
    }

    .aha-consult-title {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aha-quick-btn,
    .aha-quick-label,
    .aha-quick-item,
    .aha-consult-overlay,
    .aha-consult-drawer,
    .aha-consult-submit {
        transition-duration: .01ms;
    }
}
