.loyalty-booklet {
    margin-top: 1.5rem;
}
.loyalty-booklet__cover {
    position: relative;
    border-radius: 1.25rem;
    border: 1px solid color-mix(in srgb, hsl(var(--primary)) 30%, transparent);
    background: linear-gradient(160deg, color-mix(in srgb, hsl(var(--primary)) 10%, #fff) 0%, #fff 50%, color-mix(in srgb, hsl(var(--secondary)) 6%, #fff) 100%);
    box-shadow: 0 14px 36px -22px color-mix(in srgb, hsl(var(--primary)) 40%, transparent);
    padding: 1.25rem 1.25rem 1.1rem;
    overflow: hidden;
}
.loyalty-booklet__cover::before {
    content: '';
    position: absolute;
    inset: 0.65rem;
    border: 1px dashed color-mix(in srgb, hsl(var(--primary)) 22%, transparent);
    border-radius: 0.85rem;
    pointer-events: none;
}
.loyalty-booklet__header {
    position: relative;
    margin-bottom: 1rem;
}
.loyalty-booklet__badge {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, hsl(var(--primary)) 14%, #fff);
    color: hsl(var(--primary));
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.loyalty-booklet__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}
.loyalty-booklet__subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
}
.loyalty-booklet__progress-meta {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.loyalty-booklet__count {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: hsl(var(--primary));
}
.loyalty-booklet__count-label {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
}
.loyalty-booklet__cycle {
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid hsl(var(--border));
}
.loyalty-booklet__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.35rem, 1fr));
    gap: 0.45rem;
    margin-bottom: 1.1rem;
}
.loyalty-booklet__stamp {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px dashed color-mix(in srgb, hsl(var(--border)) 90%, transparent);
    background: rgba(255, 255, 255, 0.65);
    color: hsl(var(--muted-foreground));
    font-size: 0.72rem;
    font-weight: 600;
}
.loyalty-booklet__stamp--collected {
    border-style: solid;
    border-color: hsl(var(--primary));
    background: color-mix(in srgb, hsl(var(--primary)) 14%, #fff);
    color: hsl(var(--primary));
}
.loyalty-booklet__stamp--milestone {
    box-shadow: 0 0 0 2px color-mix(in srgb, hsl(var(--primary)) 25%, transparent);
}
.loyalty-booklet__stamp-icon {
    width: 1rem;
    height: 1rem;
}
.loyalty-booklet__stages {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.loyalty-booklet__stage {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid color-mix(in srgb, hsl(var(--border)) 85%, transparent);
    opacity: 0.72;
}
.loyalty-booklet__stage--unlocked {
    opacity: 1;
    border-color: color-mix(in srgb, hsl(var(--primary)) 35%, transparent);
    background: color-mix(in srgb, hsl(var(--primary)) 6%, #fff);
}
.loyalty-booklet__stage-marker {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    font-size: 0.72rem;
    font-weight: 700;
}
.loyalty-booklet__stage--unlocked .loyalty-booklet__stage-marker {
    background: hsl(var(--primary));
    color: #fff;
}
.loyalty-booklet__stage-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}
.loyalty-booklet__stage-meta {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: hsl(var(--muted-foreground));
}
.loyalty-booklet__stage-earned {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, hsl(var(--primary)) 16%, #fff);
    color: hsl(var(--primary));
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}
.loyalty-booklet__next {
    position: relative;
    margin: 0.85rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid color-mix(in srgb, hsl(var(--border)) 80%, transparent);
    font-size: 0.82rem;
    color: hsl(var(--muted-foreground));
}

.book-price-summary {
    border-radius: 0.85rem;
    border: 1px solid hsl(var(--border));
    background: color-mix(in srgb, hsl(var(--muted)) 35%, #fff);
    padding: 0.9rem 1rem;
}
.book-price-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
    color: hsl(var(--muted-foreground));
    padding: 0.2rem 0;
}
.book-price-summary__row--discount {
    color: hsl(var(--primary));
}
.book-price-summary__row--total {
    margin-top: 0.45rem;
    padding-top: 0.55rem;
    border-top: 1px solid hsl(var(--border));
    font-size: 1rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}
.book-price-summary__row[hidden] {
    display: none !important;
}

.book-price-summary__split {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed color-mix(in srgb, hsl(var(--border)) 85%, transparent);
}

.book-price-summary__split-title {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}

.book-discount-field {
    display: flex;
    gap: 0.5rem;
}
.book-discount-field input[type="text"] {
    flex: 1;
}
.book-discount-field__add {
    flex-shrink: 0;
    padding: 0 1rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--primary));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.book-discount-field__add:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.book-discount-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, hsl(var(--primary)) 10%, #fff);
    border: 1px solid color-mix(in srgb, hsl(var(--primary)) 30%, transparent);
    font-size: 0.85rem;
}
.book-discount-applied[hidden] {
    display: none !important;
}
.book-discount-applied__code {
    font-weight: 700;
    color: hsl(var(--primary));
}
.book-discount-applied__remove {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.book-discount-error {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #b91c1c;
}
.book-discount-error[hidden] {
    display: none !important;
}
