.modal {
    position: fixed;
    inset: 0;
    z-index: var(--ui-z-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: auto;
    background: var(--ui-overlay);
    backdrop-filter: blur(4px);
}

.modal-panel {
    width: min(100%, 640px);
    max-height: min(88vh, 760px);
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-md);
    background: var(--ui-surface-raised);
    color: var(--ui-ink);
    box-shadow: var(--ui-shadow-lg);
}

.modal-head {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.modal-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.modal-actions {
    margin-top: 16px;
}

.notice-panel {
    width: min(100%, 620px);
}

.notice-panel .detail-content {
    max-height: min(56vh, 480px);
    overflow: auto;
}

.toast {
    position: fixed;
    z-index: var(--ui-z-toast);
    top: max(20px, env(safe-area-inset-top));
    left: 50%;
    max-width: min(92vw, 560px);
    padding: 11px 16px;
    border: 1px solid color-mix(in srgb, var(--ui-surface) 16%, transparent);
    border-radius: var(--ui-radius-md);
    background: var(--ui-heading);
    color: var(--ui-surface);
    box-shadow: var(--ui-shadow-lg);
    font-weight: 750;
    text-align: center;
    transform: translateX(-50%);
}

.share-panel {
    width: min(100%, 470px);
}

.share-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--ui-share-line);
    border-radius: var(--ui-radius-md);
    background: var(--ui-share-surface);
    color: var(--ui-share-ink);
    box-shadow: var(--ui-shadow-sm);
}

.share-card.is-saving {
    pointer-events: none;
}

.share-brand,
.share-cover {
    grid-column: 1 / -1;
}

.share-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.share-brand strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ui-share-ink);
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-brand span {
    flex: 0 0 auto;
    color: var(--ui-primary);
    font-size: 12px;
    font-weight: 750;
}

.share-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-image-placeholder);
}

.share-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-info {
    min-width: 0;
}

.share-info h3 {
    margin: 9px 0 5px;
    color: var(--ui-share-ink);
    font-size: 17px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.share-info p {
    margin: 0;
    color: var(--ui-share-muted);
    font-size: 12px;
}

.share-price {
    margin-top: 10px;
    color: var(--ui-price);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.share-qr {
    align-self: end;
    display: grid;
    justify-items: center;
    gap: 6px;
}

.share-qr img {
    width: 102px;
    height: 102px;
    border: 1px solid var(--ui-share-line);
    background: #ffffff;
}

.share-qr span {
    color: var(--ui-share-muted);
    font-size: 10px;
    font-weight: 700;
}

.share-actions {
    margin-top: 14px;
}

body.wechat-guide-active {
    overflow: hidden;
    background: #ffffff;
}

body.wechat-guide-active .app-shell,
body.wechat-guide-active .desktop-nav,
body.wechat-guide-active .bottom-nav,
body.wechat-guide-active .back-to-top,
body.wechat-guide-active .notice-modal {
    display: none;
}

body.wechat-guide-active .toast {
    z-index: calc(var(--ui-z-wechat) + 1);
}

.wechat-guide {
    position: fixed;
    inset: 0;
    z-index: var(--ui-z-wechat);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    color: #172033;
    font-family: var(--ui-font);
}

.wechat-guide-top {
    min-height: 82px;
    padding: 13px 20px 9px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #edf1f7;
    background: #f7f8fb;
    text-align: center;
}

.wechat-guide-top strong,
.wechat-guide-top small {
    display: block;
}

.wechat-guide-top strong {
    font-size: 21px;
    line-height: 1.15;
}

.wechat-guide-top small {
    margin-top: 4px;
    color: #687184;
    font-size: 12px;
    font-weight: 700;
}

.wechat-guide-close,
.wechat-guide-more {
    color: #172033;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
}

.wechat-guide-more {
    align-self: start;
    padding-top: 12px;
    font-size: 25px;
    font-weight: 800;
}

.wechat-guide-hero {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    background: #2d74f3;
    color: #ffffff;
}

.wechat-guide-hero::after {
    content: "";
    position: absolute;
    right: -8%;
    bottom: -86px;
    left: -8%;
    height: 164px;
    border-radius: 50% 50% 0 0;
    background: #ffffff;
}

.wechat-guide-text {
    position: relative;
    z-index: 2;
    padding: 36px 24px 0;
}

.wechat-guide-text strong,
.wechat-guide-text span {
    display: block;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.5;
}

.wechat-guide-target {
    position: absolute;
    z-index: 3;
    top: 26px;
    right: 26px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    box-shadow: 0 0 0 11px rgba(255, 255, 255, .12);
}

.wechat-guide-target span {
    position: absolute;
    top: 21px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffffff;
}

.wechat-guide-target span:nth-child(1) { left: 17px; }
.wechat-guide-target span:nth-child(2) { left: 32px; }
.wechat-guide-target span:nth-child(3) { left: 47px; }

.wechat-guide-pointer {
    position: absolute;
    z-index: 4;
    top: 76px;
    right: 34px;
    width: 54px;
    height: 72px;
    transform: rotate(22deg);
}

.wechat-guide-pointer::before,
.wechat-guide-pointer::after {
    content: "";
    position: absolute;
    background: #ffd7a6;
}

.wechat-guide-pointer::before {
    top: 17px;
    left: 19px;
    width: 20px;
    height: 52px;
    border-radius: 11px;
}

.wechat-guide-pointer::after {
    top: 0;
    left: 6px;
    width: 42px;
    height: 31px;
    border-radius: 22px 22px 15px 15px;
}

.wechat-guide-main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 30px 20px;
}

.wechat-copy-btn {
    min-width: min(74vw, 360px);
    min-height: 54px;
    border: 1px solid #b9c8db;
    border-radius: var(--ui-radius-round);
    background: #ffffff;
    color: #315fc4;
    font-size: 20px;
    font-weight: 800;
}

.wechat-guide-menu {
    position: relative;
    padding: 20px 8px 13px;
    background: #dff3fb;
}

.wechat-guide-menu-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px 7px;
}

.wechat-guide-menu-grid div {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #70849a;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.wechat-guide-menu-grid i {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--ui-radius-md);
    background: rgba(255, 255, 255, .72);
    color: #31506f;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
}

.wechat-guide-menu-grid .active {
    color: #2d4b6f;
}

.wechat-guide-menu-grid .active i {
    outline: 3px solid #b04c70;
    outline-offset: 4px;
}

.wechat-guide-menu-arrow {
    position: absolute;
    right: 27%;
    bottom: 64px;
    width: 16px;
    height: 76px;
    border-radius: var(--ui-radius-round);
    background: #b04c70;
}

.wechat-guide-menu-arrow::before {
    content: "";
    position: absolute;
    top: -26px;
    left: 50%;
    border-right: 26px solid transparent;
    border-bottom: 34px solid #b04c70;
    border-left: 26px solid transparent;
    transform: translateX(-50%);
}

.wechat-guide-menu-tip {
    min-height: 44px;
    margin-top: 16px;
    padding: 8px 14px;
    display: grid;
    place-items: center;
    border-radius: var(--ui-radius-round);
    background: #d3e85b;
    color: #263c55;
    font-size: 18px;
    font-weight: 850;
    text-align: center;
}
