:root {
    --shop-bg: #0F0F14;
    --shop-surface: #1A1A22;
    --shop-primary: #9800FF;
    --shop-deep: #523369;
    --shop-text: #F3E2FE;
    --shop-text-sub: rgba(243, 226, 254, 0.72);
    --shop-border: rgba(152, 0, 255, 0.22);
    --shop-border-strong: rgba(152, 0, 255, 0.42);
    --shop-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
}

.shop-content {
    background:
        radial-gradient(circle at top center, rgba(152, 0, 255, 0.14) 0%, rgba(152, 0, 255, 0) 38%),
        var(--shop-bg);
}

#page-shop .scroll-area {
    padding-left: 16px;
    padding-right: 16px;
}

.shop-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 12px;
}

.shop-hero,
.shop-section {
    background: linear-gradient(180deg, rgba(26, 26, 34, 0.98) 0%, rgba(20, 20, 28, 0.98) 100%);
    border: 1px solid var(--shop-border);
    border-radius: 20px;
    box-shadow: var(--shop-shadow);
}

.shop-hero {
    padding: 18px;
}

.shop-hero__title {
    margin: 0;
    color: var(--shop-text);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.shop-hero__desc {
    margin: 10px 0 0;
    color: var(--shop-text-sub);
    font-size: 14px;
    line-height: 1.6;
}

.shop-section {
    padding: 16px;
}

.shop-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.shop-section__label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-section__icon,
.shop-card__amount-icon,
.shop-attendance__icon,
.shop-resource-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-text);
}

.shop-section__icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(152, 0, 255, 0.12);
    border: 1px solid rgba(152, 0, 255, 0.24);
}

.shop-resource-icon {
    width: 15px;
    height: 15px;
}

.shop-resource-inline-icon,
.shop-card__amount-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.shop-section__title {
    margin: 0;
    color: var(--shop-text);
    font-size: 20px;
    line-height: 1.3;
}

.shop-section__desc {
    margin: 6px 0 0;
    color: var(--shop-text-sub);
    font-size: 13px;
    line-height: 1.5;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.shop-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(82, 51, 105, 0.3) 0%, rgba(26, 26, 34, 0.98) 58%),
        var(--shop-surface);
    border: 1px solid rgba(82, 51, 105, 0.7);
    overflow: hidden;
}

.shop-card__amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.shop-card__amount-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--shop-text);
    font-size: clamp(18px, 4.4vw, 24px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.shop-card__amount-bonus {
    color: #d7a8ff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.shop-card__price {
    color: var(--shop-text-sub);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.shop-buy-btn {
    width: 100%;
    margin-top: auto;
    min-height: 44px;
    border: 1px solid rgba(152, 0, 255, 0.36);
    border-radius: 14px;
    color: var(--shop-text);
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(180deg, var(--shop-primary) 0%, var(--shop-deep) 100%);
    box-shadow: 0 12px 24px rgba(82, 51, 105, 0.34);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.shop-buy-btn:active {
    transform: translateY(1px) scale(0.99);
}

.shop-buy-btn:hover {
    box-shadow: 0 16px 28px rgba(82, 51, 105, 0.4);
    filter: brightness(1.04);
}

.shop-buy-btn:disabled {
    cursor: default;
    opacity: 0.64;
    filter: none;
    box-shadow: none;
}

.shop-attendance-head {
    align-items: center;
}

.shop-attendance__icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(152, 0, 255, 0.22) 0%, rgba(82, 51, 105, 0.34) 100%);
    border: 1px solid rgba(152, 0, 255, 0.28);
}

.shop-attendance__icon svg {
    width: 16px;
    height: 16px;
}

.shop-attendance__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(200, 140, 255, 0.28);
    background: rgba(82, 51, 105, 0.42);
    color: #e9c8ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shop-attendance-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(119, 67, 164, 0.24) 0%, rgba(26, 26, 34, 0.98) 60%),
        var(--shop-surface);
    border: 1px solid rgba(152, 0, 255, 0.24);
}

.shop-attendance-card__rewards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.shop-attendance-reward {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(152, 0, 255, 0.18);
    color: var(--shop-text);
    font-size: 14px;
}

.shop-attendance-note {
    margin: 0;
    color: var(--shop-text-sub);
    font-size: 12px;
    line-height: 1.5;
}

.shop-toast {
    position: absolute;
    left: 50%;
    bottom: calc(var(--footer-total) + 16px);
    transform: translate(-50%, 12px);
    min-width: 140px;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    border-radius: 999px;
    text-align: center;
    color: var(--shop-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: rgba(15, 15, 20, 0.96);
    border: 1px solid var(--shop-border-strong);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
}

.shop-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
