/* ============================================================================
   中秋博饼 H5 - 全局样式
   放置路径：C:\phpstudy_pro\WWW\bobing.xyz\public\h5\css\style.css
   说明：纯 CSS/JS 实现，不依赖任何外部素材/动画库
   ============================================================================ */

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #fff7ec;
    color: #4a2c17;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 64px;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* 顶部条 */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(135deg, #c23321, #a31f10);
    color: #ffe9c9; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(163, 31, 16, 0.3);
}
.topbar .title { font-size: 17px; font-weight: bold; letter-spacing: 1px; }
.topbar .sub { font-size: 12px; opacity: 0.85; }

/* 底部导航 */
.app-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; z-index: 60;
    background: #fff; display: flex;
    border-top: 1px solid #f0e0cc;
    box-shadow: 0 -2px 10px rgba(74, 44, 23, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
}
.app-nav .nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 8px 0 6px; color: #9a7b5f; font-size: 11px;
}
.app-nav .nav-item .nav-icon { font-size: 20px; margin-bottom: 2px; }
.app-nav .nav-item.active { color: #c23321; font-weight: bold; }

/* Toast */
.app-toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
    background: rgba(40, 20, 8, 0.88); color: #ffe9c9;
    padding: 12px 22px; border-radius: 10px; font-size: 14px; z-index: 999;
    opacity: 0; pointer-events: none; transition: all 0.25s;
    max-width: 80%; text-align: center;
}
.app-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.app-toast.error { background: rgba(160, 30, 10, 0.92); }
.app-toast.success { background: rgba(30, 110, 60, 0.92); }

