/* 云核赠品活动页：在商城蓝色视觉基础上适配移动端。 */
:root {
    --yh-primary: #198dfe;
    --yh-primary-dark: #0876df;
    --yh-primary-light: #eaf4ff;
    --yh-text: #17233d;
    --yh-text-secondary: #65738b;
    --yh-text-muted: #99a4b5;
    --yh-background: #f4f7fb;
    --yh-border: #e6ebf2;
    --yh-danger: #e34d59;
    --yh-warning: #b87912;
    --yh-success: #20a873;
    --yh-shadow: 0 8px 28px rgba(35, 81, 135, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    color: var(--yh-text);
    background: var(--yh-background);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(25, 141, 254, 0.25);
    outline-offset: 2px;
}

button,
a {
    touch-action: manipulation;
}

[hidden] {
    display: none !important;
}

.page-shell {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 0 16px 32px;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 540px;
    min-height: 56px;
    margin: 0 auto;
    padding: env(safe-area-inset-top) 16px 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(230, 235, 242, 0.8);
    backdrop-filter: blur(12px);
}

.top-nav__brand,
.top-nav__title {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.top-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.brand-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(145deg, #55b5ff, var(--yh-primary));
    border-radius: 10px;
    box-shadow: 0 5px 12px rgba(25, 141, 254, 0.2);
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 40px;
    margin-left: -8px;
    color: var(--yh-text);
    text-decoration: none;
}

.back-link svg {
    width: 24px;
    height: 24px;
}

.top-nav__side {
    min-width: 36px;
}

.text-button {
    padding: 7px 0 7px 10px;
    color: var(--yh-primary);
    font-size: 13px;
    white-space: nowrap;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.text-button:disabled {
    color: var(--yh-text-muted);
    cursor: default;
}

.primary-button,
.secondary-button,
.card-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(100deg, #35a5ff, var(--yh-primary));
    border: 0;
    box-shadow: 0 8px 18px rgba(25, 141, 254, 0.22);
}

.primary-button:active:not(:disabled),
.card-action:active:not(:disabled) {
    transform: scale(0.98);
}

.primary-button:disabled,
.card-action:disabled {
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.58;
}

.secondary-button {
    color: var(--yh-primary);
    background: #fff;
    border: 1px solid #b9dafe;
}

.is-loading::before {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    content: "";
    animation: yh-spin 0.75s linear infinite;
}

@keyframes yh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 登录 */
.login-page {
    background: #edf4fc;
}

.login-shell {
    width: 100%;
    max-width: 540px;
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
}

.login-hero {
    position: relative;
    min-height: 300px;
    padding: calc(44px + env(safe-area-inset-top)) 28px 96px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(140deg, #0879e8 0%, #2ca5ff 65%, #70c3ff 100%);
}

.login-hero::before,
.login-hero::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    content: "";
}

.login-hero::before {
    top: -92px;
    right: -66px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.06);
}

.login-hero::after {
    right: 64px;
    bottom: 24px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.04);
}

.login-hero__content {
    position: relative;
    z-index: 2;
}

.login-hero h1 {
    margin: 0 0 14px;
    font-size: 34px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.login-hero__subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
}

/* 礼盒装饰图：移到文案右侧、垂直居中偏上，与标题块对齐，不再压在底部圆环上。 */
.login-gift {
    position: absolute;
    right: 32px;
    top: 42%;
    bottom: auto;
    z-index: 1;
    width: 90px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    transform: rotate(-8deg);
}

.login-gift::before {
    position: absolute;
    top: -13px;
    left: -6px;
    width: 98px;
    height: 17px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    content: "";
}

.login-gift::after {
    position: absolute;
    top: -12px;
    left: 38px;
    width: 10px;
    height: 87px;
    background: rgba(255, 255, 255, 0.16);
    content: "";
}

.login-panel {
    position: relative;
    z-index: 3;
    margin-top: -58px;
    padding: 28px 24px calc(30px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 28px 28px 0 0;
}

.login-panel__heading {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 650;
}

.login-panel__tip {
    margin: 0 0 26px;
    color: var(--yh-text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin: 0 0 9px;
    color: var(--yh-text);
    font-size: 14px;
    font-weight: 600;
}

.input-shell {
    display: flex;
    align-items: center;
    min-height: 52px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #dfe7f0;
    border-radius: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-shell:focus-within {
    background: #fff;
    border-color: var(--yh-primary);
    box-shadow: 0 0 0 3px rgba(25, 141, 254, 0.09);
}

.form-input {
    flex: 1;
    min-width: 0;
    height: 50px;
    padding: 0 15px;
    color: var(--yh-text);
    font-size: 16px;
    background: transparent;
    border: 0;
    outline: 0;
}

.form-input::placeholder {
    color: #a8b2c1;
    font-size: 14px;
}

.code-button {
    align-self: stretch;
    min-width: 112px;
    padding: 0 13px;
    color: var(--yh-primary);
    font-size: 13px;
    white-space: nowrap;
    background: #fff;
    border: 0;
    border-left: 1px solid var(--yh-border);
    cursor: pointer;
}

.code-button:disabled {
    color: var(--yh-text-muted);
    background: #f6f8fb;
    cursor: not-allowed;
}

.field-error {
    margin: 4px 2px 0;
    color: var(--yh-danger);
    font-size: 12px;
    line-height: 1.5;
}

.login-submit {
    width: 100%;
    margin-top: 7px;
}

.login-security {
    margin: 20px 0 0;
    color: var(--yh-text-muted);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

/* 列表头部 */
.account-hero {
    position: relative;
    margin: 16px 0 22px;
    padding: 22px 20px 20px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #087be9, #38a9ff);
    border-radius: 20px;
    box-shadow: 0 12px 26px rgba(25, 126, 224, 0.18);
}

.account-hero::after {
    position: absolute;
    top: -72px;
    right: -46px;
    width: 190px;
    height: 190px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    content: "";
}

.account-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 21px;
    font-size: 14px;
}

.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.account-avatar svg {
    width: 17px;
    height: 17px;
}

.account-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 650;
    line-height: 1.4;
}

.account-hero__subtitle {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    font-size: 13px;
    opacity: 0.86;
}

.available-ticket {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    width: fit-content;
    min-height: 43px;
    padding: 9px 15px;
    color: #147fdc;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(0, 86, 168, 0.12);
}

.available-ticket__label {
    margin-right: 12px;
    font-size: 13px;
}

.available-ticket strong {
    margin-right: 4px;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
}

.available-ticket__unit {
    font-size: 12px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 13px;
}

.section-heading h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
}

.section-heading p,
.section-heading span {
    margin: 0;
    color: var(--yh-text-secondary);
    font-size: 12px;
}

/* 权益订单卡 */
.equity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.equity-card {
    padding: 18px;
    background: #fff;
    border: 1px solid rgba(230, 235, 242, 0.9);
    border-radius: 18px;
    box-shadow: var(--yh-shadow);
}

.equity-card--available,
.equity-card--processing,
.equity-card--claimed {
    cursor: pointer;
}

.equity-card--available {
    border-color: #d8eaff;
}

.equity-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.equity-card__meta {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    min-width: 0;
}

.order-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--yh-text-secondary);
    font-size: 12px;
}

