:root {
    --yc-brand: #ef5526;
    --yc-brand-2: #ff8a3d;
    --yc-brand-deep: #c93c11;
    --yc-ink: #14161c;
    --yc-ink-soft: #5b6272;
    --yc-line: #e8e9ef;
    --yc-surface: #ffffff;
    --yc-canvas: #f7f7fa;
    --yc-radius: 26px;
}

@property --yc-ang {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.yc-launcher {
    position: fixed;
    right: 26px;
    bottom: 92px;
    width: 66px;
    height: 66px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}

.yc-launcher:hover { transform: translateY(-3px) scale(1.05); }
.yc-launcher:active { transform: scale(.97); }

.yc-launcher-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from var(--yc-ang), rgba(239,85,38,0) 0deg, var(--yc-brand) 60deg, var(--yc-brand-2) 110deg, rgba(239,85,38,0) 180deg, rgba(239,85,38,0) 360deg);
    animation: yc-spin 4.5s linear infinite;
    filter: blur(1px);
    opacity: .85;
}

.yc-launcher-orb {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: radial-gradient(120% 120% at 30% 20%, #ffffff 0%, #fff3ec 55%, #ffe2d3 100%);
    box-shadow: 0 12px 30px rgba(239, 85, 38, .34), inset 0 0 0 1px rgba(255, 255, 255, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.yc-launcher-orb dotlottie-wc { width: 78px; height: 78px; pointer-events: none; }

.yc-launcher-tip {
    position: absolute;
    right: 78px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--yc-ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
    padding: 7px 12px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.yc-launcher:hover .yc-launcher-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

.yc-launcher.is-open { opacity: 0; pointer-events: none; transform: scale(.6); }

@keyframes yc-spin { to { --yc-ang: 360deg; } }

.yc-panel {
    position: fixed;
    right: 24px;
    bottom: 88px;
    width: 408px;
    max-width: calc(100vw - 24px);
    height: 660px;
    max-height: calc(100vh - 118px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transform: translateY(18px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .3s cubic-bezier(.22, 1, .36, 1), transform .3s cubic-bezier(.22, 1, .36, 1);
}

.yc-panel.is-open { display: block; opacity: 1; transform: translateY(0) scale(1); }

.yc-frame {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--yc-surface);
    border: 1px solid var(--yc-line);
    border-radius: var(--yc-radius);
    box-shadow: 0 30px 80px rgba(15, 23, 42, .22), 0 4px 18px rgba(15, 23, 42, .08);
    overflow: hidden;
    position: relative;
}

.yc-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    background: linear-gradient(120deg, var(--yc-brand-deep) 0%, var(--yc-brand) 46%, var(--yc-brand-2) 100%);
    color: #fff;
    flex: 0 0 auto;
}

.yc-head-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.yc-head-avatar dotlottie-wc { width: 52px; height: 52px; pointer-events: none; }

.yc-head-dot {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2fd07a;
    box-shadow: 0 0 0 2px rgba(201, 60, 17, .9);
}

.yc-head-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1 1 auto; }
.yc-head-id strong { font-size: 15.5px; font-weight: 700; letter-spacing: .01em; }
.yc-head-id em {
    font-style: normal;
    font-size: 11.5px;
    opacity: .88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yc-head-actions { display: flex; gap: 4px; flex: 0 0 auto; }

.yc-icon-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .16s ease, transform .16s ease;
}

.yc-icon-btn:hover { background: rgba(255, 255, 255, .28); }
.yc-icon-btn:active { transform: scale(.92); }
.yc-icon-btn.is-on { background: #fff; color: var(--yc-brand-deep); }

.yc-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(520px 220px at 100% 0%, #fff3ed 0%, rgba(255, 243, 237, 0) 70%),
        var(--yc-canvas);
    scrollbar-width: thin;
    scrollbar-color: #d6d8e2 transparent;
}

.yc-scroll::-webkit-scrollbar { width: 8px; }
.yc-scroll::-webkit-scrollbar-thumb { background: #d6d8e2; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }

.yc-thread { padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 12px; }

.yc-hero {
    background: #fff;
    border: 1px solid var(--yc-line);
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, .05);
}

.yc-hero h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; color: var(--yc-ink); letter-spacing: -.01em; }
.yc-hero p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--yc-ink-soft); }

.yc-tour-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 9px 15px;
    border: 1.5px solid #ffd8c6;
    border-radius: 99px;
    background: #fff7f4;
    color: var(--yc-brand-deep);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
}

