:root {
    --paper: #f5f0e6;
    --ink: #1d2520;
    --muted: #667169;
    --line: #d6c9b7;
    --panel: #fffdf8;
    --green: #0b7658;
    --green-soft: rgba(11, 118, 88, .12);
    --gold: #b67624;
    --red: #b94331;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Microsoft YaHei", Tahoma, sans-serif;
    background:
        linear-gradient(90deg, rgba(29, 37, 32, .055) 1px, transparent 1px),
        linear-gradient(rgba(29, 37, 32, .055) 1px, transparent 1px),
        linear-gradient(135deg, #f8f3ea 0%, #ecf4ef 56%, #fff5e4 100%);
    background-size: 30px 30px, 30px 30px, auto;
    letter-spacing: 0;
}

.shop-page {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 34px 0 28px;
}

.hero-strip,
.notice-panel,
.checkout-panel,
.readonly-context {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, .94);
    box-shadow: 0 20px 58px rgba(45, 38, 28, .12);
}

.hero-strip {
    padding: 26px 28px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 7px 0 0;
    line-height: 1.12;
    font-weight: 900;
}

h1 {
    font-size: 34px;
}

h2 {
    font-size: 24px;
}

.server-pill {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--muted);
    font-weight: 800;
    background: #fffaf0;
}

.checkout-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    gap: 18px;
    align-items: start;
}

.spec-list {
    display: grid;
    gap: 12px;
}

.spec-card {
    min-height: 92px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, .94);
    padding: 18px;
    cursor: pointer;
    box-shadow: 0 16px 42px rgba(45, 38, 28, .09);
}

.spec-card:has(input:checked) {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-soft), 0 16px 42px rgba(45, 38, 28, .1);
}

.spec-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
}

.spec-copy {
    display: grid;
    gap: 2px;
}

.spec-copy strong {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.spec-copy em {
    font-style: normal;
    color: var(--muted);
    font-weight: 800;
}

.server-picker {
    display: grid;
    grid-template-columns: auto minmax(210px, 1fr);
    align-items: center;
    gap: 10px;
    padding: 7px 9px 7px 12px;
}

.server-picker > span {
    color: var(--green);
    font-size: 12px;
    letter-spacing: .08em;
    white-space: nowrap;
}

.server-picker select {
    min-width: 220px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    outline: none;
}

.spec-meta {
    display: grid;
    justify-items: end;
    gap: 5px;
}

.spec-price {
    color: var(--gold);
    font-size: 19px;
    font-weight: 900;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.spec-discount {
    border: 1px solid rgba(182, 118, 36, .34);
    border-radius: 999px;
    padding: 3px 8px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.checkout-panel {
    padding: 22px;
    display: grid;
    gap: 16px;
}

.role-card {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.switch-phone-area {
    margin-top: 14px;
    text-align: right;
}

.switch-phone-btn {
    font-size: 13px;
    min-height: 0;
    padding: 6px 14px;
}

dl {
    margin: 14px 0 0;
    display: grid;
    gap: 10px;
}

dl div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
}

dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

dd {
    margin: 0;
    min-width: 0;
    font-size: 15px;
    line-height: 1.45;
    word-break: break-all;
    font-variant-numeric: tabular-nums;
}

.pay-select,
.role-select {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

select {
    width: 100%;
    min-height: 43px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    padding: 10px 12px;
    outline: none;
}

select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-soft);
}

.summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.summary-bar span {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}

button {
    border: 0;
    border-radius: 6px;
    background: var(--ink);
    color: white;
    min-height: 44px;
    padding: 0 20px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

button:disabled {
    opacity: .62;
    cursor: default;
}

.ghost-button {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
}

.status {
    min-height: 20px;
    color: var(--muted);
    line-height: 1.55;
}

.status.error,
.notice-panel p {
    color: var(--red);
}

.readonly-context {
    margin-top: 18px;
    padding: 18px 22px;
}

.readonly-context dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
}

.notice-panel {
    margin-top: 18px;
    padding: 28px;
}

.notice-panel p {
    margin: 12px 0 0;
    line-height: 1.7;
}

.confirm-layer {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(29, 37, 32, .5);
}

.confirm-layer[hidden] {
    display: none;
}

.confirm-dialog {
    width: min(420px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 24px;
    box-shadow: 0 24px 70px rgba(29, 37, 32, .26);
}

.confirm-dialog p {
    color: var(--muted);
    line-height: 1.7;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.sms-login {
    max-width: 460px;
    margin: 18px auto 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, .94);
    padding: 28px;
    box-shadow: 0 20px 58px rgba(45, 38, 28, .12);
}

.sms-login p {
    color: var(--muted);
    line-height: 1.7;
    margin: 12px 0 18px;
}

.sms-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}

.sms-row input {
    min-height: 43px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    padding: 10px 12px;
    outline: none;
}

.sms-row input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-soft);
}

.service-qrcode {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 150px;
    padding: 12px;
    border: 1px solid rgba(29, 37, 32, .18);
    border-radius: 8px;
    background: rgba(255, 253, 248, .96);
    box-shadow: 0 18px 46px rgba(48, 43, 33, .18);
    z-index: 10;
    text-align: center;
}

.service-qrcode__title,
.service-qrcode__hint {
    line-height: 1.35;
}

.service-qrcode__title {
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.service-qrcode__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.service-qrcode__tab {
    flex: 1;
    padding: 3px 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    min-height: 0;
    transition: background .15s, color .15s, border-color .15s;
}

.service-qrcode__tab.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.service-qrcode img {
    display: block;
    width: 126px;
    height: 126px;
    object-fit: contain;
    background: #fff;
    margin: 0 auto;
}

.service-qrcode__hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 780px) {
    .shop-page {
        padding: 18px 0;
    }

    .hero-strip {
        display: block;
        padding: 22px;
    }

    .server-pill {
        margin-top: 14px;
    }

    .server-picker {
        grid-template-columns: 1fr;
    }

    .server-picker select {
        width: 100%;
        min-width: 0;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .summary-bar,
    .confirm-actions {
        display: grid;
    }

    .summary-bar button,
    .confirm-actions button {
        width: 100%;
    }

    h1 {
        font-size: 30px;
    }

    .sms-row {
        grid-template-columns: 1fr;
    }

    dl div,
    .readonly-context dl {
        grid-template-columns: 1fr;
    }

    .service-qrcode {
        right: 12px;
        bottom: 12px;
        width: 118px;
        padding: 9px;
    }

    .service-qrcode__title {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .service-qrcode__tab {
        font-size: 10px;
        padding: 2px 0;
    }

    .service-qrcode img {
        width: 98px;
        height: 98px;
    }

    .service-qrcode__hint {
        margin-top: 6px;
        font-size: 11px;
    }
}
