* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
html, body { min-height: 100%; }

body {
    min-height: 100%;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
    -webkit-tap-highlight-color: rgba(255, 214, 236, 0.16);
    background:
        radial-gradient(1100px 620px at 50% -10%, rgba(255, 130, 205, 0.30), transparent 62%),
        radial-gradient(900px 560px at 100% 100%, rgba(165, 120, 255, 0.28), transparent 60%),
        radial-gradient(760px 520px at 0% 100%, rgba(90, 200, 255, 0.15), transparent 60%),
        #150a2e;
}

.bg-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.bg-media {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    object-fit: cover;
    filter: blur(var(--blur, 0px));
    transform: scale(1.05);
}
.bg-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        180deg,
        rgba(24,10,48, calc(var(--overlay, 0.55) + 0.1)) 0%,
        rgba(24,10,48, var(--overlay, 0.55)) 45%,
        rgba(30,14,56, calc(var(--overlay, 0.55) + 0.15)) 100%
    );
}

#snow-canvas, #petal-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
#snow-canvas { z-index: 3; }
#petal-canvas { z-index: 4; }

.top-fixed {
    position: fixed;
    top: 3.5vh;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    padding: 0 16px;
    padding: env(safe-area-inset-top) 16px 0;
    box-sizing: border-box;
    pointer-events: none;
}

.shop-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 20px;
    padding: 2.6rem 2.5rem;
    max-width: 620px;
    width: 100%;
    box-shadow:
        0 34px 90px -30px rgba(0, 0, 0, 0.9),
        0 0 70px -16px rgba(255, 120, 200, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.30);
    text-align: center;
    pointer-events: auto;
}

.site-head {
    position: relative;
    width: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    pointer-events: none;
}

.site-logo {
    position: relative;
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 214, 236, 0.75);
    background: linear-gradient(135deg, #ff6ec7, #a855f7);
    box-shadow:
        0 0 34px rgba(255, 120, 200, 0.5),
        0 14px 34px -14px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.site-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.site-logo-empty {
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55), transparent 46%),
        linear-gradient(135deg, #ff6ec7, #a855f7 55%, #7c5cff);
}
.site-logo-empty::after {
    content: "";
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.45);
}

.site-title {
    max-width: min(92vw, 900px);
    font-size: clamp(2rem, 5.4vw, 2.9rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow:
        0 2px 20px rgba(255, 120, 200, 0.4),
        0 2px 14px rgba(0, 0, 0, 0.6);
    word-break: break-word;
}

.shop-description {
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(246,236,255, 0.85);
}

.button-group {
    position: fixed;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: max-content;
    max-width: calc(100vw - 32px);
    bottom: 78px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 12;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    border-radius: 100px;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: #f7eeff;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    -webkit-touch-callout: none;
}
.btn:hover {
    background: rgba(255, 255, 255, 0.30);
    border-color: rgba(255, 255, 255, 0.59);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -12px rgba(255, 120, 200, 0.75);
}
.btn:active { transform: translateY(0); }

.footer-text {
    position: fixed;
    bottom: 28px;
    bottom: calc(28px + env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(246,236,255, 0.6);
    z-index: 5;
    pointer-events: none;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.music-player {
    position: fixed;
    bottom: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    right: calc(20px + env(safe-area-inset-right));
    z-index: 999;
    color: #f7eeff;
    user-select: none;
    font-size: 14px;
}

/* 甲板 */
.music-bar {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    width: 380px;
    padding: 13px 14px 16px;
    background: linear-gradient(180deg, rgba(46, 24, 82, 0.94), rgba(22, 11, 46, 0.96));
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255,214,236, 0.3);
    border-radius: 18px;
    box-shadow:
        0 22px 56px -20px rgba(0, 0, 0, 0.92),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
}

/* 第一行：封面 + 曲目 + 控制 */
.music-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

/* 播放进度条 */
.music-seek {
    position: relative;
    height: 9px;
    margin: 1px 5px 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65);
    cursor: pointer;
    transition: height 0.18s;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}
/* 扩大点击热区 */
.music-seek::before {
    content: '';
    position: absolute;
    top: -9px;
    bottom: -9px;
    left: 0;
    right: 0;
}
.music-seek:hover,
.music-seek.dragging { height: 13px; }
.seek-fill {
    position: relative;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff6ec7, #b98bff);
    border-radius: 999px;
    box-shadow: 0 0 16px rgba(255, 120, 210, 0.6);
    pointer-events: none;
}
.seek-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 15px;
    height: 15px;
    margin: -7.5px 0 0 -7.5px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 0 3px rgba(255,214,236, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.7);
    opacity: 1;
    transform: scale(1);
    transition: transform 0.18s, box-shadow 0.18s;
    pointer-events: none;
}
.music-seek:hover .seek-thumb,
.music-seek.dragging .seek-thumb {
    transform: scale(1.22);
    box-shadow:
        0 0 0 4px rgba(255,214,236, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.75);
}

