.zsp-page {
    --zsp-accent: #ff5f8f;
    --zsp-accent-strong: #ec3f77;
    --zsp-ink: var(--key-color, #23272f);
    --zsp-muted: var(--muted-color, #7c828c);
    --zsp-subtle: var(--muted-2-color, #999da5);
    --zsp-faint: var(--muted-3-color, #b1b4ba);
    --zsp-line: var(--main-border-color, #eceef1);
    --zsp-control-line: var(--muted-4-color, #d7dae0);
    --zsp-surface: var(--main-bg-color, #fff);
    --zsp-control-bg: var(--muted-bg-2-color, #f6f7f8);
    --zsp-soft: var(--muted-bg-2-color, #fff5f8);
    min-height: 70vh;
    padding: 28px 0 56px;
    background: var(--body-bg-color, #f5f6f8);
    color: var(--zsp-ink);
}

.zsp-page *,
.zsp-page *::before,
.zsp-page *::after {
    box-sizing: border-box;
}

.zsp-directory-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.zsp-announcement {
    margin: 0 0 18px;
    color: var(--zsp-muted);
    font-size: 14px;
    font-weight: 600;
}

.zsp-success {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #ffc9d8;
    border-radius: 6px;
    background: #fff5f8;
    color: #9f2854;
}

.zsp-success-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--zsp-accent);
    color: #fff;
    font-weight: 800;
}

.zsp-success p {
    margin: 3px 0 0;
    color: #94566d;
    font-size: 12px;
}

.zsp-inline-sponsor,
.zsp-ranking-panel,
.zsp-recent-panel,
.zsp-page-content {
    border: 1px solid var(--zsp-line);
    border-radius: 8px;
    background: var(--zsp-surface);
    box-shadow: 0 8px 24px rgba(27, 31, 38, 0.05);
}

.zsp-inline-sponsor {
    margin-bottom: 24px;
    overflow: hidden;
    border-color: var(--zsp-line);
    background: var(--zsp-surface);
    color: var(--zsp-ink);
    scroll-margin-top: 90px;
}

.zsp-form-unavailable {
    margin: 24px;
    padding: 28px 18px;
    border: 1px dashed #ffc5d5;
    border-radius: 6px;
    background: var(--zsp-soft);
    color: #9b536b;
    text-align: center;
}

.zsp-ranking-actions,
.zsp-ranking-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zsp-small-action,
.zsp-ranking-tabs button {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.zsp-small-action.is-solid {
    border: 1px solid var(--zsp-accent);
    background: var(--zsp-accent);
    color: #fff;
}

.zsp-small-action:hover {
    transform: translateY(-1px);
}

.zsp-small-action.is-solid:hover {
    background: var(--zsp-accent-strong);
    color: #fff;
}

.zsp-avatar-initial {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    object-fit: cover;
}

.zsp-avatar-initial {
    background: #ffe9f0;
    color: var(--zsp-accent-strong);
    font-size: 28px;
    font-weight: 800;
}

.zsp-panel-empty {
    padding: 34px 20px;
    color: var(--zsp-muted);
    text-align: center;
}

.zsp-directory-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .82fr);
    gap: 22px;
    align-items: start;
}

.zsp-ranking-panel,
.zsp-recent-panel {
    min-width: 0;
    padding: 24px 20px;
}

.zsp-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.zsp-panel-heading h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--zsp-ink);
    font-size: 23px;
    font-weight: 750;
    letter-spacing: 0;
}

.zsp-panel-heading h2 > span {
    width: 4px;
    height: 23px;
    border-radius: 3px;
    background: var(--zsp-accent);
}

.zsp-panel-desc {
    margin: 11px 0 18px;
    color: var(--zsp-muted);
    font-size: 13px;
}

.zsp-ranking-tabs {
    gap: 4px;
}

.zsp-ranking-tabs button,
.zsp-small-action {
    min-height: 30px;
    padding: 5px 11px;
    background: var(--zsp-control-bg);
    color: var(--zsp-muted);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.zsp-ranking-tabs button.is-active {
    background: var(--zsp-accent);
    color: #fff;
}

.zsp-small-action {
    border: 1px solid #ffc5d5;
    background: var(--zsp-surface);
    color: var(--zsp-accent-strong);
}

.zsp-small-action:hover {
    color: var(--zsp-accent-strong);
}

.zsp-ranking-range {
    display: none;
}

.zsp-ranking-range.is-active {
    display: block;
}

.zsp-top-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.zsp-rank-card {
    position: relative;
    min-width: 0;
    min-height: 230px;
    padding: 24px 14px 15px;
    overflow: hidden;
    border: 1px solid #f0d5dd;
    border-radius: 7px;
    background: var(--zsp-rank-bg, #fff5f8);
    text-align: center;
}

.zsp-rank-card.is-rank-1 { border-color: #ffc35b; }
.zsp-rank-card.is-rank-2 { border-color: #c9cdd3; }
.zsp-rank-card.is-rank-3 { border-color: #d99a67; }

.zsp-rank-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 10px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(34, 39, 48, .1);
}

.zsp-rank-avatar img,
.zsp-ranking-avatar img,
.zsp-recent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zsp-rank-number {
    display: block;
    color: #a66a7c;
    font-size: 10px;
    font-weight: 800;
}

.zsp-rank-card > strong,
.zsp-rank-card > b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zsp-rank-card > strong {
    margin-top: 4px;
    font-size: 14px;
}

.zsp-rank-card > b {
    margin-top: 5px;
    color: var(--zsp-accent-strong);
    font-size: 14px;
}

.zsp-rank-card > p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--zsp-muted);
    font-size: 11px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.zsp-ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 15px;
}

.zsp-ranking-row {
    display: grid;
    grid-template-columns: 22px 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--zsp-line);
    border-radius: 6px;
}

.zsp-ranking-row > span {
    color: var(--zsp-subtle);
    font-size: 12px;
    text-align: center;
}

.zsp-ranking-avatar,
.zsp-recent-avatar {
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 50%;
}

.zsp-ranking-row > div:nth-child(3),
.zsp-recent-item > div:nth-of-type(2) {
    min-width: 0;
}

.zsp-ranking-row strong,
.zsp-ranking-row small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zsp-ranking-row strong { font-size: 12px; }
.zsp-ranking-row small { margin-top: 2px; color: var(--zsp-muted); font-size: 10px; }
.zsp-ranking-row b { color: var(--zsp-accent-strong); font-size: 11px; white-space: nowrap; }

.zsp-recent-list {
    display: grid;
    gap: 9px;
}

.zsp-recent-item {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    border: 1px solid #f0dce2;
    border-radius: 7px;
    background: var(--zsp-rank-bg, #fff5f8);
}

.zsp-recent-avatar {
    width: 42px;
    height: 42px;
}

.zsp-recent-item strong,
.zsp-recent-item p {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zsp-recent-item strong { font-size: 13px; }
.zsp-recent-item p { margin: 3px 0 0; color: var(--zsp-muted); font-size: 11px; }
.zsp-recent-item time { display: block; margin-top: 2px; color: var(--zsp-subtle); font-size: 9px; }
.zsp-recent-item > b { color: var(--zsp-accent-strong); font-size: 12px; white-space: nowrap; }

.zsp-new-badge {
    position: absolute;
    top: -1px;
    left: -1px;
    padding: 2px 5px;
    border-radius: 6px 0 5px 0;
    background: var(--zsp-accent);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
}

.zsp-page-content {
    margin-top: 22px;
    padding: 22px;
    color: var(--zsp-muted);
    line-height: 1.8;
}

.zsp-thanks {
    padding: 42px 0 0;
    color: var(--zsp-muted);
    text-align: center;
}

.zsp-thanks span { color: var(--zsp-accent); font-size: 20px; }
.zsp-thanks p { margin: 8px 0 0; font-size: 13px; }

.zsp-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, .95fr);
    gap: 20px;
    padding: 18px;
    background: var(--zsp-surface);
}

.zsp-checkout-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.zsp-checkout-step,
.zsp-checkout-summary {
    min-width: 0;
    border: 1px solid var(--zsp-line);
    border-radius: 8px;
    background: var(--zsp-control-bg);
}

.zsp-checkout-step {
    padding: 20px;
}

.zsp-step-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.zsp-step-heading > span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--zsp-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.zsp-step-heading h2,
.zsp-checkout-summary h2 {
    margin: 0;
    color: var(--zsp-ink);
    font-size: 15px;
    font-weight: 750;
    letter-spacing: 0;
}

.zsp-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.zsp-amount-option,
.zsp-custom-amount {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 110px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0;
    padding: 15px 10px 12px;
    overflow: hidden;
    border: 2px solid var(--zsp-control-line);
    border-radius: 8px;
    outline: 0;
    background: var(--zsp-surface);
    color: var(--zsp-ink);
    cursor: pointer;
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.zsp-amount-option:hover,
.zsp-custom-amount:hover {
    transform: translateY(-1px);
}

.zsp-amount-option.is-active,
.zsp-custom-amount.is-active {
    border-color: var(--zsp-accent);
    box-shadow: 0 8px 20px rgba(255, 95, 143, .16);
}

.zsp-amount-badge {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 96px;
    padding: 5px 8px;
    overflow: hidden;
    border-radius: 0 5px 0 7px;
    background: var(--zsp-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zsp-amount-visual {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    place-items: center;
}

.zsp-amount-image {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    object-fit: contain;
}

.zsp-amount-fallback,
.zsp-custom-amount > i {
    color: var(--zsp-accent);
    font-size: 22px;
    font-style: normal;
}

.zsp-amount-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--zsp-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zsp-amount-option > strong {
    display: block;
    margin-top: 5px;
    color: var(--zsp-ink);
    font-size: 16px;
}

.zsp-custom-amount > strong {
    margin-top: 5px;
    font-size: 14px;
}

.zsp-custom-amount > span {
    margin-top: 2px;
    color: var(--zsp-subtle);
    font-size: 11px;
}

.zsp-custom-value {
    display: flex;
    height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    border: 1px solid var(--zsp-control-line);
    border-radius: 7px;
    background: var(--zsp-surface);
    color: var(--zsp-subtle);
}

.zsp-custom-value[hidden] {
    display: none !important;
}

.zsp-custom-value:focus-within {
    border-color: var(--zsp-accent);
}

.zsp-custom-value b {
    display: none;
}

.zsp-custom-value input {
    width: min(220px, 80%);
    height: 42px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--zsp-ink) !important;
    box-shadow: none !important;
    text-align: center;
}

.zsp-custom-value input::placeholder {
    color: var(--zsp-subtle);
}

.zsp-method-grid {
    display: grid;
    gap: 10px;
}

.zsp-method-option {
    display: flex;
    min-height: 84px;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 14px 18px;
    border: 2px solid var(--zsp-control-line);
    border-radius: 8px;
    outline: 0;
    background: var(--zsp-surface);
    color: var(--zsp-ink);
    cursor: pointer;
    text-align: left;
}

.zsp-method-option.is-active {
    border-color: var(--zsp-accent);
}

.zsp-method-logo,
.zsp-method-logo img,
.zsp-method-logo svg {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
}

.zsp-method-option > span:last-child {
    min-width: 0;
}

.zsp-method-option strong,
.zsp-method-option small {
    display: inline-block;
}

.zsp-method-option strong {
    font-size: 14px;
}

.zsp-method-option b {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--zsp-accent);
    color: #fff;
    font-size: 10px;
}

.zsp-method-option small {
    display: block;
    margin-top: 4px;
    color: var(--zsp-muted);
    font-size: 11px;
}

.zsp-payment-empty {
    padding: 24px;
    border: 1px dashed var(--zsp-control-line);
    border-radius: 7px;
    color: var(--zsp-muted);
    text-align: center;
}

.zsp-checkout-summary {
    position: sticky;
    top: 90px;
    align-self: start;
    overflow: hidden;
}

.zsp-checkout-summary > header {
    padding: 22px 20px;
    border-bottom: 1px solid var(--zsp-line);
}

.zsp-checkout-summary > header p {
    margin: 5px 0 0;
    color: var(--zsp-subtle);
    font-size: 12px;
}

.zsp-summary-fields {
    padding: 6px 20px 0;
}

.zsp-summary-field {
    position: relative;
    display: block;
    padding: 12px 0 10px;
    border-bottom: 1px dashed var(--zsp-control-line);
}

.zsp-summary-field > span:first-child {
    display: block;
    margin-bottom: 3px;
    color: var(--zsp-muted);
    font-size: 11px;
}

.zsp-summary-field input,
.zsp-summary-field textarea {
    display: block;
    width: 100%;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--zsp-ink) !important;
    box-shadow: none !important;
    font-size: 13px;
}

.zsp-summary-field input {
    height: 24px;
}

.zsp-summary-field textarea {
    min-height: 43px;
    line-height: 1.5;
    resize: vertical;
}

.zsp-summary-field input::placeholder,
.zsp-summary-field textarea::placeholder {
    color: var(--zsp-subtle);
}

.zsp-summary-field:focus-within {
    border-bottom-color: var(--zsp-accent);
}

.zsp-summary-message > small {
    position: absolute;
    right: 0;
    bottom: 8px;
    color: var(--zsp-subtle);
    font-size: 9px;
}

.zsp-summary-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zsp-qq-preview {
    display: flex !important;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
}

.zsp-qq-preview img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.zsp-anonymous {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 12px 20px 2px;
    padding: 10px;
    border-radius: 6px;
    background: var(--zsp-surface);
    cursor: pointer;
}

.zsp-anonymous input {
    position: absolute;
    opacity: 0;
}

.zsp-checkbox {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border: 1px solid var(--zsp-control-line);
    border-radius: 4px;
    background: var(--zsp-control-bg);
}

.zsp-anonymous input:checked + .zsp-checkbox {
    border-color: var(--zsp-accent);
    background: var(--zsp-accent);
}

.zsp-anonymous input:checked + .zsp-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.zsp-anonymous strong,
.zsp-anonymous small {
    display: block;
}

.zsp-anonymous strong {
    color: var(--zsp-ink);
    font-size: 11px;
}

.zsp-anonymous small {
    margin-top: 2px;
    color: var(--zsp-subtle);
    font-size: 9px;
}

.zsp-summary-row,
.zsp-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 20px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--zsp-control-line);
    font-size: 12px;
}

.zsp-summary-row span,
.zsp-summary-total span {
    color: var(--zsp-muted);
}

.zsp-summary-row strong,
.zsp-summary-total strong {
    color: var(--zsp-ink);
    font-weight: 600;
}

.zsp-summary-total strong {
    font-size: 14px;
}

.zsp-summary-total strong b {
    font-weight: 700;
}

.zsp-payment-engine {
    padding: 20px;
}

.zsp-payment-engine .dependency-box > .muted-2-color.em09.mb6,
.zsp-payment-engine .payment-method-radio {
    display: none !important;
}

.zsp-payment-engine .dependency-box > .flex.mb10 {
    min-height: 0 !important;
    margin: 0 !important;
}

.zsp-payment-engine .initiate-pay {
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--zsp-accent) !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.zsp-payment-engine .pay-price-text {
    display: none !important;
}

.zsp-payment-engine .form-control {
    border-color: var(--zsp-control-line) !important;
    background: var(--zsp-surface) !important;
    color: var(--zsp-ink) !important;
}

.dark-theme .zsp-success {
    border-color: rgba(255, 95, 143, .35);
    background: rgba(255, 95, 143, .1);
    color: #ff91b2;
}

.dark-theme .zsp-success p {
    color: #d9a1b3;
}

.dark-theme .zsp-rank-card,
.dark-theme .zsp-recent-item {
    border-color: var(--zsp-control-line);
    background: var(--zsp-control-bg);
}

.dark-theme .zsp-rank-avatar {
    border-color: rgba(255, 255, 255, .16);
}

@media (max-width: 900px) {
    .zsp-directory-columns { grid-template-columns: 1fr; }
    .zsp-recent-panel { order: -1; }
    .zsp-checkout-layout { grid-template-columns: 1fr; }
    .zsp-checkout-summary { position: static; }
}

@media (max-width: 640px) {
    .zsp-page { padding-top: 18px; }
    .zsp-directory-shell { width: min(100% - 20px, 1180px); }
    .zsp-checkout-layout { gap: 12px; padding: 10px; }
    .zsp-checkout-step { padding: 14px; }
    .zsp-panel-heading { align-items: flex-start; flex-direction: column; }
    .zsp-ranking-actions { width: 100%; justify-content: space-between; }
    .zsp-ranking-panel, .zsp-recent-panel { padding: 18px 13px; }
    .zsp-panel-heading h2 { font-size: 20px; }
    .zsp-top-three { grid-template-columns: 1fr; }
    .zsp-rank-card { display: grid; min-height: 0; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 12px; text-align: left; }
    .zsp-rank-avatar { grid-row: 1 / 5; width: 62px; height: 62px; margin: 0; }
    .zsp-rank-number, .zsp-rank-card > strong, .zsp-rank-card > b, .zsp-rank-card > p { margin: 0; }
    .zsp-rank-card > b { grid-column: 3; grid-row: 2; }
    .zsp-rank-card > p { grid-column: 2 / 4; }
    .zsp-ranking-list { grid-template-columns: 1fr; }
    .zsp-amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .zsp-amount-option, .zsp-custom-amount { min-height: 104px; }
    .zsp-amount-badge { max-width: 82px; }
}

@media (prefers-reduced-motion: reduce) {
    .zsp-page * { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
