.shop-page > .section-profile-cover {
    height: 360px;
}

.shop-page > .section-skew {
    padding-top: 24px;
    padding-bottom: 48px;
}

.shop-page > .section-skew > .container {
    max-width: 1520px;
}

.shop-catalog-section {
    margin-top: 24px;
}

.oix-shop-includes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 25px;
    padding: 15px 18px;
    margin: 0 0 30px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface);
}

.oix-shop-includes-label {
    color: var(--theme-muted);
    font-size: 12px;
}

.oix-shop-includes ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    color: var(--theme-copy);
    font-size: 12px;
}

.oix-shop-includes li {
    display: flex;
    align-items: center;
    gap: 7px;
}

.oix-shop-includes svg {
    width: 14px;
    height: 14px;
    color: var(--theme-primary);
}

.oix-shop-toolbar {
    margin-bottom: 22px;
    border-bottom: 1px solid var(--theme-border);
}

.oix-shop-filter {
    display: flex;
    gap: 27px;
}

.oix-shop-filter button {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 11px 0 15px;
    color: var(--theme-muted);
    font-size: 14px;
    white-space: nowrap;
}

.oix-shop-filter button[aria-selected=true] {
    color: var(--theme-text);
    border-bottom-color: var(--theme-primary);
    font-weight: 600;
}

.oix-category-count {
    font-size: 10px;
    color: var(--theme-muted);
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--theme-surface-raised);
    margin-left: 5px;
    vertical-align: 1px;
}

.oix-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.shop-shell .oix-shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--theme-border);
    border-radius: 11px;
    background: var(--theme-surface);
    padding: 23px 23px 19px;
    transition: border-color .15s, box-shadow .15s;
}

.shop-shell .oix-shop-card:hover {
    border-color: rgba(var(--theme-primary-rgb), .5);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .07);
}

.oix-card-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    margin-bottom: 11px;
}

.oix-plan-symbol {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-raised);
    color: var(--theme-copy);
}

.oix-plan-symbol svg {
    width: 16px;
    height: 16px;
}

.oix-plan-index {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 10px;
    color: var(--theme-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: .05em;
}

.shop-shell .oix-shop-card h2 {
    font-weight: 600;
    font-size: 19px;
    min-height: 29px;
    line-height: 1.5;
    letter-spacing: -.03em;
    margin: 0 0 4px;
}

.oix-plan-description {
    color: var(--theme-copy);
    font-size: 12px;
    margin: 0 0 17px;
    min-height: 20px;
}

.oix-plan-warning {
    color: var(--theme-warning-text);
    font-size: 11px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

/* Safari 收缩这段弹性内容时会多压掉几像素，把最后一个字挤到第二行
   中文在最窄的卡片里也放得下，直接禁止收缩；英文更长，仍允许换行 */
.oix-plan-warning,
.oix-plan-warning-text {
    flex-shrink: 0;
}

.oix-plan-warning-text {
    white-space: nowrap;
}

:lang(en) .oix-plan-warning,
:lang(en) .oix-plan-warning-text {
    flex-shrink: 1;
    white-space: normal;
}

.oix-warning-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--theme-warning-text);
}

.oix-warning-trigger svg {
    width: 14px;
    height: 14px;
}

.oix-warning-trigger:hover {
    background: var(--theme-warning-soft);
}

.oix-warning-reason {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 5;
    padding: 12px 14px;
    border: 1px solid var(--theme-border);
    border-radius: 7px;
    background: var(--theme-surface-raised);
    box-shadow: var(--theme-shadow-soft);
    color: var(--theme-copy);
    font-size: 12px;
    line-height: 1.7;
    font-weight: 400;
}

.oix-billing-options {
    display: flex;
    align-items: stretch;
    gap: 3px;
    background: var(--theme-surface-soft);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    padding: 3px;
    min-height: 35px;
    margin-bottom: 20px;
}

.oix-billing-options button {
    flex: 1;
    min-width: 0;
    background: none;
    color: var(--theme-copy);
    padding: 4px 1px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.6;
    white-space: nowrap;
}

.oix-billing-options button[aria-pressed=true] {
    background: var(--theme-surface-raised);
    border-color: rgba(var(--theme-primary-rgb), .25);
    color: var(--theme-primary);
}