.yc-tour-btn:hover {
    background: var(--yc-brand);
    border-color: var(--yc-brand);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 85, 38, .28);
}

.yc-spot {
    position: relative;
    z-index: 5;
    animation: yc-spot-pulse 1.1s ease-out infinite;
}

@keyframes yc-spot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 85, 38, .55); }
    100% { box-shadow: 0 0 0 12px rgba(239, 85, 38, 0); }
}

.yc-spot-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 11px;
    border-radius: 9px;
    background: var(--yc-ink);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    animation: yc-rise .22s ease-out;
    z-index: 6;
}

.yc-spot-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--yc-ink);
}

.yc-head .yc-spot-tip { bottom: auto; top: calc(100% + 10px); }
.yc-head .yc-spot-tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--yc-ink); }

.yc-msg { display: flex; gap: 9px; align-items: flex-end; animation: yc-rise .28s cubic-bezier(.22, 1, .36, 1); }
.yc-msg.user { justify-content: flex-end; }

@keyframes yc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.yc-msg-ava {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(140deg, #fff1ea, #ffe0d0);
    box-shadow: inset 0 0 0 1px rgba(239, 85, 38, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 2px;
}

.yc-msg-ava dotlottie-wc { width: 38px; height: 38px; pointer-events: none; }

.yc-bubble {
    max-width: 82%;
    padding: 11px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.62;
    color: var(--yc-ink);
    background: #fff;
    border: 1px solid var(--yc-line);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
    word-break: break-word;
}

.yc-msg.bot .yc-bubble { border-bottom-left-radius: 6px; }

.yc-msg.user .yc-bubble {
    background: linear-gradient(135deg, var(--yc-brand) 0%, var(--yc-brand-deep) 100%);
    color: #fff;
    border: 0;
    border-bottom-right-radius: 6px;
    box-shadow: 0 6px 18px rgba(239, 85, 38, .28);
}

.yc-bubble p { margin: 0 0 8px; }
.yc-bubble p:last-child { margin-bottom: 0; }
.yc-bubble ul, .yc-bubble ol { margin: 6px 0; padding-left: 20px; }
.yc-bubble li { margin: 3px 0; }
.yc-bubble strong { font-weight: 700; }
.yc-bubble a { color: var(--yc-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.yc-msg.user .yc-bubble a { color: #fff; }
.yc-bubble code {
    background: #f2f3f7;
    border-radius: 5px;
    padding: 1px 5px;
    font-size: 12.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.yc-cursor {
    display: inline-block;
    width: 2px;
    height: 15px;
    background: var(--yc-brand);
    margin-left: 2px;
    vertical-align: -2px;
    animation: yc-blink 1s steps(2) infinite;
}

@keyframes yc-blink { 50% { opacity: 0; } }

.yc-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 13px 15px;
    background: #fff;
    border: 1px solid var(--yc-line);
    border-radius: 18px 18px 18px 6px;
}

.yc-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c3c6d2;
    animation: yc-bounce 1.3s infinite;
}

.yc-typing span:nth-child(2) { animation-delay: .18s; }
.yc-typing span:nth-child(3) { animation-delay: .36s; }

@keyframes yc-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.yc-tool {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 39px;
    padding: 7px 13px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--yc-brand-deep);
    background: linear-gradient(90deg, #fff2ec, #ffe6da, #fff2ec);
    background-size: 220% 100%;
    border: 1px solid #ffd8c6;
    animation: yc-shimmer 1.6s linear infinite;
}

.yc-tool i { font-size: 11px; }
.yc-tool.is-done { animation: none; background: #f2f3f7; border-color: var(--yc-line); color: var(--yc-ink-soft); }

@keyframes yc-shimmer { to { background-position: -220% 0; } }

.yc-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 2px 16px 10px;
    margin: 0 -16px;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: #d0d3de transparent;
}

.yc-cards.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.yc-cards.is-dragging .yc-card { pointer-events: none; }

.yc-cards::-webkit-scrollbar { height: 7px; }
.yc-cards::-webkit-scrollbar-track { background: transparent; }
.yc-cards::-webkit-scrollbar-thumb { background: #d0d3de; border-radius: 99px; }
.yc-cards::-webkit-scrollbar-thumb:hover { background: #b9bdcc; }

.yc-card {
    flex: 0 0 168px;
    background: #fff;
    border: 1px solid var(--yc-line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.yc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15, 23, 42, .12); border-color: #ffd0bb; }

.yc-card-media { position: relative; height: 122px; background: #fbfbfd; display: flex; align-items: center; justify-content: center; padding: 8px; }
.yc-card-media img { max-width: 100%; max-height: 100%; object-fit: contain; }

.yc-card-badge {
    position: absolute;
    top: 7px;
    left: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 3px 8px;
    border-radius: 99px;
    color: #fff;
}

.yc-card-badge.eco { background: #16a34a; }
.yc-card-badge.fp { background: var(--yc-brand); }
.yc-card-badge.premium { background: #6d28d9; }

.yc-card-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.yc-card-brand { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9096a6; }
.yc-card-name {
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--yc-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.yc-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 6px; }
.yc-card-price { font-size: 13.5px; font-weight: 800; color: var(--yc-brand-deep); }

.yc-card-add {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    background: #fff1ea;
    color: var(--yc-brand);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .16s ease, color .16s ease;
}

.yc-card-add:hover { background: var(--yc-brand); color: #fff; }

.yc-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.yc-chip {
    border: 1px solid var(--yc-line);
    background: #fff;
    color: var(--yc-ink);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 13px;
    border-radius: 99px;
    cursor: pointer;
    transition: all .16s ease;
    font-family: inherit;
}

.yc-chip:hover { border-color: var(--yc-brand); color: var(--yc-brand); background: #fff7f4; transform: translateY(-1px); }

.yc-error {
    align-self: center;
    font-size: 12.5px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 8px 14px;
    border-radius: 12px;
}

.yc-foot { flex: 0 0 auto; padding: 10px 14px 12px; background: #fff; border-top: 1px solid var(--yc-line); }

.yc-live[hidden] { display: none; }

.yc-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 7px 10px;
    margin-bottom: 8px;
}

.yc-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: yc-pulse 1.6s infinite; }

@keyframes yc-pulse { 50% { opacity: .3; } }

.yc-live-exit {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #166534;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
}

.yc-composer {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
    background: #f4f5f8;
    border: 1.5px solid transparent;
    border-radius: 18px;
    padding: 5px 5px 5px 6px;
    transition: border-color .18s ease, background .18s ease;
}

.yc-composer:focus-within { background: #fff; border-color: var(--yc-brand); box-shadow: 0 0 0 4px rgba(239, 85, 38, .1); }

.yc-composer textarea {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    resize: none;
    overflow-y: auto;
    max-height: 132px;
    padding: 8px 2px;
    font-size: 14px;
    line-height: 1.45;
    font-family: inherit;
    color: var(--yc-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.yc-composer textarea::placeholder { color: #a2a7b6; }

.yc-mic, .yc-send {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
}

.yc-mic { background: transparent; color: #8b90a0; font-size: 14px; }
.yc-mic:hover { background: #e9eaef; color: var(--yc-ink); }
.yc-mic.is-live { background: #fee2e2; color: #dc2626; animation: yc-pulse 1.2s infinite; }

.yc-send {
    background: linear-gradient(135deg, var(--yc-brand) 0%, var(--yc-brand-deep) 100%);
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(239, 85, 38, .32);
}

.yc-send:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(239, 85, 38, .4); }
.yc-send:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.yc-send.is-busy { background: #e9eaef; color: #6b7280; box-shadow: none; }

.yc-note { margin: 8px 2px 0; font-size: 10.5px; line-height: 1.4; color: #a2a7b6; text-align: center; }

@media (max-width: 640px) {
    .yc-launcher { right: 16px; bottom: 78px; width: 58px; height: 58px; }
    .yc-launcher-orb { width: 58px; height: 58px; }
    .yc-launcher-orb dotlottie-wc { width: 68px; height: 68px; }
    .yc-launcher-tip { display: none; }

    .yc-panel {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        transform-origin: bottom center;
    }

    .yc-frame { border-radius: 0; border: 0; }
    .yc-bubble { max-width: 86%; }
}

@media (prefers-reduced-motion: reduce) {
    .yc-launcher-ring, .yc-tool, .yc-live-dot, .yc-mic.is-live { animation: none; }
    .yc-msg { animation: none; }
    .yc-panel { transition: none; }
}
