/* ==================== 車肥羊外觀（本陣軍帳） ==================== */
:root {
    --gold: #d6ad48;
    --lacquer: #1c110e;
}

body {
    background: radial-gradient(ellipse at 50% 0%, #3a140f 0%, #170a08 50%, #0b0605 100%) fixed;
    background-color: #0b0605;
}

/* 標題 logo */
.logo-title { margin: 0 0 10px; text-align: center; line-height: 0; }
.logo-title img { width: min(380px, 86vw); height: auto; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.6)); }
.logo-title small { display: block; line-height: 1.4; margin-top: 2px; color: #c9b38a; font-size: 0.9rem; font-weight: normal; letter-spacing: 0.2em; }

/* 外框：朱漆＋金邊 */
.container {
    background: linear-gradient(180deg, #24150f 0%, #180e0b 100%);
    border: 2px solid #b8892f;
    box-shadow: 0 0 0 3px #2a1a10, 0 0 0 4px #6b4a1e, 0 14px 34px rgba(0,0,0,0.65);
}

/* 公共牌區：陣幕 */
.community-section {
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(255,255,255,0.05), transparent 60%),
        radial-gradient(ellipse at center, #5e1616 0%, #3d0d0d 55%, #250808 100%);
    border: 1px solid #8a6424;
    box-shadow: inset 0 0 0 3px rgba(214,173,72,0.18), inset 0 0 36px rgba(0,0,0,0.65);
    padding-top: 18px !important;
}
.community-section::before {
    content: "";
    position: absolute; left: 0; right: 0; top: 0; height: 9px;
    background: repeating-linear-gradient(90deg, #efe4cc 0 26px, #1e1410 26px 52px);
    border-bottom: 1px solid #8a6424;
    border-radius: 8px 8px 0 0;
    opacity: 0.9;
}

.user-section { background: rgba(48,24,16,0.65); border: 1px solid rgba(214,173,72,0.22); }
.logs-box { background: rgba(0,0,0,0.45); border: 1px solid rgba(214,173,72,0.12); }
.players-table td { border-bottom-color: rgba(214,173,72,0.12); }

/* ---------- 撲克牌 ---------- */
.card, .card-mini {
    position: relative;
    display: inline-block;
    padding: 0;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--s, #888);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    flex: 0 0 auto;
}
.card { width: 58px; height: 87px; border-radius: 7px; }
.card.big { width: 76px; height: 114px; border-radius: 8px; }
.card-mini { width: 36px; height: 54px; border-radius: 5px; margin-right: 2px; vertical-align: middle; }

.card .idx, .card-mini .idx {
    position: absolute; left: 2px; top: 2px;
    display: flex; flex-direction: column; align-items: center;
    background: rgba(255,252,242,0.95);
    border-radius: 5px;
    padding: 2px 3px 3px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.45);
}
.idx b { color: var(--s); font-weight: 900; font-size: 15px; font-family: Georgia, 'Times New Roman', serif; letter-spacing: -1px; }
.idx i {
    display: block; width: 13px; height: 13px; margin-top: 2px;
    background: var(--s);
    -webkit-mask: var(--m) center / contain no-repeat;
    mask: var(--m) center / contain no-repeat;
}
.card.big .idx b { font-size: 19px; }
.card.big .idx i { width: 16px; height: 16px; }
.card-mini .idx { left: 1px; top: 1px; padding: 1px 2px 2px; border-radius: 3px; }
.card-mini .idx b { font-size: 11px; }
.card-mini .idx i { width: 9px; height: 9px; margin-top: 1px; }

/* 牌背 */
.card-back {
    display: inline-block; vertical-align: middle; margin-right: 2px;
    width: 20px; height: 30px; border-radius: 3px;
    background: url(img/back.webp) center / cover no-repeat;
    border: 1px solid var(--gold);
}

/* ---------- 頭像 ---------- */
.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; vertical-align: middle;
    border: 2px solid #7a5622; background: #222;
    margin-right: 6px; flex: 0 0 auto;
}
.avatar.lg { width: 56px; height: 56px; }

.avatar-picker {
    position: fixed; inset: 0; z-index: 20;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.avatar-picker .panel {
    background: #1f130f; border: 2px solid #b8892f; border-radius: 12px;
    width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 14px;
}
.avatar-picker h3 { margin: 0 0 4px; color: var(--gold); font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; }
.avatar-picker .fac { margin: 12px 0 6px; font-size: 0.9rem; font-weight: bold; }
.avatar-picker .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.avatar-picker .grid button {
    padding: 0; background: none; border: 2px solid transparent; border-radius: 50%;
    aspect-ratio: 1; overflow: hidden;
}
.avatar-picker .grid button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-picker .grid button.sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

@media (max-width: 600px) {
    .logo-title img { width: min(230px, 62vw); }
    .logo-title small { font-size: 0.8rem; }
    .card { width: 50px; height: 75px; }
    .card.big { width: 64px; height: 96px; }
    .card-mini { width: 30px; height: 45px; }
    .idx b { font-size: 13px; }
    .idx i { width: 11px; height: 11px; }
    .card.big .idx b { font-size: 16px; }
    .card.big .idx i { width: 14px; height: 14px; }
    .card-mini .idx b { font-size: 10px; }
    .card-mini .idx i { width: 8px; height: 8px; }
    .card-back { width: 16px; height: 24px; }
    .avatar { width: 26px; height: 26px; margin-right: 4px; }
    .avatar.lg { width: 52px; height: 52px; }
}
@media (max-width: 360px) {
    .card { width: 46px; height: 69px; }
}