.oix-single-period {
    font-size: 11px;
    color: var(--theme-copy);
    padding: 5px 7px;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.oix-single-period span {
    color: var(--theme-muted);
}

.oix-price-display {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-height: 42px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.oix-currency {
    font-size: 18px;
    color: var(--theme-copy);
    align-self: flex-start;
    margin-top: 4px;
}

.oix-price-amount {
    color: var(--theme-text);
    font-size: 36px;
    font-weight: 620;
    line-height: 1.15;
    letter-spacing: -.045em;
}

.oix-price-period {
    font-size: 12px;
    color: var(--theme-copy);
    margin-left: 3px;
}

.oix-price-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    min-height: 27px;
    color: var(--theme-copy);
    margin-top: 7px;
}

.oix-price-note .oix-savings {
    color: var(--theme-success-text);
}

.oix-price-section {
    min-height: 136px;
}

.oix-developer-benefit {
    min-height: 136px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--theme-border);
    border-radius: 7px;
    background: var(--theme-surface-soft);
}

.oix-developer-benefit span {
    font-size: 11px;
    color: var(--theme-muted);
}

.oix-developer-benefit strong {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 22px;
    font-weight: 550;
    color: var(--theme-copy);
}

.oix-developer-benefit svg {
    width: 24px;
    height: 24px;
    color: var(--theme-primary);
}

.oix-plan-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 14px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
}

.oix-plan-specs dt {
    color: var(--theme-copy);
    font-size: 12px;
    line-height: 1.6;
}

.oix-plan-specs dd {
    margin: 5px 0 0;
    color: var(--theme-text);
    font-size: 20px;
    font-weight: 550;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.oix-plan-specs dd small {
    font-size: 11px;
    color: var(--theme-copy);
    font-weight: 400;
    margin-left: 3px;
}

.oix-plan-routes {
    padding: 17px 0 0;
}

.oix-plan-section-title {
    font-size: 12px;
    color: var(--theme-copy);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.oix-node-count {
    font-size: 11px;
}

/* 线路按行排列：两列小格在四列卡片里每格只有约 79px，字号提不上去 */
.oix-plan-routes ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
}

.oix-plan-routes li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid rgba(var(--theme-primary-rgb), .35);
    background: rgba(var(--theme-primary-rgb), .07);
    color: var(--theme-text);
    font-size: 13px;
    line-height: 1.35;
}

.oix-plan-routes li svg {
    color: var(--theme-primary);
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
}

/* 未包含的线路靠虚线框和破折号区分，不再整体降透明度，否则文字对比度只剩 2:1 */
.oix-plan-routes li.is-unavailable {
    background: none;
    border-color: var(--theme-border);
    border-style: dashed;
    color: var(--theme-muted);
}

.oix-route-dash {
    display: inline-block;
    width: 13px;
    text-align: center;
    flex: 0 0 13px;
}

.oix-route-copy {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3px 10px;
    min-width: 0;
}

.oix-route-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.35;
}

.oix-route-detail {
    font-size: 12px;
    color: var(--theme-copy);
    line-height: 1.35;
}

.oix-route-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.oix-route-tag {
    font-size: 11px;
    line-height: 1.5;
    color: var(--theme-primary);
    border: 1px solid rgba(var(--theme-primary-rgb), .19);
    background: rgba(var(--theme-primary-rgb), .07);
    border-radius: 3px;
    padding: 0 4px;
    white-space: nowrap;
}

.oix-plan-routes li.is-unavailable :is(.oix-route-detail, .oix-route-tag) {
    color: var(--theme-muted);
    border-color: var(--theme-border);
    background: none;
}

.oix-gia-access {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 41px;
    padding: 10px 1px 0;
    margin-top: 10px;
    border-top: 1px solid var(--theme-border);
    font-size: 13px;
    color: var(--theme-copy);
}

.oix-gia-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.oix-gia-heading strong {
    font-weight: 550;
}

.oix-gia-heading > span {
    font-size: 12px;
}

.oix-gia-heading svg {
    width: 15px;
    height: 15px;
}

.oix-gia-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.oix-gia-status svg {
    width: 13px;
    height: 13px;
    color: var(--theme-primary);
}

.oix-gia-access.is-included .oix-gia-heading strong,
.oix-gia-access.is-included .oix-gia-heading svg,
.oix-gia-access.is-included .oix-gia-status {
    color: var(--theme-primary);
}

.oix-gia-access.is-unavailable {
    color: var(--theme-muted);
}

.oix-plan-limits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 17px 0;
    padding-top: 15px;
    border-top: 1px solid var(--theme-border);
    font-size: 12px;
    color: var(--theme-copy);
}

.oix-plan-limits dd {
    display: block;
    color: var(--theme-text);
    font-size: 17px;
    font-weight: 500;
    margin-top: 3px;
    line-height: 1.3;
}

.oix-plan-limits > div + div {
    padding-left: 18px;
    border-left: 1px solid var(--theme-border);
}