/* 封面：方块均衡器 */
.music-cover {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, #241634, #150b28);
    border: 1px solid rgba(255,214,236, 0.45);
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    z-index: 3;
    font-family: inherit;
}
.music-cover:hover {
    border-color: rgba(255,214,236, 0.9);
    background: linear-gradient(155deg, #301d47, #1e1133);
}
.music-player.playing .music-cover {
    border-color: rgba(255,214,236, 0.75);
    box-shadow: 0 0 0 3px rgba(255,214,236, 0.12);
}
.eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}
.eq i {
    display: block;
    width: 3px;
    height: 7px;
    border-radius: 2px;
    background: #ffd6ec;
    opacity: 0.45;
    transition: height 0.3s;
}
.music-player.playing .eq i {
    opacity: 1;
    animation: eqBeat 1s ease-in-out infinite;
}
.music-player.playing .eq i:nth-child(2) { animation-delay: 0.16s; }
.music-player.playing .eq i:nth-child(3) { animation-delay: 0.34s; }
.music-player.playing .eq i:nth-child(4) { animation-delay: 0.08s; }
.music-player.playing .eq i:nth-child(5) { animation-delay: 0.26s; }
@keyframes eqBeat {
    0%, 100% { height: 5px; }
    50% { height: 20px; }
}

/* 曲目信息 */
.music-info {
    flex: 1;
    min-width: 0;
    max-width: 170px;
    transition: opacity 0.25s ease, max-width 0.35s ease;
    white-space: nowrap;
    overflow: hidden;
}
.music-title {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-sub {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
}
.music-artist {
    font-size: 0.68rem;
    color: #c0a8e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.music-time {
    font-size: 0.64rem;
    color: #c9b6ee;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* 控制区 */
.music-ctrls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 3;
    transition: opacity 0.25s ease, max-width 0.35s ease;
}
.music-btn, .music-list-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #b7a6e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.2s;
    font-family: inherit;
}
.music-btn:hover, .music-list-btn:hover {
    background: rgba(255,214,236, 0.18);
    border-color: rgba(255,214,236, 0.6);
    color: #ffffff;
}
.music-btn:active, .music-list-btn:active { transform: translateY(1px); }
.music-btn-main {
    width: 36px;
    height: 36px;
    background: #ffd6ec;
    border-color: #ffd6ec;
    color: #150a2e;
}
.music-btn-main:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #150a2e;
}

/* 纯 CSS 图标 */
.ic { display: block; position: relative; }
.ic-play {
    width: 11px;
    height: 12px;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.music-btn-main.is-playing .ic-play {
    clip-path: none;
    background:
        linear-gradient(currentColor, currentColor) left center / 3.5px 100% no-repeat,
        linear-gradient(currentColor, currentColor) right center / 3.5px 100% no-repeat;
}
.ic-prev, .ic-next { width: 12px; height: 11px; }
.ic-prev::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 2.5px; height: 11px;
    background: currentColor;
}
.ic-prev::after {
    content: '';
    position: absolute;
    left: 3.5px; top: 0;
    border-style: solid;
    border-width: 5.5px 8px 5.5px 0;
    border-color: transparent currentColor transparent transparent;
}
.ic-next::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    border-style: solid;
    border-width: 5.5px 0 5.5px 8px;
    border-color: transparent transparent transparent currentColor;
}
.ic-next::after {
    content: '';
    position: absolute;
    right: 0; top: 0;
    width: 2.5px; height: 11px;
    background: currentColor;
}
.ic-list {
    width: 14px;
    height: 12px;
    background:
        linear-gradient(currentColor, currentColor) left top / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) left center / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
}

/* 收起 */
.music-player.collapsed .music-bar { width: 76px; gap: 0; }
.music-player.collapsed .music-info,
.music-player.collapsed .music-ctrls {
    opacity: 0;
    max-width: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}
.music-player.collapsed .music-seek {
    height: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

/* 歌单 */
.music-playlist {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 300px;
    max-height: 380px;
    background: rgba(22,11,46, 0.97);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    border: 1px solid rgba(255,214,236, 0.3);
    border-radius: 16px;
    box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.95);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.music-playlist.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.playlist-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 700;
    color: #f7eeff;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.playlist-header .count {
    font-size: 0.7rem;
    color: #9c88cc;
    font-weight: 500;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
.playlist-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
}
.playlist-body::-webkit-scrollbar { width: 4px; }
.playlist-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}
.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.82rem;
}
.playlist-item:hover { background: rgba(255, 255, 255, 0.07); }
.playlist-item.active { background: rgba(255,214,236, 0.14); }
.playlist-item .item-index {
    width: 18px;
    text-align: center;
    font-size: 0.68rem;
    color: #9c88cc;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.playlist-item.active .item-index { color: #ffd6ec; font-weight: 700; }
.playlist-item .item-info { flex: 1; min-width: 0; }
.playlist-item .item-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f4eaff;
}
.playlist-item .item-artist {
    font-size: 0.68rem;
    color: #9c88cc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.playlist-item.active .item-title { color: #ffffff; }
.playlist-item.active::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd6ec;
    flex-shrink: 0;
}
.playlist-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
    color: #c0a8e8;
    flex-shrink: 0;
    letter-spacing: 1.5px;
}
.playlist-volume input[type="range"] {
    flex: 1;
    height: 4px;
    accent-color: #ffd6ec;
    cursor: pointer;
}

