.sp-chat { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; position: relative; }
.sp-chat[hidden] { display: none; }
.sp-chat::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 180px; pointer-events: none;
    background: radial-gradient(120% 100% at 0% 0%, var(--acc-soft) 0%, transparent 60%);
    opacity: .9;
}
.sp-chat > * { position: relative; }

.sp-head {
    display: flex; align-items: center; gap: 13px;
    padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.sp-ava-w { position: relative; flex: none; }
.sp-ava {
    width: 46px; height: 46px; border-radius: 50%; display: block; object-fit: cover;
    background: var(--acc-bg); border: 1px solid var(--acc-line);
}
.sp-dot {
    position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--green); border: 2px solid var(--panel);
    box-shadow: 0 0 0 0 rgba(54, 216, 154, .55); animation: sp-pulse 2.4s infinite;
}
@keyframes sp-pulse { 0% { box-shadow: 0 0 0 0 rgba(54, 216, 154, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(54, 216, 154, 0); } }
html.is-lite .sp-dot { animation: none; }
.sp-who { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sp-who b { font-size: 16px; font-weight: 800; }
.sp-who small { font-size: 12px; color: var(--muted); }
.sp-who small.is-human { color: var(--gold-text); }
.sp-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.sp-log {
    display: flex; flex-direction: column; gap: 12px;
    padding: 20px; min-height: 280px; max-height: min(62vh, 640px); overflow-y: auto;
    overscroll-behavior: contain;
}
.sp-log:empty { display: none; }

.sp-msg { display: flex; flex-direction: column; max-width: 80%; align-self: flex-start; animation: sp-in .22s var(--ease, ease) both; }
@keyframes sp-in { from { opacity: 0; transform: translateY(6px); } }
html.is-lite .sp-msg { animation: none; }
.sp-msg .b {
    padding: 11px 15px; border-radius: 18px 18px 18px 6px; font-size: 14px; line-height: 1.5;
    background: var(--surface-2); border: 1px solid var(--line-soft);
    white-space: pre-wrap; overflow-wrap: anywhere;
}
.sp-msg .t { font-size: 11px; color: var(--faint); margin: 4px 8px 0; }
.sp-msg .who { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--muted); margin: 0 8px 5px; }
.sp-msg .who img { width: 18px; height: 18px; border-radius: 50%; }
.sp-msg.is-player { align-self: flex-end; align-items: flex-end; }
.sp-msg.is-player .b {
    background: var(--acc-grad, var(--acc)); border-color: transparent; color: #fff;
    border-radius: 18px 18px 6px 18px;
}
.sp-msg.is-admin .b { border-color: var(--gold-line); background: var(--gold-soft); }
.sp-msg.is-admin .who { color: var(--gold-text); }
.sp-msg.is-system { align-self: center; max-width: 92%; align-items: center; }
.sp-msg.is-system .b {
    background: none; border: 1px dashed var(--line); color: var(--dim);
    font-size: 12px; text-align: center; border-radius: 12px; padding: 7px 12px;
}
.sp-msg.is-pending .b { opacity: .65; }

.sp-ref {
    display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 9px 12px;
    border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 12px;
    max-width: 100%;
}
.sp-ref .ic {
    width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center;
    background: var(--acc-soft); color: var(--lilac); font-weight: 800;
}
.sp-ref .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-ref .tx b { font-size: 13px; font-weight: 800; }
.sp-ref .tx small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sp-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.sp-msg:not(.is-player) .sp-files { justify-content: flex-start; }
.sp-file {
    position: relative; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; padding: 0; cursor: zoom-in;
    background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--muted);
    display: grid; place-items: center; font-size: 11px;
}
.sp-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-file.is-pdf {
    width: auto; height: 46px; padding: 0 12px 0 10px; cursor: pointer; display: flex; gap: 8px;
    font-size: 12px; font-weight: 700; color: var(--text); max-width: 220px;
}
.sp-file.is-pdf i {
    flex: none; font-style: normal; font-size: 10px; font-weight: 800; padding: 3px 5px; border-radius: 6px;
    background: var(--pink); color: #fff;
}
.sp-file.is-pdf span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sp-typing { align-self: flex-start; display: flex; gap: 5px; padding: 13px 15px; border-radius: 18px 18px 18px 6px;
    background: var(--surface-2); border: 1px solid var(--line-soft); }
.sp-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: sp-dot 1.2s infinite; }
.sp-typing i:nth-child(2) { animation-delay: .15s; }
.sp-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sp-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
html.is-lite .sp-typing i { animation: none; opacity: .7; }