.shop-shell .oix-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    border: 1px solid rgba(var(--theme-primary-rgb), .32);
    background: rgba(var(--theme-primary-rgb), .08);
    border-radius: 6px;
    color: var(--theme-primary);
    font-size: 13px;
    font-weight: 550;
}

.shop-shell .oix-btn:hover {
    background: var(--theme-primary);
    color: var(--theme-on-primary);
}

.shop-shell .oix-btn svg {
    width: 15px;
}

/* 售罄等禁用状态的文字仍要读得清，靠底色和边框表现不可点 */
.shop-shell .oix-btn:disabled {
    color: var(--theme-copy);
    border-color: var(--theme-border);
    background: var(--theme-surface-raised);
}

.oix-shop-assurance {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--theme-muted);
    font-size: 12px;
    padding: 20px 1px;
}

.oix-shop-assurance svg {
    width: 15px;
    height: 15px;
    margin-top: 3px;
}

.oix-shop-assurance strong {
    color: var(--theme-copy);
    font-weight: 500;
}

@media (min-width: 1500px) {
    .shop-shell .oix-shop-card {
        padding: 27px;
    }

}

@media (max-width: 1050px) and (min-width: 701px) {
    .oix-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-shell .oix-shop-card {
        padding: 22px;
    }

}

@media (max-width: 900px) {
    .oix-shop-grid {
        gap: 14px;
    }

    .shop-shell .oix-shop-card h2 {
        font-size: 18px;
    }

    .oix-shop-includes {
        gap: 10px 20px;
    }

    .oix-shop-includes ul {
        gap: 10px 19px;
    }

    .oix-price-amount {
        font-size: 32px;
    }

    .oix-plan-limits {
        gap: 6px;
    }

}

@media (max-width: 700px) {
    .oix-shop-includes {
        padding: 14px 16px;
        margin-bottom: 19px;
        gap: 10px;
    }

    .oix-shop-includes-label {
        width: 100%;
        font-size: 11px;
    }

    .oix-shop-includes ul {
        gap: 8px 15px;
        font-size: 11px;
    }

    .oix-shop-includes li {
        gap: 5px;
    }

    .oix-shop-includes svg {
        width: 12px;
    }

    .oix-shop-toolbar {
        margin-bottom: 18px;
    }

    .oix-shop-filter {
        gap: 23px;
    }

    .oix-shop-filter button {
        font-size: 13px;
        padding: 10px 0 13px;
    }

    .oix-category-count {
        display: none;
    }

    .oix-shop-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 17px;
    }

    .shop-shell .oix-shop-card {
        padding: 22px;
    }

    .shop-shell .oix-shop-card h2 {
        font-size: 21px;
    }

    .oix-price-amount {
        font-size: 36px;
    }

    .oix-billing-options button {
        font-size: 12px;
    }

    .shop-shell .oix-btn {
        min-height: 43px;
    }

    .oix-shop-assurance {
        font-size: 11px;
    }

}

.shop-shell [hidden] {
    display: none !important;
}

.shop-shell .oix-shop-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.oix-shop-plan {
    min-width: 0;
    display: flex;
}

.shop-shell .oix-shop-card {
    width: 100%;
    height: 100%;
    box-shadow: none;
}

.oix-card-actions {
    margin-top: auto;
}

.shop-shell .oix-btn {
    text-decoration: none;
}

.shop-shell .oix-btn-default {
    color: var(--theme-muted);
    border-color: var(--theme-border);
    background: var(--theme-surface-raised);
}

.shop-shell .oix-btn:disabled {
    cursor: not-allowed;
}

.shop-shell button:focus-visible, .shop-shell a:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 3px;
}

.oix-plan-description {
    line-height: 1.6;
}

.oix-discount-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.oix-savings {
    color: var(--theme-success-text);
}

.oix-plan-specs dt, .oix-plan-limits dt {
    font-weight: 400;
}

.oix-plan-limits dt {
    margin: 0;
    font-size: 12px;
}

.oix-plan-limits a, .oix-plan-specs a {
    color: inherit;
}

.oix-plan-limits a:hover, .oix-plan-specs a:hover {
    color: var(--theme-primary);
}

.oix-shop-empty {
    padding: 42px 16px;
    color: var(--theme-muted);
    text-align: center;
}

.shop-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.shop-overview-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--theme-primary);
    font-size: 11px;
    font-weight: 600;
}

.shop-overview-heading {
    margin: 0 0 9px;
    color: var(--theme-text);
    font-size: 30px;
    font-weight: 650;
    line-height: 1.4;
}