.order-label::before {
    width: 4px;
    height: 14px;
    background: var(--yh-primary);
    border-radius: 4px;
    content: "";
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 10px;
    color: #7d8797;
    font-size: 12px;
    white-space: nowrap;
    background: #f0f2f5;
    border-radius: 14px;
}

.status-pill--available {
    color: #b7791f;
    background: #fff6df;
}

.status-pill--claimed {
    color: #1e9e5a;
    background: #e6f7ee;
}

.status-pill--processing {
    color: #117bdc;
    background: #eaf4ff;
}

.equity-card__main {
    display: flex;
    gap: 15px;
}

.image-frame {
    position: relative;
    flex: none;
    overflow: hidden;
    background: linear-gradient(145deg, #f0f6fc, #f8fafc);
    border: 1px solid #edf1f6;
    border-radius: 13px;
}

.equity-image-frame {
    width: 108px;
    height: 108px;
}

.image-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #9db5cc;
    font-size: 11px;
    text-align: center;
}

.image-placeholder::before {
    width: 36px;
    height: 29px;
    background: linear-gradient(145deg, #e1effb, #d2e6f8);
    border: 2px solid #b9d5ec;
    border-radius: 6px;
    box-shadow: inset 11px 0 0 rgba(255, 255, 255, 0.35);
    content: "";
}

.equity-card__info {
    flex: 1;
    min-width: 0;
}

.equity-name {
    margin: 1px 0 8px;
    overflow-wrap: anywhere;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.45;
}

.equity-code,
.equity-date {
    margin: 0;
    color: var(--yh-text-secondary);
    font-size: 12px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.equity-code {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.equity-date {
    margin-top: 4px;
}

.equity-date--closed {
    color: var(--yh-danger);
}

.equity-notes {
    margin-top: 15px;
    padding-top: 12px;
    color: var(--yh-text-secondary);
    font-size: 12px;
    border-top: 1px dashed var(--yh-border);
}

.equity-notes summary {
    color: #52647b;
    cursor: pointer;
}

.equity-notes p {
    margin: 9px 0 0;
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.order-number {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    color: var(--yh-text-muted);
    font-size: 11px;
    line-height: 1.6;
}

.order-number__value {
    overflow-wrap: anywhere;
    /* user-select:all 在移动端一点就整段选中，容易唤起系统【复制 | 搜索】菜单；改为普通可选中，长按仍可复制。 */
    -webkit-user-select: text;
    user-select: text;
}

.order-number__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    color: var(--yh-primary);
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    /* 长按复制图标不应弹出系统文本菜单 / 长按浮层。 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.order-number__copy svg {
    width: 11px;
    height: 11px;
}

.order-number__copy:active:not(:disabled) {
    background: var(--yh-primary-light);
    transform: scale(0.92);
}

.order-number__copy:disabled {
    cursor: default;
    opacity: 0.4;
}

.card-action {
    flex: none;
    min-height: 36px;
    padding: 0 18px;
    color: #fff;
    font-size: 13px;
    background: linear-gradient(100deg, #42aaff, var(--yh-primary));
    border: 0;
    box-shadow: 0 5px 12px rgba(25, 141, 254, 0.17);
}

.card-action--view,
.card-action--closed {
    color: #8b95a5;
    background: #edf0f4;
    box-shadow: none;
}

.card-action--view {
    cursor: pointer;
    opacity: 1;
}

/* 领取记录 */
.section-heading--records {
    margin-top: 26px;
}

.record-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.record-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    background: #fff;
    border: 1px solid rgba(230, 235, 242, 0.9);
    border-radius: 15px;
    box-shadow: var(--yh-shadow);
}

.record-card__main {
    flex: 1;
    min-width: 0;
}

.record-card__name {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* 领取记录：名称与状态徽章同行，徽章不再挤占订单号行的宽度。 */
.record-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.record-card__header .record-card__name {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.record-card__header .status-pill {
    flex-shrink: 0;
}

.record-card__order,
.record-card__time {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 6px;
    margin: 0;
    color: var(--yh-text-secondary);
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.record-card__time {
    margin-top: 3px;
}

.record-card__field-label {
    flex: none;
}

.record-card--claimed .status-pill {
    color: #267f60;
    background: #edf9f4;
}

.record-card--processing .status-pill {
    color: #b87912;
    background: #fff9eb;
}

.loading-state--compact {
    min-height: 120px;
}

/* 商品选择 */
.product-page {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

.order-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0 20px;
    padding: 16px;
    background: linear-gradient(120deg, #fff, #f5faff);
    border: 1px solid #dfeefa;
    border-radius: 17px;
    box-shadow: var(--yh-shadow);
}

.order-summary .image-frame {
    width: 74px;
    height: 74px;
}

.order-summary__content {
    flex: 1;
    min-width: 0;
}

.order-summary__title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.order-summary h1 {
    flex: 1;
    min-width: 0;
    margin: 0 0 7px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.order-summary p {
    margin: 2px 0 0;
    color: var(--yh-text-secondary);
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.product-section-heading {
    margin-top: 4px;
}

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

/* 空状态占满整行，避免被塞进三列网格的单一格子 */
.product-list .empty-state {
    grid-column: 1 / -1;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 10px 8px 11px;
    background: #eaf3fd;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* 设计稿三色浅底，按序轮换 */
.product-card--tint-pink {
    background: #fdf0f4;
}

.product-card--tint-green {
    background: #eef7ec;
}

.product-card--selectable {
    cursor: pointer;
}

.product-card--selected {
    border-color: var(--yh-primary);
    box-shadow: 0 8px 22px rgba(25, 141, 254, 0.13);
    transform: translateY(-1px);
}

.product-card--disabled {
    cursor: default;
}

.product-card__radio {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--yh-primary);
    cursor: pointer;
}

.product-card__radio:disabled {
    cursor: default;
}

.product-card__label {
    display: block;
    flex: 1;
    padding: 0;
}

.product-card .product-image-frame {
    width: 100%;
    aspect-ratio: 1 / 0.9;
    margin-bottom: 8px;
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.product-image-frame img {
    object-fit: contain;
}

.product-name {
    margin: 0 0 9px;
    color: #3c4657;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    /* 占住两行高度，名称长短不一时各卡按钮仍对齐 */
    min-height: 34px;
    text-align: center;
    overflow-wrap: anywhere;
}

/* 每张商品卡自带的领取按钮 */
.product-card__claim {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    padding: 0 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--yh-primary);
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.product-card__claim:active:not(:disabled) {
    opacity: 0.82;
}

.product-card__claim:disabled {
    background: #c8d3e0;
    cursor: default;
}

/* 已领取：浅绿底绿字，与状态标签配色一致 */
.product-card__claim--claimed,
.product-card__claim--claimed:disabled {
    color: #1e9e5a;
    background: #e6f7ee;
    cursor: default;
}

/* 使用须知按钮：浅黄底，位于领取按钮下方 */
.product-card__info {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    margin-top: 8px;
    padding: 0 6px;
    color: #8a6d1a;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: #fdf6dc;
    border: 1px solid #f3e5a9;
    border-radius: 16px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.product-card__info:active {
    opacity: 0.82;
}

.product-spec {
    display: inline-block;
    max-width: 100%;
    margin: 0 0 8px;
    padding: 3px 7px;
    overflow: hidden;
    color: #4481b9;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
    background: #eef6fd;
    border-radius: 5px;
}

.product-desc {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--yh-text-secondary);
    font-size: 11px;
    line-height: 1.65;
    white-space: pre-line;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.product-instructions {
    margin: 0 10px 12px;
    padding-top: 9px;
    color: var(--yh-text-secondary);
    font-size: 11px;
    border-top: 1px dashed var(--yh-border);
}

.product-instructions summary {
    color: #5d7188;
    cursor: pointer;
}

.product-instructions p {
    margin: 8px 0 0;
    line-height: 1.75;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.product-card--selected::after {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border-right: 21px solid var(--yh-primary);
    border-top: 21px solid transparent;
    content: "";
    pointer-events: none;
}

.claim-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 540px;
    min-height: 76px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--yh-border);
    box-shadow: 0 -8px 24px rgba(38, 65, 96, 0.06);
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

.claim-bar__selection {
    flex: 1;
    min-width: 0;
}

.claim-bar__selection span,
.claim-bar__selection strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.claim-bar__selection span {
    margin-bottom: 3px;
    color: var(--yh-text-muted);
    font-size: 11px;
}

.claim-bar__selection strong {
    font-size: 13px;
    font-weight: 600;
}

.claim-button {
    flex: none;
    min-width: 124px;
    min-height: 45px;
    padding: 0 18px;
}

.claim-button--status {
    color: #7f8998;
    background: #edf0f4;
    border: 0;
    box-shadow: none;
    opacity: 1;
}

.claim-result {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 18px 0 4px;
    padding: 16px;
    color: #267f60;
    background: #edf9f4;
    border: 1px solid #d6f0e5;
    border-radius: 14px;
}

.claim-result__check {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #fff;
    font-size: 18px;
    background: var(--yh-success);
    border-radius: 50%;
}

.claim-result strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.claim-result p {
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
}

/* 加载、空状态及反馈 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 30px;
    color: var(--yh-text-secondary);
    font-size: 13px;
}

.loading-state::before {
    width: 28px;
    height: 28px;
    margin-bottom: 13px;
    border: 3px solid #dbe9f7;
    border-top-color: var(--yh-primary);
    border-radius: 50%;
    content: "";
    animation: yh-spin 0.8s linear infinite;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 44px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--yh-border);
    border-radius: 18px;
}

.empty-state__art {
    position: relative;
    width: 96px;
    height: 80px;
    margin-bottom: 19px;
    background: linear-gradient(145deg, #eff6fd, #e5f0fa);
    border-radius: 24px 24px 30px 30px;
}

.empty-state__art::before {
    position: absolute;
    top: 24px;
    left: 26px;
    width: 43px;
    height: 35px;
    background: #d5e6f6;
    border: 2px solid #b6d2e9;
    border-radius: 7px;
    content: "";
}

.empty-state__art::after {
    position: absolute;
    top: 17px;
    left: 22px;
    width: 51px;
    height: 12px;
    background: #e5f1fb;
    border: 2px solid #b6d2e9;
    border-radius: 5px;
    content: "";
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.empty-state p {
    max-width: 280px;
    margin: 0;
    color: var(--yh-text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.empty-state .secondary-button {
    min-height: 38px;
    margin-top: 18px;
    font-size: 13px;
}

.inline-feedback {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 13px;
    font-size: 12px;
    line-height: 1.65;
    border: 1px solid transparent;
    border-radius: 11px;
}

.inline-feedback--error {
    color: #b63d48;
    background: #fff3f4;
    border-color: #ffe0e3;
}

.inline-feedback--warning {
    color: #9a6813;
    background: #fff9eb;
    border-color: #f6e8bd;
}

.inline-feedback--info {
    color: #3474ae;
    background: #eff7ff;
    border-color: #dcecff;
}

.inline-feedback--success {
    color: #267f60;
    background: #edf9f4;
    border-color: #d6f0e5;
}

.feedback-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.feedback-action {
    flex: none;
    padding: 0;
    color: currentColor;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: underline;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Toast 与确认弹窗 */
.toast {
    position: fixed;
    left: 50%;
    z-index: 120;
    top: auto;
    bottom: calc(98px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 48px);
    padding: 11px 18px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    visibility: hidden;
    background: rgba(23, 32, 48, 0.88);
    color: #fff;
    border-radius: 10px;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.toast.show {
    visibility: visible;
    transform: translate(-50%, 0);
}

.yh-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 28, 46, 0.48);
    backdrop-filter: blur(2px);
}

.yh-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 101;
    width: calc(100% - 56px);
    max-width: 360px;
    padding: 25px 22px 20px;
    background: #fff;
    border-radius: 19px;
    box-shadow: 0 18px 60px rgba(10, 35, 65, 0.2);
    transform: translate(-50%, -50%);
}

.yh-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 14px;
    color: var(--yh-primary);
    font-size: 23px;
    font-weight: 650;
    background: var(--yh-primary-light);
    border-radius: 50%;
}

.yh-modal__title {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 650;
    text-align: center;
}

.yh-modal__text {
    margin: 0 0 22px;
    color: var(--yh-text-secondary);
    font-size: 14px;
    line-height: 1.75;
    text-align: center;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.yh-modal__buttons {
    display: flex;
    gap: 11px;
}

.yh-modal__buttons button {
    flex: 1;
    min-height: 42px;
    font-size: 14px;
}

body.modal-open {
    overflow: hidden;
}

/* 使用须知弹窗：富文本内容超出高度时滚动展示 */
.instructions-modal {
    padding-bottom: 20px;
}

.instructions-modal__content {
    max-height: 46vh;
    margin: 0 0 18px;
    padding: 12px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: var(--yh-text-secondary);
    font-size: 13px;
    line-height: 1.75;
    text-align: left;
    background: #fafbfc;
    border-radius: 10px;
    overflow-wrap: anywhere;
}

/* 纯文本模式按换行展示；富文本模式不启用，避免标签间空白产生多余空行 */
.instructions-modal__content--plain {
    white-space: pre-line;
}

.instructions-modal__content p {
    margin: 0 0 8px;
}

.instructions-modal__content p:last-child {
    margin-bottom: 0;
}

.instructions-modal__content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 359px) {
    .page-shell {
        padding-right: 12px;
        padding-left: 12px;
    }

    .login-panel {
        padding-right: 20px;
        padding-left: 20px;
    }

    .equity-card {
        padding: 14px;
    }

    .equity-image-frame {
        width: 92px;
        height: 100px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .product-card__label {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        column-gap: 13px;
    }

    .product-image-frame {
        grid-row: 1 / 5;
        margin: 0;
    }

    .claim-bar {
        gap: 9px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .claim-button {
        min-width: 112px;
        padding: 0 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ===== 首页改版：权益订单卡片 ===== */
.home-page {
    background: #f7f8fa;
}

.home-top__user {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 16px;
    font-weight: 650;
    color: var(--yh-text);
}

.home-top__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    color: #7d8b9e;
    background: #e6ebf1;
    border-radius: 50%;
}

.home-top__avatar svg {
    width: 20px;
    height: 20px;
}

/* 右侧按钮组：领取记录与退出紧挨着，靠右对齐。 */
.home-top__actions {
    display: flex;
    align-items: center;
}

.home-top__records {
    padding: 7px 14px;
    color: #147bdc;
    font-size: 13px;
    background: var(--yh-primary-light, #e8f2fd);
    border-radius: 999px;
}

.home-top__records:active {
    opacity: 0.7;
}

/* 退出：无底色纯文字，字号小于领取记录，浅红色。 */
.home-top__logout {
    padding: 7px 0 7px 10px;
    color: #e08585;
    font-size: 12px;
    background: transparent;
    border: 0;
    white-space: nowrap;
    cursor: pointer;
}

.home-top__logout:active {
    opacity: 0.7;
}

/* 赠品下拉区：卡内展开的三列商品网格（对齐设计稿，详情页不再使用）。 */
.order-products {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e3e8ef;
}

.order-products__empty {
    margin: 4px 0;
    color: var(--yh-text-muted, #8a94a6);
    font-size: 12px;
    text-align: center;
}

.order-products__grid {
    display: grid;
    /* minmax(0,1fr) 防止 nowrap 的商品名把列撑出卡片宽度 */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mini-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 6px 8px;
    background: #f8fafc;
    border: 1px solid #eceff3;
    border-radius: 12px;
    text-align: center;
}

.mini-product__img {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.mini-product__img img {
    width: 100%;
    height: 52px;
    /* 与详情页一致用 contain，图片按原比例完整显示，不再被压扁。 */
    object-fit: contain;
    background: #fff;
    display: block;
}

.mini-product__name {
    margin: 5px 0 0;
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: var(--yh-text, #1f2733);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 领取与使用须知上下排列 */
.mini-product__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
    margin-top: 6px;
}

.mini-product__claim {
    flex: none;
    width: 100%;
    margin-top: 0;
    padding: 6px 0;
    color: #fff;
    font-size: 12px;
    background: var(--yh-primary, #198dfe);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.mini-product__claim:disabled {
    cursor: default;
}

.mini-product__claim--claimed,
.mini-product__claim--claimed:disabled {
    color: #1e9e5a;
    background: #e6f7ee;
}

.mini-product__claim--processing,
.mini-product__claim--processing:disabled {
    color: #147bdc;
    background: #e8f2fd;
}

.mini-product__claim--disabled,
.mini-product__claim--disabled:disabled {
    color: var(--yh-text-muted, #8a94a6);
    background: #eef1f5;
}

.mini-product__info {
    flex: none;
    width: 100%;
    margin-top: 0;
    padding: 5px 0;
    color: #8a6d1a;
    font-size: 11px;
    background: #fdf6dc;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

/* 可领取总次数提示条 */
.home-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 16px;
    padding: 11px 14px;
    color: #147bdc;
    font-size: 13px;
    background: #e9f4ff;
    border-radius: 10px;
}

.home-notice svg {
    flex: none;
    width: 16px;
    height: 16px;
}

.home-notice strong {
    font-weight: 700;
}

/* 权益订单卡 */
.home-order-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-order-card {
    padding: 15px 14px 16px;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(35, 81, 135, 0.05);
}

.home-order-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* 标题行可点时的下拉三角：圆形浅灰底 + 小三角，展开旋转朝上。 */
.home-order-card__head--toggle {
    cursor: pointer;
    /* 标题行是 div 而非 button，需单独关闭移动端点击时的整行灰色高亮。 */
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.home-order-card__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef2f7;
    flex-shrink: 0;
}

.home-order-card__chevron::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #7d8aa0;
    transition: transform 0.2s ease;
}

.home-order-card__chevron--open::after {
    transform: rotate(180deg);
}

.home-order-card__title {
    flex: none;
    color: #3c4657;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.home-order-card__title strong {
    color: var(--yh-text);
    font-weight: 700;
}

/* 标题行内联来源：占标题之后剩余宽度，过长省略 */
.home-order-card__source-inline {
    flex: 1;
    min-width: 0;
    color: var(--yh-text-secondary);
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 剩余机会、下单时间与状态标签保持一行 */
.home-order-card__chance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 2px 0;
    color: var(--yh-text-secondary);
    font-size: 12.5px;
    white-space: nowrap;
}

.home-order-card__chance .status-pill {
    flex-shrink: 0;
}

.home-order-card__date {
    color: var(--yh-text-muted);
    font-size: 12px;
}

/* 底部通栏描边按钮：查看赠品 */
.home-order-card__view {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin-top: 14px;
    color: var(--yh-primary);
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    border: 1px solid rgba(25, 141, 254, 0.55);
    border-radius: 21px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.home-order-card__view:active:not(:disabled) {
    opacity: 0.75;
}

/* 活动终止/领取过期时按钮置灰 */
.home-order-card__view:disabled {
    color: #9aa7b6;
    background: #f5f7fa;
    border-color: #dde3ea;
    cursor: default;
}

.status-pill--closed {
    color: #7d8797;
    background: #f0f2f5;
}

.home-order-card__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 10px;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid #f1f3f6;
}

/* 卡片内加赠商品 */
.product-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 0;
    cursor: pointer;
}

/* 无候选商品时的订单状态 + 查看按钮 */
.order-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 0 4px;
}

.order-empty__status {
    margin: 0;
    color: var(--yh-text-secondary);
    font-size: 12.5px;
}

.order-empty__btn {
    min-height: 32px;
    padding: 0 20px;
    font-size: 12.5px;
    border-radius: 16px;
}

.product-mini .image-frame {
    width: 100%;
    aspect-ratio: 1 / 0.92;
    border-radius: 10px;
}

.product-mini__name {
    max-width: 100%;
    margin: 0;
    color: var(--yh-text);
    font-size: 12.5px;
    font-weight: 550;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-mini__btn {
    min-height: 31px;
    padding: 0 17px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    background: linear-gradient(100deg, #42aaff, var(--yh-primary));
    border: 0;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(25, 141, 254, 0.18);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.product-mini__btn:active:not(:disabled) {
    transform: scale(0.96);
}

.product-mini__btn:disabled {
    color: #98a3b3;
    background: #eef1f5;
    box-shadow: none;
    cursor: default;
}

/* 底部广告位：无数据保留简洁提示，有数据展示文字及全部图片。 */
.home-ad {
    margin: 18px 0 4px;
    padding: 12px 14px;
    color: #4a5464;
    font-size: 12.5px;
    line-height: 1.7;
    background: #eef0f3;
    border-radius: 10px;
}

.home-ad--filled {
    padding: 14px;
    background: #fff;
    border: 1px solid #e7edf4;
    box-shadow: 0 5px 18px rgba(30, 73, 118, 0.06);
}

.home-ad__empty {
    margin: 0;
    color: #909399;
    text-align: center;
}

.home-ad__item + .home-ad__item {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #edf1f5;
}

.home-ad__title {
    margin: 0 0 6px;
    color: var(--yh-text);
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.home-ad__content {
    margin: 0;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.home-ad__gallery {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

/* 广告角标：广告图区右上角小字标识 */
.ad-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 2px 7px;
    font-size: 10px;
    line-height: 1.4;
    color: #fff;
    background: rgba(23, 32, 48, 0.45);
    border-radius: 4px;
    pointer-events: none;
}

/* 多图广告轮播 */
.ad-carousel {
    position: relative;
}

.ad-carousel__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ad-carousel__track::-webkit-scrollbar {
    display: none;
}

.ad-carousel__slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: center;
}

.ad-carousel__dots {
    position: absolute;
    right: 10px;
    bottom: 8px;
    display: flex;
    gap: 5px;
    padding: 4px 8px;
    background: rgba(23, 32, 48, 0.35);
    border-radius: 999px;
    pointer-events: none;
}

.ad-carousel__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ad-carousel__dot--active {
    background: #fff;
    transform: scale(1.15);
}

.home-ad__gallery:first-child {
    margin-top: 0;
}

.home-ad__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f5f7fa;
    border: 0;
    border-radius: 8px;
}

.home-ad__image img {
    object-fit: contain;
}

/* 领取记录底部弹层 */
.records-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 28, 46, 0.48);
    backdrop-filter: blur(2px);
}

.records-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 101;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 540px;
    max-height: 74vh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(10, 35, 65, 0.18);
    transform: translateX(-50%);
}

.records-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.records-sheet__head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
}

.records-sheet__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #8b96a6;
    background: #f2f4f7;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.records-sheet__close svg {
    width: 17px;
    height: 17px;
}

.records-sheet__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.records-sheet .record-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

@media (max-width: 359px) {
    .home-order-card__grid {
        gap: 10px 7px;
    }

    .product-mini__btn {
        padding: 0 12px;
    }
}

/* 刷新状态按钮：齿轮图标，查询中旋转 */
.refresh-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.refresh-status-btn .refresh-gear {
    width: 15px;
    height: 15px;
}

.refresh-status-btn.is-refreshing .refresh-gear {
    animation: gear-spin 0.9s linear infinite;
}

.refresh-status-btn:disabled {
    opacity: 0.6;
}

@keyframes gear-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 下拉刷新指示器 */.pull-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 0;
    overflow: hidden;
    color: var(--yh-text-secondary, #5b6675);
    font-size: 12px;
    transition: height 0.18s ease;
    pointer-events: none;
}

.pull-refresh--dragging {
    transition: none;
}

.pull-refresh__spinner {
    flex: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(25, 141, 254, 0.25);
    border-top-color: #198dfe;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pull-refresh--active .pull-refresh__spinner {
    opacity: 1;
}

.pull-refresh--loading .pull-refresh__spinner {
    animation: pull-spin 0.8s linear infinite;
}

@keyframes pull-spin {
    to {
        transform: rotate(360deg);
    }
}