.sp-start { padding: 22px 20px 4px; }
.sp-start[hidden] { display: none; }
.sp-intro h2 { font-family: var(--f-display); font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.sp-intro p { font-size: 14px; color: var(--dim); line-height: 1.55; margin: 0 0 16px; text-wrap: pretty; }
.sp-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp-topic {
    --tone: var(--acc);
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
    padding: 14px 14px 13px; border-radius: 16px; cursor: pointer; color: var(--text);
    background: var(--surface); border: 1px solid var(--line-soft);
    transition: border-color .15s, background .15s, transform .15s;
}
.sp-topic .ic {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px;
    color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
}
.sp-topic .ic svg { width: 20px; height: 20px; }
.sp-topic b { font-size: 14px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.sp-topic small { font-size: 12px; color: var(--muted); line-height: 1.35; text-wrap: pretty; }
.sp-topic:hover {
    border-color: color-mix(in srgb, var(--tone) 45%, transparent);
    background: color-mix(in srgb, var(--tone) 7%, var(--surface));
    transform: translateY(-2px);
}
html.is-lite .sp-topic:hover { transform: none; }
.sp-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; font-size: 12px; color: var(--faint); }
.sp-or::before, .sp-or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.sp-wiz { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.sp-wiz[hidden] { display: none; }
.sp-wiz-head { display: flex; align-items: center; gap: 12px; }
.sp-back {
    width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
}
.sp-back:hover { border-color: var(--acc-line); }
.sp-back[hidden] { display: none; }

.sp-resume {
    display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 18px; padding: 12px 14px; text-align: left; cursor: pointer;
    border-radius: 16px; color: var(--text); background: var(--acc-bg); border: 1px solid var(--acc-line);
}
.sp-resume[hidden] { display: none; }
.sp-resume .ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--acc-soft); font-size: 18px; }
.sp-resume .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-resume .tx b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 800; }
.sp-resume .tx small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-resume .go { flex: none; font-size: 13px; font-weight: 800; color: var(--lilac); }
.sp-resume:hover { border-color: var(--acc); }
@media (max-width: 640px) { .sp-resume .go { display: none; } }
.sp-wiz-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-wiz-t b { font-family: var(--f-display); font-size: 18px; font-weight: 800; }
.sp-wiz-t small { font-size: 12px; color: var(--muted); }

.sp-step[hidden] { display: none; }
.sp-lab { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.sp-lab i {
    width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
    font-style: normal; font-size: 11px; font-weight: 800; background: var(--acc-soft); color: var(--lilac);
}
.sp-lab em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--muted); }
.sp-lab em.is-want { color: var(--mint); }

.sp-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sp-pick {
    display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 14px; cursor: pointer; text-align: left;
    background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); min-width: 0;
    transition: border-color .15s, background .15s;
}
.sp-pick:hover { border-color: var(--line-2); }
.sp-pick.on { border-color: var(--acc-line); background: var(--acc-bg); box-shadow: 0 0 0 1px var(--acc-line) inset; }
.sp-pick .rb {
    width: 18px; height: 18px; border-radius: 50%; flex: none; border: 2px solid var(--line-3, var(--line-2));
    transition: border-color .15s, box-shadow .15s;
}
.sp-pick.on .rb { border-color: var(--acc); box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 9px var(--acc); }
.sp-pick .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.sp-pick .tx b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-pick .tx small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-pick.is-none { grid-column: 1 / -1; }
.sp-pick.is-none .tx b { font-weight: 700; color: var(--dim); }
.sp-picks .sp-wait { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding: 6px 2px; }

.sp-st { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--dim); flex: none; white-space: nowrap; }
.sp-st.is-human, .sp-st.is-pending { background: var(--gold-soft); color: var(--gold-text); }
.sp-st.is-answered, .sp-st.is-completed { background: var(--green-soft); color: var(--mint); }
.sp-st.is-bot { background: var(--acc-soft); color: var(--lilac); }
.sp-st.is-rejected { background: color-mix(in srgb, var(--pink) 16%, transparent); color: var(--pink); }

.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chips button {
    min-height: 38px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
    color: var(--text); background: var(--surface); border: 1px solid var(--line-2);
}
.sp-chips button:hover { border-color: var(--acc-line); }
.sp-chips button.on { border-color: var(--acc-line); background: var(--acc-bg); color: var(--text); box-shadow: 0 0 0 1px var(--acc-line) inset; }

.sp-drop {
    display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; cursor: pointer;
    border: 1.5px dashed var(--line-2); background: var(--surface); transition: border-color .15s, background .15s;
}
.sp-drop:hover, .sp-drop.is-over { border-color: var(--acc-line); background: var(--acc-bg); }
.sp-drop .ic { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--acc-soft); color: var(--lilac); }
.sp-drop .tx { display: flex; flex-direction: column; gap: 3px; }
.sp-drop .tx b { font-size: 14px; font-weight: 800; }
.sp-drop .tx small { font-size: 12px; color: var(--muted); }
.sp-drop.is-full { display: none; }