.shop-overview-copy {
    margin: 0;
    color: var(--theme-muted);
    font-size: 13px;
    line-height: 1.8;
}

.shop-balance-summary {
    min-width: 210px;
    padding: 15px 18px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-surface);
}

.shop-balance-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 20px;
    align-items: center;
}

.shop-balance-label {
    color: var(--theme-muted);
    font-size: 11px;
}

.shop-balance-value {
    color: var(--theme-text);
    font-size: 23px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.shop-balance-link {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 12px;
}

.shop-public-actions {
    display: flex;
    gap: 10px;
}

.shop-public-actions .btn {
    margin: 0;
    white-space: nowrap;
}

.shop-public-overview {
    margin-top: 28px;
}

.shop-context-notice[hidden], .shop-coupon-status[hidden] {
    display: none !important;
}

#purchase_success .close > span {
    color: var(--theme-text);
}

@media (max-width: 700px) {
    .shop-overview {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .shop-overview-heading {
        font-size: 27px;
    }

    .shop-balance-summary {
        width: 100%;
    }

    .shop-balance-item {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .shop-balance-link {
        grid-column: 3;
        grid-row: 1;
    }

    .shop-balance-value {
        font-size: 20px;
    }

    .shop-shell .oix-shop-filter {
        gap: 20px;
        overflow-x: auto;
        padding: 3px 3px 0;
        margin: -3px -3px 0;
    }

}

@media (prefers-reduced-motion: reduce) {
    .shop-shell .oix-shop-card {
        transition: none;
    }

}

.oix-shop-grid[data-category="team"] {
    max-width: 780px;
    margin-inline: auto;
}

.oix-shop-grid.is-single {
    grid-template-columns: minmax(0, 380px);
    justify-content: center;
}

@media (min-width: 1280px) {
    .oix-shop-grid[data-category="personal"]:not(.is-single) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {
    .oix-shop-grid[data-category="team"] {
        max-width: none;
    }

    .oix-shop-grid.is-single {
        grid-template-columns: minmax(0, 1fr);
    }

}

/* 暗色下 --theme-border 与卡片底色只有 1.45:1，卡片轮廓看不出来 */
html[data-theme="dark"] .shop-shell .oix-shop-card {
    border-color: #34476b;
}

html[data-theme="dark"] .shop-shell .oix-shop-card:hover {
    border-color: rgba(var(--theme-primary-rgb), .5);
}

.shop-price-info {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-raised);
}

.shop-price-breakdown[hidden] {
    display: none;
}

.shop-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--theme-copy);
    font-size: 13px;
}

.shop-price-row + .shop-price-row:not(.shop-price-total) {
    margin-top: 8px;
}

.shop-price-row > :last-child {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.shop-price-original {
    color: var(--theme-muted);
    text-decoration: line-through;
}

.shop-price-discount {
    color: var(--theme-success-text);
}

.shop-price-total {
    color: var(--theme-text);
    font-size: 14px;
    font-weight: 600;
}

.shop-price-info.has-coupon .shop-price-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--theme-border);
}

.shop-final-price {
    color: var(--theme-primary);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.shop-discount-info {
    display: none;
    margin-top: 10px;
    color: var(--theme-success-text);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-line;
}

.shop-aff-balance-warning {
    display: none;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

#buy_modal .modal-content {
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-copy);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 24px);
    overflow: hidden;
}

#buy_modal .modal-header {
    border-bottom: 1px solid var(--theme-border);
    padding: 16px 20px;
}

#buy_modal .modal-body {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

#buy_modal .modal-footer {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    border-top: 1px solid var(--theme-border);
    padding: 16px 20px;
}

#buy_modal .modal-footer .btn {
    min-height: 44px;
    margin: 0;
}

#buy_modal .modal-title {
    color: var(--theme-text);
    font-size: 18px;
    font-weight: 600;
}

#buy_modal .close {
    align-self: center;
    margin: -6px -6px -6px auto;
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
}

#buy_modal .modal-dialog {
    width: calc(100% - 24px);
    max-width: 640px;
    margin: 12px auto;
}

#buy_modal .modal-header,
#buy_modal .modal-footer {
    flex: 0 0 auto;
}

#buy_modal .root-legal-list {
    max-height: clamp(160px, 24vh, 200px);
    padding-right: 4px;
    scrollbar-color: var(--theme-muted) transparent;
}

#buy_modal .root-legal-list[hidden] {
    display: none;
}

#buy_modal .root-legal-list::-webkit-scrollbar-thumb {
    background: var(--theme-muted);
}

#buy_modal .root-legal-list:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