.message-btn {
    position: fixed;
    bottom: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px;
    left: calc(20px + env(safe-area-inset-left));
    z-index: 998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(32,16,58, 0.75);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255,214,236, 0.4);
    box-shadow: 0 15px 40px -14px rgba(0, 0, 0, 0.8);
    color: #f7eeff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    user-select: none;
    touch-action: none;
    font-family: inherit;
    padding: 0;
}
.message-btn:hover {
    background: rgba(255,214,236, 0.16);
    border-color: rgba(255,214,236, 0.7);
}
.message-btn:active { cursor: grabbing; }

.msg-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(14,6,30, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}
.msg-overlay.show { opacity: 1; visibility: visible; }
.msg-panel {
    width: 100%;
    max-width: 480px;
    margin-top: auto;
    background: #170d2c;
    border-radius: 20px 20px 0 0;
    padding: 0;
    padding: 0 0 env(safe-area-inset-bottom);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-top: 1px solid rgba(255,214,236, 0.35);
    box-shadow: 0 -24px 70px -20px rgba(0, 0, 0, 0.9);
}
.msg-overlay.show .msg-panel { transform: translateY(0); }
.msg-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: #1c1136;
    border-bottom: 1px solid rgba(255,214,236, 0.25);
    flex-shrink: 0;
}
.msg-panel-header h3 { font-size: 1rem; font-weight: 700; color: #f7eeff; }
.msg-panel-header .close {
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #c0a8e8;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.msg-panel-header .close:hover { background: rgba(255,140,190, 0.2); color: #ff9ec9; }
.msg-panel-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    min-height: 150px;
    max-height: 40vh;
}
.msg-panel-body::-webkit-scrollbar { width: 4px; }
.msg-panel-body::-webkit-scrollbar-thumb { background: rgba(255,214,236, 0.4); border-radius: 4px; }
.msg-hint {
    text-align: center;
    color: #9c88cc;
    font-size: 0.85rem;
    padding: 2rem 1rem;
}
.msg-sent-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,214,236, 0.14);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #f6efff;
    animation: msgSlide 0.3s ease;
}
@keyframes msgSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg-sent-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.55rem;
}
.msg-sent-item .msg-time {
    font-size: 0.7rem;
    color: #9c88cc;
    margin-left: auto;
}
.msg-sent-item img,
.msg-sent-item video {
    display: block;
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 0.5rem;
}
.msg-panel-footer {
    background: #1c1136;
    border-top: 1px solid rgba(255,214,236, 0.25);
    padding: 0.6rem 0.8rem;
    flex-shrink: 0;
}
.msg-file-preview {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    background: rgba(255,214,236, 0.1);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255,214,236, 0.3);
}
.msg-file-preview.show { display: flex; }
.msg-file-preview .thumb {
    width: 40px; height: 40px;
    border-radius: 6px;
    background: #20123a center/cover no-repeat;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9c88cc;
    font-size: 0.7rem;
    overflow: hidden;
}
.msg-file-preview .thumb img,
.msg-file-preview .thumb video {
    width: 100%; height: 100%;
    object-fit: cover;
}
.msg-file-preview .name {
    flex: 1;
    font-size: 0.8rem;
    color: #e2d3f5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.msg-file-preview .remove {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,140,190, 0.2);
    border: none;
    color: #ff9ec9;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: inherit;
}
.msg-input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}
.msg-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 0.6rem 1rem;
    border: 1.5px solid rgba(255,214,236, 0.3);
    border-radius: 20px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.06);
    color: #f7eeff;
    resize: none;
    outline: none;
    transition: all 0.2s;
    line-height: 1.5;
}
.msg-input:focus { border-color: #ffd6ec; background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 3px rgba(255,214,236, 0.18); }
.msg-input::placeholder { color: #7f70a8; }
.msg-nick-input {
    flex: 1;
    width: 100%;
    padding: 0.4rem 0.9rem;
    border: 1.5px solid rgba(255,214,236, 0.22);
    border-radius: 20px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    color: #f7eeff;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}
.msg-nick-input:focus { border-color: #ffd6ec; background: rgba(255, 255, 255, 0.09); }
.msg-nick-input::placeholder { color: #7f70a8; }
.msg-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    background: rgba(255,214,236, 0.14);
    border: 1px solid rgba(255,214,236, 0.35);
}
.msg-nick {
    font-size: 0.78rem;
    font-weight: 700;
    color: #c0a8e8;
    letter-spacing: 0.5px;
}
.msg-emoji-btn,
.msg-plus-btn {
    height: 40px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: inherit;
    transition: all 0.2s;
    padding: 0 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.msg-emoji-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #c0a8e8;
}
.msg-emoji-btn:hover { background: rgba(255,214,236, 0.18); color: #ffd6ec; }
.msg-emoji-btn.active { background: rgba(255,214,236, 0.18); color: #ffd6ec; }
.msg-plus-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #c0a8e8;
    font-size: 1.1rem;
    padding: 0 0.7rem;
}
.msg-plus-btn:hover { background: rgba(255,214,236, 0.18); color: #ffd6ec; }
.msg-plus-btn.active { background: rgba(255,214,236, 0.18); color: #ffd6ec; }

/* 表情面板：8 列大格子 */
.msg-emoji-panel {
    display: none;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.2rem;
    padding: 0.5rem;
    background: #140a28;
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}
.msg-emoji-panel.show { display: grid; }
.msg-emoji-panel::-webkit-scrollbar { width: 4px; }
.msg-emoji-panel::-webkit-scrollbar-thumb { background: rgba(255,214,236, 0.4); border-radius: 4px; }
.msg-emoji-panel .emoji {
    width: 100%;
    min-height: 40px;
    aspect-ratio: 1 / 1;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
    padding: 0;
    line-height: 1;
}
.msg-emoji-panel .emoji:hover {
    background: rgba(255,214,236, 0.18);
    transform: scale(1.15);
}
.msg-emoji-panel .emoji:active {
    transform: scale(0.95);
}

.msg-plus-panel {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0.6rem;
    background: #140a28;
    border-radius: 12px;
    margin-top: 0.5rem;
}
.msg-plus-panel.show { display: grid; }
.msg-plus-option {
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255,214,236, 0.25);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: #b7a6e0;
    font-size: 0.85rem;
    font-weight: 600;
}
.msg-plus-option:hover {
    border-color: #ffd6ec;
    background: rgba(255,214,236, 0.14);
    color: #ffd6ec;
}
.msg-send-btn {
    height: 40px;
    padding: 0 1.2rem;
    border-radius: 100px;
    background: #ffd6ec;
    border: none;
    color: #150a2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.2s;
}
.msg-send-btn:hover {
    background: #ffffff;
}
.msg-send-btn:active { transform: translateY(1px); }
.msg-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.msg-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(40, 34, 27, 0.96);
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 2000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.msg-toast.show { transform: translateX(-50%) translateY(0); }
.msg-toast.error { background: rgba(255,140,190, 0.95); }
.msg-toast.success { background: rgba(36,190,130, 0.95); }

@media (max-width: 480px) {
    .shop-card { padding: 2.4rem 1.5rem; border-radius: 20px; pointer-events: auto; }
    .top-fixed { top: 10px; gap: 18px; }
    .button-group { bottom: 86px; bottom: calc(86px + env(safe-area-inset-bottom)); }
    .site-head { gap: 10px; }
    .site-logo { width: 76px; height: 76px; border-width: 2px; }
    .site-logo-empty::after { inset: 11px; }
    .site-title { font-size: 1.7rem; letter-spacing: 2px; }
    .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
    .shop-description { font-size: 0.92rem; padding: 1rem 0.5rem; }
    .footer-text { bottom: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); font-size: 0.7rem; }

    .music-player {
        bottom: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        right: 12px;
        right: calc(12px + env(safe-area-inset-right));
    }
    .music-bar { padding: 8px; gap: 8px; width: 300px; }
    .music-cover { width: 40px; height: 40px; }
    .music-info { max-width: 120px; }
    .music-title { font-size: 0.76rem; }
    .music-artist { font-size: 0.62rem; }
    .music-time { font-size: 0.58rem; }
    .music-btn, .music-list-btn { width: 30px; height: 30px; }
    .music-ctrls { gap: 4px; }
    .music-playlist { width: 260px; max-height: 300px; }
    .music-player.collapsed .music-bar { padding: 8px; width: 56px; }

    .message-btn {
        bottom: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        left: calc(12px + env(safe-area-inset-left));
        width: 52px; height: 52px;
        font-size: 0.75rem;
    }

    .msg-emoji-panel { grid-template-columns: repeat(7, 1fr); }
    .msg-emoji-panel .emoji { font-size: 1.15rem; }
    .msg-sent-item img,
    .msg-sent-item video { max-height: 140px; }
}