.sp-att { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-att:empty { display: none; }
.sp-att[hidden] { display: none; }
.sp-wiz .sp-att { margin-top: 10px; }
.sp-att-bar { padding: 12px 20px 0; border-top: 1px solid var(--line-soft); }
.sp-chip {
    display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border-radius: 12px; max-width: 240px;
    background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 12px; font-weight: 700;
}
.sp-chip img, .sp-chip .pdf { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }
.sp-chip .pdf { display: grid; place-items: center; background: var(--pink); color: #fff; font-size: 10px; font-weight: 800; }
.sp-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sp-chip small { color: var(--muted); font-weight: 600; flex: none; }
.sp-chip button {
    width: 24px; height: 24px; border-radius: 8px; flex: none; cursor: pointer; display: grid; place-items: center;
    background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1;
}
.sp-chip button:hover { color: var(--text); background: var(--surface-3); }
.sp-chip.is-busy { opacity: .6; }

.sp-wiz-text { min-height: 84px; resize: vertical; font-size: 14px; line-height: 1.5; padding: 12px 14px; }
.sp-wiz-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.sp-tip { flex: 1; min-width: 200px; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.sp-tip.is-err { color: var(--pink); font-weight: 700; }

.sp-rate {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 0 20px 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface); font-size: 13px; color: var(--dim);
}
.sp-rate[hidden] { display: none; }
.sp-rate span { flex: 1; min-width: 160px; }

.sp-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 20px 8px; border-top: 1px solid var(--line-soft); }
.sp-att-bar:not([hidden]) + .sp-form { border-top: 0; }
.sp-form[hidden] { display: none; }
.sp-form textarea.text-input {
    flex: 1; min-height: 46px; max-height: 160px; resize: none; padding: 12px 14px; line-height: 1.45;
    font-size: 14px; font-weight: 600; border-radius: 14px;
}
.sp-clip, .sp-send {
    width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center; cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s, transform .15s;
}
.sp-clip { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.sp-clip:hover { color: var(--text); border-color: var(--acc-line); }
.sp-send { background: var(--acc-grad, var(--acc)); border: 0; color: #fff; box-shadow: var(--acc-sh); }
.sp-send:hover { transform: translateY(-1px); }
.sp-send:disabled { opacity: .5; cursor: default; transform: none; }
.sp-note { font-size: 11px; color: var(--faint); margin: 0; padding: 0 20px 14px; }

.sp-list .sp-it {
    display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer;
    background: none; border: 1px solid transparent; color: inherit;
}
.sp-list .sp-it + .sp-it { margin-top: 4px; }
.sp-list .sp-it:hover, .sp-list .sp-it.on { background: var(--surface-2); border-color: var(--line-soft); }
.sp-it .r1 { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 800; }
.sp-it .r1 em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.sp-it .r2 { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-it .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex: none; }

.sp-quick-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sp-quick-h h3 { margin: 0; }
.sp-quick-h a { font-size: 12px; font-weight: 800; color: var(--lilac); }
.sp-qa { --tone: var(--acc); border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .15s; }
.sp-qa + .sp-qa { margin-top: 8px; }
.sp-qa[open] { border-color: color-mix(in srgb, var(--tone) 35%, transparent); }
.sp-qa summary {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 14px;
}
.sp-qa summary::-webkit-details-marker { display: none; }
.sp-qa summary::after {
    content: ""; margin-left: auto; width: 8px; height: 8px; flex: none;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px);
    transition: transform .2s;
}
.sp-qa[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.sp-qa .ic {
    width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 14px;
    color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent);
}
.sp-qa summary b { font-weight: 800; }
.sp-qa p { margin: 0; padding: 0 14px 14px 56px; font-size: 13px; line-height: 1.6; color: var(--dim); }

.sp-lb {
    position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px;
    background: rgba(5, 8, 20, .88); cursor: zoom-out; animation: sp-in .15s ease both;
}
.sp-lb img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.sp-lb button {
    position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .12); color: #fff; font-size: 22px;
}

@media (max-width: 900px) {
    .sp-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .sp-head { padding: 12px 14px; gap: 10px; }
    .sp-ava { width: 40px; height: 40px; }
    .sp-acts .btn { padding: 0 10px; }
    .sp-log { padding: 14px; max-height: calc(100dvh - 300px); min-height: 220px; }
    .sp-msg { max-width: 90%; }
    .sp-start { padding: 16px 14px 2px; }
    .sp-intro h2 { font-size: 19px; }
    .sp-topics { gap: 8px; }
    .sp-topic { padding: 12px 12px 13px; min-height: 104px; }
    .sp-topic b { font-size: 14px; line-height: 1.3; }
    .sp-topic small { display: none; }
    .sp-topic .ic { width: 34px; height: 34px; margin-bottom: 4px; }
    .sp-wiz { padding: 14px 14px 16px; gap: 16px; }
    .sp-picks { grid-template-columns: minmax(0, 1fr); }
    .sp-wiz-foot .btn { width: 100%; }
    .sp-att-bar { padding: 10px 14px 0; }
    .sp-form { padding: 10px 14px 6px; }
    .sp-note { padding: 0 14px 12px; }
    .sp-file { width: 92px; height: 92px; }
    .sp-qa p { padding-left: 14px; }
}