#buy_modal .root-legal-list li.is-danger {
    color: var(--theme-danger-text);
}

#buy_modal .root-legal-list li {
    margin-bottom: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.6;
    padding: 8px 0 8px 14px;
}

#buy_modal .root-legal-list li:last-child {
    border-bottom: 0;
}

#buy_modal .root-legal-list li::before {
    top: 14px;
    left: 0;
    width: 6px;
    height: 6px;
}

@supports (height: 100dvh) {
    #buy_modal .modal-content {
        max-height: calc(100dvh - 24px);
    }
}

.shop-order-summary {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--theme-border);
}

.shop-order-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--theme-muted);
    font-size: 13px;
}

.shop-order-row + .shop-order-row {
    margin-top: 7px;
}

.shop-order-row strong {
    min-width: 0;
    max-width: 65%;
    color: var(--theme-text);
    text-align: right;
    overflow-wrap: anywhere;
}

.shop-order-row:first-child strong {
    font-size: 16px;
}

.shop-context-notice {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--theme-warning);
    border-radius: 6px;
    background: var(--theme-warning-soft);
    color: var(--theme-warning-text);
    font-size: 13px;
    line-height: 1.5;
}

.shop-plan-assurance {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding: 11px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-surface-raised);
    color: var(--theme-text);
}

.shop-plan-assurance > i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--theme-success-text);
}

.shop-plan-assurance strong,
.shop-plan-assurance span {
    display: block;
}

.shop-plan-assurance strong {
    margin-bottom: 2px;
    font-size: 13px;
}

.shop-plan-assurance span {
    color: var(--theme-copy);
    font-size: 12px;
    line-height: 1.5;
}

.shop-coupon-status {
    margin-top: 6px;
    font-size: 12px;
}

.shop-coupon-status.is-success {
    color: var(--theme-success-text);
}

.shop-coupon-status.is-error {
    color: var(--theme-danger-text);
}

.shop-coupon-field,
.shop-autorenew {
    margin-bottom: 12px !important;
}

.shop-field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--theme-text);
    font-size: 13px;
    font-weight: 600;
}

.shop-terms-toggle {
    display: flex;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    margin: 0 0 10px;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--theme-border);
    background: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.shop-terms-toggle[aria-expanded="false"] {
    margin-bottom: 0;
}

.shop-terms-toggle:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

.shop-terms-toggle > i {
    flex: 0 0 auto;
    color: var(--theme-muted);
    font-size: 11px;
    transition: transform 0.2s ease;
}

.shop-terms-toggle[aria-expanded="true"] > i {
    transform: rotate(180deg);
}

.shop-terms-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px 12px;
    color: var(--theme-text);
    font-size: 13px;
    font-weight: 700;
}

.shop-terms-heading span {
    color: var(--theme-muted);
    font-size: 11px;
    font-weight: 500;
}

.shop-tos-consent {
    margin-top: 12px;
}

#buy_modal .custom-control-label {
    color: var(--theme-copy);
    font-size: 13px;
    line-height: 1.6;
}

#buy_modal .custom-control-label::before {
    border: 1px solid var(--theme-muted);
    background: var(--theme-surface);
}

#buy_modal .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--theme-primary);
    background: var(--theme-primary);
}

#buy_modal .custom-control-input:disabled ~ .custom-control-label {
    color: var(--theme-muted);
}

#buy_modal .custom-control-input:disabled ~ .custom-control-label::before {
    background: var(--theme-surface-soft);
}

#buy_modal .form-control {
    min-width: 0;
    height: 44px;
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid var(--theme-border);
}

#buy_modal .shop-coupon-field .input-group {
    gap: 8px;
}

#buy_modal .shop-coupon-field .input-group-append {
    margin-left: 0;
}

#buy_modal .shop-coupon-field .btn {
    border-radius: 6px;
    min-height: 44px;
}

#buy_modal .form-control:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
}


@media (max-width: 576px) {
    #buy_modal .modal-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
    }

    #buy_modal .modal-content {
        max-height: calc(100vh - 16px);
    }

    #buy_modal .root-legal-list {
        max-height: clamp(140px, 30vh, 190px);
    }

    #buy_modal .modal-body {
        padding: 14px 16px;
    }

    #buy_modal .modal-header {
        padding: 12px 16px;
    }

    #buy_modal .modal-footer {
        padding: 12px 16px;
    }

    #buy_modal .modal-footer .btn-secondary {
        min-width: 84px;
    }

    @supports (height: 100dvh) {
        #buy_modal .modal-content {
            max-height: calc(100dvh - 16px);
        }
    }
}