/* 确认弹窗（居中红金风格） */
.app-mask {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(40, 10, 0, 0.55);
}
.app-dialog {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    z-index: 10000; width: 78%; max-width: 340px;
    background: linear-gradient(180deg, #fffdf5, #fff3df);
    border: 2px solid #e6b14e; border-radius: 14px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: app-dialog-in 0.2s ease-out;
}
@keyframes app-dialog-in {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.92); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.app-dialog-title {
    background: linear-gradient(135deg, #b02a16, #d9481f);
    color: #ffe9c9; font-size: 15px; font-weight: bold;
    text-align: center; padding: 11px 12px; letter-spacing: 2px;
}
.app-dialog-body {
    color: #6b4a2b; font-size: 14px; line-height: 1.7;
    padding: 20px 16px; text-align: center;
    word-break: break-word; max-height: 42vh; overflow-y: auto;
}
.app-dialog-btns { display: flex; border-top: 1px solid #eed9b0; }
.app-dialog-btns .app-dialog-btn {
    flex: 1; border: none; background: none; padding: 13px 0;
    font-size: 15px; cursor: pointer; outline: none;
}
.app-dialog-btns .cancel {
    color: #8a6a4e; background: #fffaf0; border-right: 1px solid #eed9b0;
}
.app-dialog-btns .ok {
    color: #fff; font-weight: bold;
    background: linear-gradient(135deg, #b02a16, #d9481f);
}
.app-dialog-btns .ok:active { opacity: 0.85; }
.app-dialog-btns .cancel:active { background: #f7ecd7; }

/* 选项选择弹窗（picker） */
.app-dialog-opts { padding: 14px 14px 6px; }
.app-dialog-opt {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; border: 1px solid #eed9b0; background: #fffaf0;
    border-radius: 9px; padding: 11px 14px; margin-bottom: 9px;
    font-size: 14px; color: #6b4a2b; cursor: pointer; outline: none;
    box-shadow: 0 1px 2px rgba(176, 42, 22, 0.06);
}
.app-dialog-opt:active { background: #f7ecd7; transform: scale(0.99); }
.app-dialog-opt .opt-label { font-weight: 600; }
.app-dialog-opt .opt-sub { font-size: 12px; color: #b02a16; font-weight: bold; }

/* Loading */
.app-loading {
    position: fixed; inset: 0; z-index: 998; display: none;
    align-items: center; justify-content: center;
    background: rgba(255, 247, 236, 0.85);
}
.loading-box { text-align: center; }
.loading-spinner {
    width: 36px; height: 36px; margin: 0 auto 10px;
    border: 3px solid #f0dcc0; border-top-color: #c23321;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #8a6a4e; font-size: 13px; }

/* 卡片 */
.card {
    background: #fff; border-radius: 12px; padding: 16px;
    margin: 12px 14px; box-shadow: 0 2px 8px rgba(74, 44, 23, 0.06);
}
.card-title { font-size: 15px; font-weight: bold; margin-bottom: 10px; color: #6b3d1e; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #8a6a4e; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid #ead9c2; border-radius: 8px;
    background: #fffdf9; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #c23321;
}
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

/* 按钮 */
.btn {
    display: inline-block; padding: 11px 20px; border-radius: 10px;
    font-size: 15px; font-weight: bold; text-align: center;
    background: linear-gradient(135deg, #d8452f, #b02a16);
    color: #fff; width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }
.btn-ghost {
    background: #fff; color: #b02a16; border: 1.5px solid #e5b896;
}
.btn-sm { padding: 7px 14px; font-size: 13px; width: auto; }
.btn-green { background: linear-gradient(135deg, #4c9e5a, #2f7d3c); }

/* 合规提示条 */
.compliance-tip {
    background: #fff3e0; border: 1px solid #f0d9b8; color: #8a6a4e;
    border-radius: 8px; padding: 8px 12px; font-size: 12px;
    margin: 10px 14px; line-height: 1.6;
}
.compliance-tip strong { color: #b02a16; }

/* ============================================================================
   登录页
   ============================================================================ */
.login-page {
    min-height: 100vh; padding-bottom: 0;
    background: linear-gradient(180deg, #8f2b16 0%, #b0361d 45%, #fff7ec 45%);
}
.login-hero { text-align: center; padding: 48px 20px 30px; color: #ffe9c9; }
.login-hero .logo { font-size: 52px; }
.login-hero h1 { font-size: 24px; margin-top: 8px; letter-spacing: 3px; }
.login-hero p { font-size: 13px; opacity: 0.9; margin-top: 6px; }
.login-box { background: #fff; margin: 0 20px; border-radius: 16px; padding: 24px 20px; box-shadow: 0 8px 24px rgba(74,44,23,0.15); }
.login-tip { text-align: center; font-size: 12px; color: #a08a72; margin-top: 14px; line-height: 1.7; }

/* ============================================================================
   大厅
   ============================================================================ */
.hall-hero {
    background: linear-gradient(135deg, #c23321, #8f2b16);
    color: #ffe9c9; padding: 20px 16px; border-radius: 14px;
    margin: 14px; display: flex; justify-content: space-between; align-items: center;
}
.hall-hero .score-num { font-size: 26px; font-weight: bold; color: #ffd98a; }
.room-list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f5e8d6;
}
.room-list-item:last-child { border-bottom: none; }
.room-list-item .ri-name { font-weight: bold; font-size: 15px; }
.room-list-item .ri-meta { font-size: 12px; color: #9a7b5f; margin-top: 3px; }
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 11px; color: #fff;
}
.badge-0 { background: #d99a3d; }
.badge-1 { background: #3d9a5a; }
.badge-2 { background: #9a9a9a; }

/* ============================================================================
   房间详情
   ============================================================================ */
.room-info-item { display: flex; margin-bottom: 8px; font-size: 13px; }
.room-info-item .k { width: 76px; color: #9a7b5f; flex-shrink: 0; }
.room-info-item .v { flex: 1; color: #5a3a1e; }
.member-queue { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip {
    background: #fdf3e3; border: 1px solid #eedcbf; border-radius: 8px;
    padding: 6px 10px; font-size: 12px; position: relative;
}
.member-chip .sort-no { color: #b08a5e; margin-right: 4px; }
.member-chip.current { border-color: #c23321; background: #fde8e0; }
.member-chip.current::after {
    content: '轮到TA'; position: absolute; top: -8px; right: -4px;
    background: #c23321; color: #fff; font-size: 10px;
    border-radius: 4px; padding: 1px 5px;
}
.member-chip.me { border-style: dashed; }

/* ============================================================================
   博饼游戏页（掷骰动画核心）
   ============================================================================ */
.game-page { padding-bottom: 80px; }

.dice-stage {
    position: relative; width: 100%; aspect-ratio: 1;
    margin: 10px 0 4px; overflow: visible;
}
.dice-stage-inner { position: absolute; inset: 0; }

/* 碗容器：圆形裁剪，骰子只能在碗口内运动 */
.bowl-wrap {
    position: absolute; inset: 4%;
    border-radius: 50%;
    overflow: hidden;
    background: #8f2b16;
    box-shadow: 0 6px 18px rgba(74, 44, 23, 0.35), inset 0 0 30px rgba(0,0,0,0.25);
}
.bowl-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
/* 降级：CSS 圆形福字红碗 */
.bowl-bg.css-bowl {
    background: radial-gradient(circle at 50% 42%, #b23a20 0%, #8f2b16 55%, #6d1c0e 100%);
    display: flex; align-items: center; justify-content: center;
}
.bowl-bg.css-bowl .css-bowl-fu {
    font-size: 72px; color: rgba(255, 215, 130, 0.85);
    font-weight: bold; text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-family: "KaiTi", "STKaiti", serif;
}
/* 碗内阴影蒙版（立体感） */
.bowl-mask {
    position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.12) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.28) 100%);
}
/* 金边碗沿（上层遮挡） */
.bowl-rim {
    position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    border: 6px solid #d4a84e;
    box-shadow: inset 0 0 0 2px #f2dcae, inset 0 0 18px rgba(120, 70, 10, 0.5);
    z-index: 30;
}

/* 骰子层 */
.dice-layer { position: absolute; inset: 0; z-index: 10; }
.dice {
    position: absolute; width: 17%; aspect-ratio: 1;
    border-radius: 18%;
    will-change: transform, left, top;
}
/* 精灵图骰子 */
.dice-sprite {
    background-size: 600% 100%; background-position: 0 0;
    border-radius: 18%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}
/* CSS 点面骰子（降级） */
.dice-css {
    background: linear-gradient(145deg, #fff, #f2e8d8);
    border: 1.5px solid #d8c8ae;
    display: grid; grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 8%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}
.dice-dot { margin: auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: transparent; }
.dice-dot.on { background: #d8342b; }
.dice-dot.on.red { background: #d8342b; }
.dice-dot.on.black { background: #333c48; }

/* 3D 立体骰子（六面各一点数，正面=结果） */
.dice3d {
    position: absolute; width: 44px; height: 44px;
    transform-style: preserve-3d;
    will-change: transform;
}
.dice3d .face {
    position: absolute; inset: 0;
    background-repeat: no-repeat;
    border-radius: 14%;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.28);
    backface-visibility: hidden;
}
.dice3d .f-front  { transform: translateZ(22px); }
.dice3d .f-back   { transform: rotateY(180deg) translateZ(22px); }
.dice3d .f-right  { transform: rotateY(90deg) translateZ(22px); }
.dice3d .f-left   { transform: rotateY(-90deg) translateZ(22px); }
.dice3d .f-top    { transform: rotateX(90deg) translateZ(22px); }
.dice3d .f-bottom { transform: rotateX(-90deg) translateZ(22px); }
/* 降级：CSS 点面 */
.dice3d .dice-css-face {
    background: linear-gradient(145deg, #fff, #f2e8d8);
    border: 1.5px solid #d8c8ae;
    display: grid; grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 7%;
}
.dice3d .dice-css-face .dice-dot { width: 65%; }
@media (max-width: 380px) { .dice3d { width: 38px; height: 38px; } .dice3d .f-front, .dice3d .f-back { transform: translateZ(19px); } .dice3d .f-right, .dice3d .f-left { transform: rotateY(90deg) translateZ(19px); } .dice3d .f-top { transform: rotateX(90deg) translateZ(19px); } .dice3d .f-bottom { transform: rotateX(-90deg) translateZ(19px); } }

/* 结果弹窗：CSS 红点骰子 */
.rb-dice { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.rbd {
    width: 28px; height: 28px; background: linear-gradient(145deg, #fff, #f2e8d8);
    border: 1.5px solid #d8c8ae; border-radius: 18%;
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
    padding: 6%; box-shadow: 0 2px 5px rgba(0,0,0,0.22);
}
.rbd .rbd-dot { margin: auto; width: 66%; height: 66%; border-radius: 50%; background: transparent; }
.rbd .rbd-dot.on { background: #d8342b; }
.rbd .rbd-dot.on.red { background: #d8342b; }
.rbd .rbd-dot.on.black { background: #333c48; }

/* 静态骰子 */
.dice-static { transition: none; }

/* 投掷：抛物线落碗（ease-in 加速下落） */
.dice-flying { left: 60%; top: 5%; z-index: 20; opacity: 1; }
.dice.falling {
    animation: dice-fall 0.9s cubic-bezier(0.55, 0.05, 0.9, 0.4) forwards;
    z-index: 15;
}
@keyframes dice-fall {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
    60% { transform: translate(-12%, 55%) scale(1.02) rotate(200deg); opacity: 1; }
    100% {
        transform: translate(var(--fx, -20%), var(--fy, 78%)) scale(0.95) rotate(360deg);
        opacity: 1;
    }
}

/* 碗内滚动弹跳：translate + scale 透视 + 旋转，速度衰减 */
.dice.rolling {
    animation: dice-roll var(--dur, 1.8s) cubic-bezier(0.25, 0.4, 0.5, 1) forwards;
    z-index: var(--zi, 10);
}
@keyframes dice-roll {
    0%   { transform: translate(0, 0) scale(1.1) rotate(0deg); }
    15%  { transform: translate(calc(var(--tx) * 0.2), calc(var(--ty) * 0.2)) scale(calc(var(--scale) + 0.25)) rotate(90deg); }
    30%  { transform: translate(calc(var(--tx) * 0.45), calc(var(--ty) * 0.45)) scale(calc(var(--scale) + 0.18)) rotate(190deg); }
    45%  { transform: translate(calc(var(--tx) * 0.65), calc(var(--ty) * 0.65)) scale(calc(var(--scale) + 0.12)) rotate(270deg); }
    60%  { transform: translate(calc(var(--tx) * 0.8), calc(var(--ty) * 0.8)) scale(calc(var(--scale) + 0.07)) rotate(330deg); }
    80%  { transform: translate(calc(var(--tx) * 0.94), calc(var(--ty) * 0.94)) scale(calc(var(--scale) + 0.02)) rotate(355deg); }
    100% { transform: translate(var(--tx), var(--ty)) scale(var(--scale)) rotate(var(--rot)); }
}

/* 手图层 */
.hand-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.hand {
    position: absolute; width: 34%; aspect-ratio: 1;
    background-size: contain; background-repeat: no-repeat; background-position: center;
    opacity: 0;
}
/* 手握骰子：右侧滑入 */
.hand-hold { right: -40%; top: 12%; }
.hand-hold.in {
    animation: hand-hold-in 0.5s ease-out forwards;
}
@keyframes hand-hold-in {
    from { transform: translateX(40%); opacity: 0; }
    to   { transform: translateX(-30%); opacity: 1; }
}
/* 投掷手：左上伸出 */
.hand-throw { left: -12%; top: -8%; transform: rotate(-15deg); }
.hand-throw.in {
    animation: hand-throw-in 0.3s ease-out forwards;
}
@keyframes hand-throw-in {
    from { transform: translate(-30%, 20%) rotate(-25deg) scale(0.7); opacity: 0; }
    to   { transform: translate(0, 0) rotate(-15deg) scale(1); opacity: 1; }
}
/* 手降级（emoji） */
.hand-emoji {
    display: flex; align-items: center; justify-content: center;
    font-size: 64px;
}

/* 博饼结果展示 */
.result-banner {
    text-align: center; padding: 14px; border-radius: 12px; margin: 10px 14px;
    background: linear-gradient(135deg, #fff3dd, #ffe7c4);
    border: 1.5px solid #ecc98f;
}
.result-banner .rb-level { font-size: 22px; font-weight: bold; color: #b02a16; }
.result-banner .rb-dice { font-size: 22px; letter-spacing: 6px; margin-top: 6px; }
.result-banner .rb-tip { font-size: 12px; color: #8a6a4e; margin-top: 6px; }

/* 掷骰按钮区 */
.roll-area { position: sticky; bottom: 64px; padding: 0 14px 10px; z-index: 45; }
.roll-btn {
    width: 100%; padding: 14px; font-size: 18px; letter-spacing: 4px;
    border-radius: 14px; color: #fff; font-weight: bold;
    background: linear-gradient(135deg, #d8452f, #a31f10);
    box-shadow: 0 4px 14px rgba(163, 31, 16, 0.4);
}
.roll-btn:disabled { opacity: 0.55; }

/* 等待轮次提示 */
.wait-tip {
    text-align: center; padding: 10px; color: #8a6a4e; font-size: 14px;
}

/* ============================================================================
   礼品页
   ============================================================================ */
.gift-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid #f5e8d6;
}
.gift-card:last-child { border-bottom: none; }
.gift-name { font-weight: bold; font-size: 14px; }
.gift-qty { font-size: 12px; color: #9a7b5f; margin-top: 2px; }
.gift-qty .left { color: #b02a16; font-weight: bold; }
.gift-level-tag {
    display: inline-block; background: #fde8e0; color: #b02a16;
    font-size: 11px; padding: 2px 7px; border-radius: 5px; margin-right: 6px;
}
.level-header { font-size: 14px; font-weight: bold; color: #6b3d1e; margin: 14px 0 6px; }

/* 战绩记录 */
.record-item {
    padding: 12px 0; border-bottom: 1px solid #f5e8d6;
}
.record-item .ri-top { display: flex; justify-content: space-between; align-items: center; }
.record-item .ri-code { font-family: monospace; font-size: 15px; letter-spacing: 2px; color: #b02a16; font-weight: bold; }
.record-item .ri-meta { font-size: 12px; color: #9a7b5f; margin-top: 4px; }

/* ============================================================================
   积分页
   ============================================================================ */
.score-hero {
    background: linear-gradient(135deg, #d8452f, #8f2b16);
    color: #ffe9c9; text-align: center; padding: 24px 16px; border-radius: 14px;
    margin: 14px; position: relative; overflow: hidden;
}
.score-hero .sh-num { font-size: 38px; font-weight: bold; color: #ffd98a; }
.score-hero .sh-label { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.ad-btn {
    display: block; margin: 14px; padding: 14px;
    background: linear-gradient(135deg, #f0b429, #d98a1f); color: #5a3a10;
    border-radius: 12px; font-weight: bold; text-align: center; font-size: 15px;
}
/* 模拟广告遮罩 */
.ad-mask {
    position: fixed; inset: 0; z-index: 900; display: none;
    background: rgba(20, 10, 5, 0.92); color: #fff;
    flex-direction: column; align-items: center; justify-content: center;
}
.ad-mask.show { display: flex; }
.ad-mask .ad-title { font-size: 20px; letter-spacing: 2px; margin-bottom: 20px; }
.ad-mask .ad-countdown { font-size: 40px; font-weight: bold; color: #ffd98a; }
.ad-mask .ad-text { font-size: 13px; color: #c9a88a; margin-top: 16px; }
.score-log-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5e8d6; font-size: 13px; }
.score-log-item .sl-plus { color: #2f7d3c; font-weight: bold; }
.score-log-item .sl-minus { color: #b02a16; font-weight: bold; }

/* ============================================================================
   道具页
   ============================================================================ */
.props-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 0; }
.props-item {
    background: #fdf3e3; border: 1.5px solid #eedcbf; border-radius: 12px;
    text-align: center; padding: 14px 6px; cursor: pointer;
}
.props-item:active { transform: scale(0.96); }
.props-item .pi-icon { font-size: 34px; }
.props-item .pi-icon img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: inline-block; vertical-align: middle; box-shadow: 0 2px 6px rgba(176,42,22,.15); }
.props-item .pi-name { font-size: 13px; font-weight: bold; margin-top: 6px; }
.props-item .pi-price { font-size: 12px; color: #b02a16; margin-top: 3px; }
.props-tip { font-size: 12px; color: #9a7b5f; text-align: center; padding: 4px 0 8px; }

/* ============================================================================
   个人中心
   ============================================================================ */
.profile-hero {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, #c23321, #8f2b16);
    color: #ffe9c9; padding: 22px 16px; border-radius: 14px; margin: 14px;
}
.profile-hero .ph-avatar {
    width: 58px; height: 58px; border-radius: 50%;
    background: #ffe9c9; color: #b02a16;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: bold;
}
.profile-hero .ph-info { flex: 1; min-width: 0; }
.profile-hero .ph-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-hero .ph-name { font-size: 18px; font-weight: bold; display: inline-block; vertical-align: baseline; }
.profile-hero .ph-mobile { font-size: 12px; opacity: 0.85; margin-left: 8px; display: inline-block; vertical-align: baseline; }
.ph-edit { font-size: 14px; margin-left: 4px; cursor: pointer; display: inline-block; vertical-align: baseline; }
.ph-stats { font-size: 12px; opacity: 0.92; margin-top: 5px; letter-spacing: 0.5px; }
.menu-list { padding: 4px 0; }
.menu-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid #f5e8d6; font-size: 15px;
}
.menu-item .mi-arrow { color: #c9b39a; }

/* ============================================================================
   聊天
   ============================================================================ */
.chat-list { max-height: 300px; overflow-y: auto; padding: 6px 0; }
.chat-msg { margin-bottom: 10px; font-size: 13px; }
.chat-msg .cm-name { color: #b08a5e; font-size: 11px; margin-bottom: 2px; }
.chat-msg .cm-bubble {
    display: inline-block; background: #fdf3e3; border-radius: 10px;
    padding: 7px 11px; max-width: 85%; line-height: 1.5;
}
.chat-msg.system .cm-bubble { background: #f5e8d6; color: #9a7b5f; font-size: 12px; width: 100%; text-align: center; }
.chat-msg.audio .cm-bubble { background: #e8f0e8; }
.chat-input-row { display: flex; gap: 8px; margin-top: 10px; }
.chat-input-row input {
    flex: 1; padding: 9px 12px; border: 1px solid #ead9c2;
    border-radius: 8px; outline: none;
}
.chat-input-row .btn { width: auto; }

/* 录音按钮 */
.record-btn {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #d8452f, #a31f10);
    color: #fff; font-size: 20px;
}
.record-btn.recording { animation: pulse 1s infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(184, 42, 22, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(184, 42, 22, 0); }
}

/* ============================================================================
   道具特效（CSS 动画 v2）
   ============================================================================ */
/* 通用容器（相对掷骰区域定位） */
.fx-firecracker, .fx-egg, .fx-lantern { position: absolute; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }

/* ---------- 鞭炮：一大串从顶部挂下，引信点燃逐段爆炸 ---------- */
.fx-cracker-string { position: absolute; top: 10%; left: 0; right: 0; bottom: 6%; }
.fx-cracker-seg {
    position: absolute; width: 7%; height: 5.2%; transform: translate(-50%, -50%);
    opacity: 1; transition: transform .28s, opacity .35s;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,.35));
}
.fx-cracker-seg img { width: 100%; height: 100%; object-fit: contain; }
.fx-cracker-seg.boom {
    transform: translate(-50%,-50%) scale(1.8); opacity: 0; filter: brightness(2.8);
}
.fx-cracker-fuse {
    position: absolute; top: 6.5%; left: 50%; transform: translateX(-50%);
    width: 3px; height: 8%;
    background: linear-gradient(#7a4a1e, #b8862e);
}
.fx-cracker-fuse.lit {
    background: radial-gradient(circle, #ffe066 0%, #ff5a3c 55%, transparent 75%);
    animation: fuse-burn .7s ease-in forwards;
}
@keyframes fuse-burn {
    from { transform: translateX(-50%) scaleY(1); opacity: 1; }
    to { transform: translateX(-50%) scaleY(.3); opacity: .9; }
}
.fx-confetti {
    position: absolute; top: -6%; width: 8px; height: 12px; border-radius: 2px;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(460px) rotate(540deg); opacity: 0; }
}
.fx-flash {
    position: absolute; width: 64px; height: 64px; transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,240,150,.95), rgba(255,120,40,.6) 45%, transparent 70%);
    animation: fx-flash .3s ease-out forwards;
}
@keyframes fx-flash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.8); } }
.fx-spark {
    position: absolute; width: 8px; height: 8px; border-radius: 50%;
    animation: spark-burst .8s ease-out forwards;
    box-shadow: 0 0 8px rgba(255,120,30,.8);
}
@keyframes spark-burst {
    0% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx, 30px)), calc(-50% + var(--dy, 40px))) scale(.2); opacity: 0; }
}
.fx-smoke {
    position: absolute; width: 44px; height: 44px; border-radius: 50%;
    background: radial-gradient(circle, rgba(120,120,120,.5), transparent 70%);
    animation: smoke-rise 1.4s ease-out forwards;
}
@keyframes smoke-rise {
    0% { transform: translate(-50%,-50%) scale(.5); opacity: .8; }
    100% { transform: translate(-50%,-140%) scale(1.6); opacity: 0; }
}

/* ---------- 鸡蛋：多位置扔蛋砸碎 ---------- */
.fx-egg-fly {
    position: absolute; width: 13%; height: 13%;
    opacity: 0; z-index: 2;
}
.fx-egg-fly img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.fx-egg-fly.from-left { animation: egg-fly-l .62s cubic-bezier(.5,.05,.8,.55) forwards; }
.fx-egg-fly.from-right { animation: egg-fly-r .62s cubic-bezier(.5,.05,.8,.55) forwards; }
@keyframes egg-fly-l {
    0% { opacity: 1; transform: translate(-60%, 20%) rotate(-40deg) scale(.9); }
    60% { opacity: 1; transform: translate(20%, -30%) rotate(40deg) scale(1.05); }
    100% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
}
@keyframes egg-fly-r {
    0% { opacity: 1; transform: translate(60%, 20%) rotate(40deg) scale(.9); }
    60% { opacity: 1; transform: translate(-20%, -30%) rotate(-40deg) scale(1.05); }
    100% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
}
.fx-egg-fly.fx-egg-broken { opacity: 1; transform: scale(1.2); filter: brightness(1.6); transition: transform .12s, opacity .4s; }
.fx-egg-splash {
    position: absolute; width: 12px; height: 12px; border-radius: 50%;
    animation: splash-fly .9s ease-out forwards;
    box-shadow: 0 0 6px rgba(255,200,60,.6);
}
@keyframes splash-fly {
    0% { transform: translate(-50%,-50%) scale(.8); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx, 30px)), calc(-50% + var(--dy, -60px))) scale(.4); opacity: 0; }
}
.fx-egg-shell {
    position: absolute; width: 12px; height: 16px; border-radius: 3px;
    background: linear-gradient(145deg, #fffdf5, #efe6d2);
    animation: shell-fly 1s ease-out forwards;
}
@keyframes shell-fly {
    0% { transform: translate(-50%,-50%) rotate(0deg); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx, 40px)), calc(-50% + var(--dy, -50px))) rotate(300deg); opacity: 0; }
}
.fx-egg-stain {
    position: absolute; width: 16%; height: 16%; transform: translate(-50%,-50%);
    border-radius: 46% 54% 58% 42% / 52% 48% 62% 38%;
    background: radial-gradient(circle, rgba(255,210,63,.85), rgba(246,196,69,.5) 60%, transparent 75%);
    z-index: 1;
    animation: stain-fade 3.5s ease-out forwards;
}
@keyframes stain-fade { 0% { opacity: .9; transform: translate(-50%,-50%) scale(.7); } 30% { opacity: .8; transform: translate(-50%,-50%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.05); } }

/* ---------- 花灯：多盏从底部升起 ---------- */
.fx-lantern-item { position: absolute; bottom: 0; width: 11%; aspect-ratio: 1; animation: lantern-rise linear forwards; }
.fx-lantern-body { position: absolute; inset: 0; animation: lantern-sway 2.2s ease-in-out infinite; }
.fx-lantern-body img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255,170,60,.9)); }
.fx-lantern-glow {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    width: 170%; height: 170%; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,190,80,.5), transparent 70%);
    animation: lantern-glow 2.2s ease-in-out infinite;
}
@keyframes lantern-rise {
    0% { transform: translateY(110%) rotate(-4deg); opacity: 0; }
    8% { opacity: 1; }
    50% { transform: translateY(-440%) rotate(3deg); }
    92% { opacity: 1; }
    100% { transform: translateY(-1100%) rotate(-2deg); opacity: 0; }
}
@keyframes lantern-sway {
    0%, 100% { transform: translateX(-6%); }
    50% { transform: translateX(6%); }
}
@keyframes lantern-glow {
    0%, 100% { opacity: .55; }
    50% { opacity: .85; }
}

/* 响应式微调 */
@media (max-width: 380px) {
    .dice { width: 15%; }
    .hand { width: 30%; }
}

/* ============================================================
   room.html 单页布局（按用户原型：390px 基准 + rem/vw 响应式）
   ============================================================ */
html { font-size: calc(100vw / 390 * 16); }
body.room-page {
    max-width: 430px; margin: 0 auto; min-height: 100vh;
    background: #fdf3e3; display: flex; flex-direction: column;
    padding-bottom: 64px; box-sizing: border-box;
}
/* 顶部房间信息 */
.room-page .topbar {
    display: block;
    background: linear-gradient(135deg, #b3251f, #d43a2a);
    color: #fff; padding: 12px 14px 10px;
    border-bottom: 3px solid #f5c542; flex-shrink: 0;
}
.room-page .tb-main { text-align: center; padding-top: 2px; }
.room-page .room-name { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: 2px; text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.room-page .room-no {
    display: inline-block; margin-top: 6px;
    background: rgba(255,255,255,.2); padding: 2px 12px; border-radius: 12px;
    font-size: 12px; border: 1px solid rgba(255,255,255,.4);
}
.room-page .room-meta { display: flex; justify-content: center; margin-top: 8px; font-size: 11px; opacity: .95; gap: 14px; flex-wrap: wrap; }
.room-page .room-meta span { display: flex; align-items: center; gap: 3px; }
.room-page .tb-time {
    margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(245,197,66,.16); border: 1px solid rgba(245,197,66,.5);
    border-radius: 10px; padding: 5px 12px;
}
.room-page .tb-time-label { font-size: 11px; color: #ffd98a; letter-spacing: 1px; }
.room-page .tb-time-num {
    font-size: 17px; font-weight: 800; color: #ffe9a8;
    font-variant-numeric: tabular-nums; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
/* 合规常驻条 */
.room-page .compliance {
    background: #fff8e6; color: #8a5a12; font-size: 10px; padding: 6px 12px;
    text-align: center; border-bottom: 1px dashed #e6d3a3; flex-shrink: 0;
}
/* 主滚动区 */
.room-page .page-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* 博饼主区 */
.game-area {
    position: relative;
    background: linear-gradient(180deg, #7a1c14 0%, #4a100c 100%);
    height: auto;
    aspect-ratio: 1;
    max-height: 62vh;
    overflow: hidden;
}
.game-area::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 40%, rgba(245,197,66,.16), transparent 60%);
}
.turn-badge {
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(90deg, #f5c542, #f9df8a);
    color: #6b3f00; font-size: 12px; font-weight: 700;
    padding: 5px 16px; border-radius: 16px; z-index: 60;
    box-shadow: 0 2px 8px rgba(0,0,0,.3); white-space: nowrap; max-width: 92%;
    overflow: hidden; text-overflow: ellipsis;
}
.game-area .dice-stage {
    position: absolute; inset: 0; z-index: 2;
}
.game-area .dice-stage-inner { position: absolute; inset: 0; }
.game-area .bowl-wrap {
    position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
    width: 62%; aspect-ratio: 1; z-index: 2;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.5));
}
.game-area .bowl-bg { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.game-area .bowl-bg.with-img { background-size: cover; background-position: center; }
.game-area .bowl-bg.css-bowl {
    background: radial-gradient(circle at 50% 35%, #c0332a 0%, #8e1d15 55%, #5c0f0a 100%);
    border: 4px solid #e9b84a;
}
.game-area .bowl-bg.css-bowl .css-bowl-fu {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    font-size: 3.2rem; color: #e9b84a; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.game-area .bowl-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 26px rgba(0,0,0,.4); }
.game-area .bowl-rim {
    position: absolute; inset: 0; border-radius: 50%;
    border: 5px solid #e9b84a; box-shadow: 0 0 0 2px #b3251f, inset 0 0 0 2px rgba(0,0,0,.15);
    pointer-events: none; z-index: 30;
}
.game-area .dice-layer { position: absolute; inset: 6%; z-index: 10; }
.game-area .hand-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
/* 结果横幅/等待提示（宽扁居中，浮在碗下方不遮挡） */
.game-area .result-banner {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 4px; z-index: 70;
    width: 80%; max-width: 540px; max-height: 72%;
    overflow-y: auto;
    background: rgba(255,248,230,.97); border-radius: 12px;
    padding: 6px 14px 8px; text-align: center;
    border: 1px solid #e6d3a3; box-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.result-banner .rb-dice { gap: 5px; margin: 2px 0; }
.result-banner .rbd { width: 24px; height: 24px; padding: 5%; }
.result-banner .rb-level { font-size: 14px; margin: 2px 0; }
.result-banner .rb-tip { font-size: 10px; line-height: 1.35; }
.result-banner .rb-ok { margin-top: 4px; padding: 4px 22px; font-size: 12px; }
/* 弹窗礼品选择 */
.result-banner .rb-pick-tip { font-size: 11px; color: #8a5a12; margin: 2px 0; }
.result-banner .rb-gifts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.result-banner .rb-gift {
    border: 1.5px solid #d8c8ae; background: #fff; border-radius: 10px;
    padding: 6px 12px; font-size: 12px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.result-banner .rb-gift:hover { border-color: #e13b2f; }
.result-banner .rb-gift.off { opacity: .55; cursor: not-allowed; }
.result-banner .rb-gift.picking { opacity: .6; }
.result-banner .rb-gift .rg-name { color: #6b3d1e; font-weight: 700; }
.result-banner .rb-gift .rg-left { color: #b02a16; font-size: 10px; }
.result-banner .rb-code { font-size: 13px; color: #6b3d1e; margin: 6px 0; }
.result-banner .rb-code b { color: #b02a16; font-size: 17px; letter-spacing: 3px; }
/* 战绩：成员筛选 + 骰子点数 */
.record-filter {
    margin-left: 8px; padding: 3px 6px; border: 1px solid #e6d3a3; border-radius: 8px;
    font-size: 12px; background: #fff; color: #6b3d1e; max-width: 110px;
}
.ri-dice { display: flex; gap: 3px; margin-top: 4px; flex-wrap: wrap; }
.md-dice {
    width: 26px; height: 26px; background: linear-gradient(145deg, #fff, #f2e8d8);
    border: 1px solid #c9b28a; border-radius: 14%;
    position: relative; flex: none; display: inline-block;
}
.md-dot {
    position: absolute; width: 5px; height: 5px; transform: translate(-50%, -50%);
    border-radius: 50%; background: transparent;
}
.md-dot.on.red { background: #d8342b; }
.md-dot.on.black { background: #333c48; }
/* 道具同步提示浮层 */
.prop-tip {
    position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,.55); color: #ffe9c9; font-size: 12px;
    padding: 5px 14px; border-radius: 14px; z-index: 65;
    opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap;
    max-width: 90%; overflow: hidden; text-overflow: ellipsis;
}
.prop-tip.show { opacity: 1; }
/* 房主续时按钮（顶部倒计时旁） */
.extend-btn {
    display: inline-block; margin-left: 6px; padding: 2px 10px;
    background: linear-gradient(90deg, #f5c542, #f9df8a); color: #6b3f00;
    border: none; border-radius: 12px; font-size: 11px; font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,.25); vertical-align: middle; cursor: pointer;
}
.result-banner .rb-close {
    position: absolute; top: 4px; right: 8px;
    width: 26px; height: 26px; line-height: 24px; border-radius: 50%;
    border: none; background: #e13b2f; color: #fff; font-size: 15px;
    cursor: pointer; z-index: 5;
}
.result-banner .rb-ok {
    margin-top: 8px; padding: 6px 26px; border: none; border-radius: 18px;
    background: linear-gradient(135deg, #e13b2f, #c62822); color: #fff;
    font-size: 13px; cursor: pointer;
}
.game-area .wait-tip {
    position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 70;
    background: rgba(26,15,10,.78); color: #ffe9c9; border-radius: 10px;
    padding: 8px 10px; text-align: center; font-size: 13px;
}
/* 操作区 */
.action-area {
    background: linear-gradient(180deg, #fff6e6, #fdf3e3);
    padding: 12px 14px 14px; border-bottom: 1px solid #eedcc0;
}
.throw-btn {
    width: 100%; padding: 14px 0; border: none; border-radius: 30px;
    background: linear-gradient(135deg, #e13b2f, #c62822);
    color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: 6px;
    box-shadow: 0 6px 16px rgba(198,40,34,.4); cursor: pointer;
}
.throw-btn:active { transform: scale(.97); }
.throw-btn:disabled { opacity: .55; }
.throw-btn small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 1px; opacity: .85; margin-top: 2px; }
.throw-btn.btn-gold {
    background: linear-gradient(135deg, #f5c542, #e09a1e); color: #5a3a00;
    box-shadow: 0 6px 16px rgba(224,154,30,.4);
}
.props-row { display: flex; gap: 10px; margin-top: 12px; justify-content: space-between; }
.prop-item {
    flex: 1; background: #fff; border: 1px solid #e8d5b5; border-radius: 14px;
    padding: 8px 4px 6px; text-align: center; cursor: pointer;
}
.prop-item:active { transform: scale(.96); }
.prop-item .prop-ico { font-size: 30px; line-height: 26px; height: 26px; }
.prop-item .prop-ico img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; display: inline-block; vertical-align: middle; }
.prop-item .prop-name { font-size: 11px; color: #7a4a12; margin-top: 4px; }
.prop-item .prop-cost { font-size: 10px; color: #c62822; font-weight: 700; }
.props-note { font-size: 10px; color: #a08a60; text-align: center; margin-top: 8px; }
/* 面板通用 */
.room-page .panel {
    background: #fffaf0; border-bottom: 1px solid #e6d3b5; padding: 12px 14px;
}
.panel-title { font-size: 14px; font-weight: 700; color: #6b3f00; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
/* 成员列表 */
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #ecdcbf; }
.member-row:last-child { border-bottom: none; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: #d43a2a; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
    flex-shrink: 0;
}
.avatar.owner { background: linear-gradient(135deg, #f5c542, #e09a1e); color: #5a3a00; }
.member-info { flex: 1; font-size: 13px; min-width: 0; }
.member-info .m-name { font-weight: 600; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.member-info .m-status { font-size: 11px; color: #a08a60; margin-top: 2px; }
.member-tag { font-size: 10px; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.member-tag.owner-tag { background: #fdeeb8; color: #8a5a00; }
.member-tag.turn-tag { background: #e8f5e9; color: #2e7d32; }
.member-tag.done-tag { background: #f1ece2; color: #9a8c70; }
.op-btn {
    font-size: 11px; color: #c62822; border: 1px solid #e6b9b0; background: #fff;
    padding: 3px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
/* 聊天（room.html 新版气泡） */
.chat-list { max-height: 300px; overflow-y: auto; padding: 6px 0 86px; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 10px; }
/* 聊天输入行：始终吸附在底部菜单栏上方 */
.chat-panel { padding-bottom: 0; }
.chat-panel .chat-input-row {
    position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px; z-index: 95;
    background: #fffaf0; padding: 10px 14px;
    border-top: 1px solid #e6d3b5; margin: 0; box-sizing: border-box;
}
.chat-input {
    flex: 1; border: 1px solid #e6d3b5; border-radius: 22px; padding: 12px 16px;
    font-size: 14px; background: #fff; outline: none;
}
.chat-panel .chat-input-row .chat-input {
    flex: 1; border: 1px solid #e6d3b5; border-radius: 22px; padding: 12px 16px;
    font-size: 14px; background: #fff; outline: none; min-width: 0;
}
.chat-msg .avatar { width: 28px; height: 28px; font-size: 12px; }
.chat-msg > div:last-child { flex: 1; min-width: 0; }
.chat-msg .bubble {
    background: #fff; border: 1px solid #eedcc0; border-radius: 12px;
    padding: 7px 12px; font-size: 13px; max-width: 78%; word-break: break-word; word-wrap: break-word; line-height: 1.5;
}
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg.mine > div:last-child { display: flex; flex-direction: column; align-items: flex-end; }
.chat-msg.mine .bubble { background: #fde3c8; border-color: #f5cba4; }
.chat-msg .c-name { font-size: 11px; color: #8a6a4e; font-weight: 600; margin-bottom: 2px; }
.chat-msg.mine .c-name { text-align: right; }
.audio-bubble { display: flex; align-items: center; gap: 6px; }
.audio-bar { width: 70px; height: 8px; border-radius: 4px; background: #e8d5b5; position: relative; overflow: hidden; display: inline-block; }
.audio-bar::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 60%; background: #d43a2a; border-radius: 4px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.chat-input {
    flex: 1; border: 1px solid #e6d3b5; border-radius: 20px; padding: 9px 14px;
    font-size: 13px; background: #fff; outline: none;
}
.mic-btn, .send-btn {
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mic-btn { background: #f5c542; font-size: 16px; }
.send-btn { background: #c62822; color: #fff; font-size: 14px; }
.chat-tip {
    display: none; margin-top: 8px; font-size: 12px; color: #c62822;
    background: #fdecea; border-radius: 8px; padding: 6px 10px; text-align: center;
}
/* 底部 Tab */
.bottom-tab {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 100%; max-width: 430px; display: flex; background: #fff;
    border-top: 1px solid #eadbc2; z-index: 90;
    padding-bottom: env(safe-area-inset-bottom);
}
.tab-item { flex: 1; text-align: center; padding: 8px 0 10px; cursor: pointer; position: relative; color: #8a6a4e; }
.tab-item.active { color: #c62822; }
.tab-item .tab-ico { font-size: 19px; line-height: 1.2; }
.tab-item .tab-name { font-size: 11px; margin-top: 2px; }
.tab-item.active::after {
    content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 36px; height: 3px; background: #c62822; border-radius: 2px;
}
/* 房主操作弹层 */
.op-chip {
    flex: 1; padding: 10px 0; border: 1px solid #e6b9b0; background: #fff;
    color: #c62822; border-radius: 10px; font-size: 13px; cursor: pointer;
}
.op-chip:active { background: #fdecea; }
.claim-gift {
    padding: 12px 14px; border: 1px solid #eedcc0; border-radius: 10px; background: #fff;
    margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-size: 14px;
}
.claim-gift:active { background: #fde3c8; }
/* 礼品配置 */
.gcfg-level { border: 1px dashed #e6d3b5; border-radius: 10px; padding: 8px; margin-bottom: 10px; }
.gcfg-lv-name { font-size: 13px; font-weight: 700; color: #6b3f00; margin-bottom: 6px; }
.gcfg-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.gcfg-name { flex: 1; border: 1px solid #e6d3b5; border-radius: 8px; padding: 7px 10px; font-size: 13px; background: #fff; outline: none; }
.gcfg-qty { width: 64px; border: 1px solid #e6d3b5; border-radius: 8px; padding: 7px 6px; font-size: 13px; background: #fff; outline: none; }
.gcfg-del { border: none; background: #fdecea; color: #c62822; width: 28px; height: 30px; border-radius: 8px; cursor: pointer; }
.gcfg-add { border: 1px dashed #e6b9b0; background: #fff; color: #c62822; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
/* 我的面板 */
.mine-score { text-align: center; padding: 12px 0 16px; }
.mine-score .ms-num { font-size: 40px; font-weight: 800; color: #b3251f; }
.mine-score .ms-label { font-size: 12px; color: #a08a60; margin-top: 4px; }
.mine-user { font-size: 14px; color: #6b3f00; margin-bottom: 10px; }
.btn-plain {
    width: 100%; padding: 12px 0; border: 1px solid #e6b9b0; border-radius: 24px;
    background: #fff; color: #c62822; font-size: 14px; cursor: pointer;
}
/* 战绩记录（room.html 内复用） */
.record-item { padding: 8px 0; border-bottom: 1px dashed #ecdcbf; }
.record-item:last-child { border-bottom: none; }
.record-item .ri-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.record-item .ri-code { font-family: monospace; font-size: 13px; letter-spacing: 2px; color: #b02a16; font-weight: bold; }
.record-item .ri-meta { font-size: 12px; color: #9a7b5f; margin-top: 4px; }

.mine-hero { display: flex; align-items: center; gap: 12px; padding: 4px 0 10px; }
/* 房间页顶部-大厅按钮（左上角） */
.room-page .topbar { position: relative; }
.tb-hall {
    position: absolute; top: 10px; left: 12px; z-index: 2;
    color: #ffe9c9; text-decoration: none; font-size: 12px; font-weight: 700;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,233,201,.5);
    border-radius: 14px; padding: 3px 10px; flex: none;
}