* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg1: #ffffff;
    --panel: #ffffff;
    --panel-grad: linear-gradient(165deg, #ffffff 0%, #faf6ff 100%);
    --card-grad: linear-gradient(165deg, #ffffff 0%, #fbf8ff 100%);
    --line: #e0d2f7;
    --text: #5c4b78;
    --dim: #9d8fb8;
    --accent: #b79bea;
    --accent-dark: #8a6ad2;
    --good: #86dcc4;
    --good-dark: #3fae95;
    --bad: #ff9fc0;
    --bad-dark: #e0679a;
    --warn: #ffcf7a;
    --shadow: 0 6px 0 rgba(120, 90, 170, .12);
    --sheen: inset 0 1px 0 rgba(255, 255, 255, .8);
}

body {
    background: var(--bg1);
    color: var(--text);
    font-family: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
    font-weight: 600;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.screen {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
#screen-game, #screen-go-game { max-width: 860px; }

.hidden { display: none !important; }

.sound-toggle {
    position: fixed; top: 16px; right: 16px; z-index: 30;
    width: 44px; height: 44px; padding: 0; border-radius: 50%;
    font-size: 19px; line-height: 1;
    background: var(--panel-grad); color: var(--text);
    box-shadow: var(--shadow); border: 3px solid var(--line);
}
.sound-toggle.muted { opacity: .55; }

/*
 * 데스크톱에서는 wrapper가 박스를 만들지 않아(display: contents) lang-picker·
 * contact-btn이 각자 자기 fixed 위치(우측 상단 / 우측 하단)를 그대로 쓴다.
 * 모바일에서만 이 wrapper가 flex row로 바뀌면서 둘을 우측 하단에 나란히 붙인다
 * (아래 미디어 쿼리 참고) — 언어 선택이 화면 위에 계속 떠서 콘텐츠를 가리던 문제 해결.
 */
.bottom-right-bar { display: contents; }

.contact-btn {
    position: fixed; bottom: 16px; right: 16px; z-index: 30;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-radius: 999px;
    background: var(--panel-grad); color: var(--text);
    box-shadow: var(--shadow); border: 3px solid var(--line);
    font-weight: 800; font-size: 13px; text-decoration: none;
}
.contact-btn:hover { background: rgba(183, 155, 234, .18); }

.lang-picker {
    position: fixed; top: 16px; right: 68px; z-index: 30;
    display: flex; gap: 4px;
    background: var(--panel-grad); border: 3px solid var(--line);
    border-radius: 999px; padding: 4px; box-shadow: var(--shadow);
}
.lang-btn {
    border: none; background: transparent; color: var(--text);
    font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
    cursor: pointer; white-space: nowrap;
}
.lang-btn:hover { background: rgba(183, 155, 234, .18); }
.lang-btn.active { background: var(--accent); color: #fff; }

@media (max-width: 640px) {
    .bottom-right-bar {
        display: flex; position: fixed; bottom: 16px; right: 16px; z-index: 30;
        align-items: center; gap: 6px;
    }
    /* 부모(.bottom-right-bar)가 이제 fixed로 자리를 잡으니, 둘 다 그 안에서 나란히
       흐르도록 각자의 fixed 위치는 꺼준다. */
    .lang-picker, .contact-btn { position: static; }
    .lang-btn { padding: 5px 7px; font-size: 11px; }
}

.logo-row { display: flex; align-items: center; gap: 10px; }
.logo-emoji { font-size: 40px; }
.logo { font-size: 28px; letter-spacing: 1px; color: var(--accent-dark); }
.tagline { color: var(--dim); font-size: 13px; line-height: 1.6; font-weight: 500; }

/* 로그인 직후 게임 선택(오목/바둑) 카드 2개 */
.game-pick-row { display: flex; gap: 14px; width: 100%; }
.game-pick-card {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: var(--card-grad); border: 3px solid var(--line); border-radius: 20px;
    padding: 22px 12px; cursor: pointer; box-shadow: var(--shadow), var(--sheen);
}
.game-pick-card:hover { border-color: var(--accent); }
.game-pick-emoji { font-size: 36px; }
.game-pick-name { font-size: 17px; font-weight: 800; color: var(--accent-dark); }
.game-pick-desc { font-size: 11px; color: var(--dim); text-align: center; }

.panel {
    width: 100%;
    background: var(--panel-grad);
    border: 3px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow), var(--sheen);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tabs { display: flex; gap: 6px; background: rgba(224, 210, 247, .35); padding: 4px; border-radius: 999px; }
.tab {
    flex: 1; border: none; background: transparent; color: var(--dim);
    font-weight: 700; font-size: 13px; padding: 9px 6px; border-radius: 999px; cursor: pointer;
}
.tab.active { background: #fff; color: var(--accent-dark); box-shadow: var(--shadow); }
.mode-tabs .tab { font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 12px; color: var(--dim); }
.field input {
    border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px;
    font-size: 14px; font-family: inherit; color: var(--text); background: #fff;
}
.field input:focus { outline: none; border-color: var(--accent); }

button {
    font-family: inherit; cursor: pointer; border-radius: 14px; border: none;
    font-weight: 800; font-size: 14px; padding: 12px 16px;
    box-shadow: var(--shadow), var(--sheen);
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: linear-gradient(165deg, #cbb0f5, var(--accent-dark)); color: #fff; }
.secondary { background: var(--panel-grad); color: var(--text); border: 2px solid var(--line); }
.quick { background: linear-gradient(165deg, #ffe08a, var(--warn)); color: #6b4c00; }

.divider { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; width: 100%; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.hint { color: var(--dim); font-size: 12px; line-height: 1.6; font-weight: 500; }
.label { color: var(--dim); font-size: 12px; font-weight: 700; }
.code { font-size: 40px; letter-spacing: 8px; color: var(--accent-dark); }

.conn { font-size: 12px; color: var(--dim); }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: rgba(60, 45, 90, .92); color: #fff; padding: 10px 18px;
    border-radius: 999px; font-size: 13px; font-weight: 700; z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.hidden { display: none; }

/* ------------------------------------------------------------ 상단 바 / 지갑 / 랭크 */

.me-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.me-name { font-weight: 800; color: var(--accent-dark); }
.wallet-chip {
    display: inline-flex; align-items: center; gap: 4px; background: #fff;
    border: 2px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px;
}

.rank-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
    border-radius: 999px; font-size: 12px; background: #fff; border: 3px solid #b08d57;
}
.rank-badge.tier-bronze { border-color: #c07a4d; background: linear-gradient(165deg, #fff, #f6e3d3); }
.rank-badge.tier-silver { border-color: #9aa3ad; background: linear-gradient(165deg, #fff, #eef1f4); }
.rank-badge.tier-gold { border-color: #e0b23a; background: linear-gradient(165deg, #fff, #fbeec2); box-shadow: 0 0 10px rgba(224, 178, 58, .35); }
.rank-badge.tier-platinum { border-color: #7fd8d0; background: linear-gradient(165deg, #fff, #e2fbf8); box-shadow: 0 0 10px rgba(127, 216, 208, .4); }
.rank-badge.tier-emerald { border-color: #35c47a; background: linear-gradient(165deg, #fff, #dcf9e9); box-shadow: 0 0 12px rgba(53, 196, 122, .45); }
.rank-badge.tier-master {
    border-color: transparent; background: linear-gradient(165deg, #ffe0f5, #e4d3ff);
    box-shadow: 0 0 14px rgba(183, 108, 234, .55);
    border-image: linear-gradient(135deg, #ff9ee8, #b79bea, #8fc4f0) 1;
    border-width: 3px; border-style: solid;
}
.rank-badge.tier-challenger {
    border: 3px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #ff9fc0, #ffcf7a, #86dcc4, #8fc4f0, #b79bea) border-box;
    box-shadow: 0 0 18px rgba(183, 108, 234, .65);
    animation: rankGlow 2.4s ease-in-out infinite;
}
@keyframes rankGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 159, 192, .5); }
    50% { box-shadow: 0 0 22px rgba(143, 196, 240, .75); }
}

/* 내 캐릭터 아바타 — 랭크 티어 테두리는 .rank-badge와 같은 색상 규칙을 정사각형에 그대로 적용 */
.avatar-frame {
    width: 180px; height: 180px; padding: 0; border-radius: 36px; overflow: hidden;
    background: #fff; border: 6px solid #c07a4d; box-shadow: var(--shadow), var(--sheen);
    cursor: pointer; background-size: cover; background-position: center;
}
.avatar-frame canvas { width: 100%; height: 100%; display: block; }
.avatar-frame.tier-bronze { border-color: #c07a4d; }
.avatar-frame.tier-silver { border-color: #9aa3ad; }
.avatar-frame.tier-gold { border-color: #e0b23a; box-shadow: 0 0 12px rgba(224, 178, 58, .4); }
.avatar-frame.tier-platinum { border-color: #7fd8d0; box-shadow: 0 0 12px rgba(127, 216, 208, .45); }
.avatar-frame.tier-emerald { border-color: #35c47a; box-shadow: 0 0 14px rgba(53, 196, 122, .5); }
.avatar-frame.tier-master {
    border-color: transparent;
    background: linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #ff9ee8, #b79bea, #8fc4f0) border-box;
    box-shadow: 0 0 16px rgba(183, 108, 234, .6);
}
.avatar-frame.tier-challenger {
    border-color: transparent;
    background: linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #ff9fc0, #ffcf7a, #86dcc4, #8fc4f0, #b79bea) border-box;
    box-shadow: 0 0 20px rgba(183, 108, 234, .7);
    animation: rankGlow 2.4s ease-in-out infinite;
}

/* ------------------------------------------------------------ 로비 / 참가자 목록 */

.players { list-style: none; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.players li {
    display: flex; align-items: center; gap: 8px; background: #fff;
    border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 13px;
}
.swatch { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.players li .name { flex: 1; text-align: left; font-weight: 700; }
.badge-host, .badge-bot, .badge-ready { font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 800; }
.badge-host { background: var(--warn); color: #6b4c00; }
.badge-bot { background: var(--line); color: var(--dim); }
.badge-ready { background: var(--good); color: #1c5a4a; }
.badge-notready { background: #f1e9fb; color: var(--dim); font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.badge-disconnected { background: var(--warn); color: #6b4c00; font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.badge-team { font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 800; color: #fff; }
.badge-team-a { background: #ff6b6b; }
.badge-team-b { background: #4dabf7; }
.badge-team-swap { cursor: pointer; box-shadow: 0 0 0 2px rgba(255, 255, 255, .6) inset; }
.badge-team-swap:hover { filter: brightness(1.1); }

.kick-btn {
    flex-shrink: 0; width: 22px; height: 22px; padding: 0; border-radius: 50%;
    background: #fff; border: 2px solid var(--bad); color: var(--bad-dark);
    font-size: 11px; font-weight: 800; line-height: 1; box-shadow: none;
}
.kick-btn:hover { background: var(--bad); color: #fff; }

/* 캐릭터 아바타 카드 — 로비/대기실과 대국 화면(보드 위)에서 공유하는 가로 배치, 최대 4명 */
.player-cards {
    display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px;
    justify-content: center; width: 100%;
}
.player-card {
    position: relative; width: 94px; display: flex; flex-direction: column; align-items: center;
    gap: 4px; background: #fff; border: 2px solid var(--line); border-radius: 16px;
    padding: 8px 6px 7px; box-shadow: var(--shadow);
}
.player-card.turn { border-color: var(--good-dark); box-shadow: 0 0 8px rgba(63, 174, 149, .4); }
.player-card.disconnected { opacity: .6; border-style: dashed; border-color: var(--warn); }
.player-avatar {
    width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: #fff;
    border: 3px solid var(--accent); background-size: cover; background-position: center;
}
.player-avatar canvas { width: 100%; height: 100%; display: block; }
.player-card-name {
    font-size: 11px; font-weight: 800; width: 100%; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; text-align: center;
}
/*
 * 명찰(decorNameplate) 배경 이미지 — 원본이 가로로 긴 배너(1024×384)라서 박스도
 * 같은 비율(aspect-ratio)로 맞춰야 글자 한 줄 높이에 짓눌려 찌그러지지 않는다.
 * 예전엔 글자 크기만큼만 박스가 생겨서 배너가 얇은 띠로 눌리고 글자가 위아래로
 * 삐져나왔다 — 이제 박스 자체를 배너 비율로 키우고 그 안에서 글자를 가운데 정렬한다.
 * 다양한 배너 위에서도 글자가 읽히게 흰 텍스트 셰도우로 후광을 준다.
 */
.player-card-name.has-nameplate {
    aspect-ratio: 1024 / 384; display: flex; align-items: center; justify-content: center;
    background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
    padding: 0 18%; border-radius: 6px; color: #3c2d5a;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 1px 1px #fff;
}
.player-card-badges { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
/* 대국 참가자 카드용 축소 랭크 뱃지 — .rank-badge 색상 규칙은 그대로 쓰고 크기만 줄인다 */
.player-card-badges .rank-badge.card-rank-badge {
    padding: 2px 8px; font-size: 9px; border-width: 2px; gap: 2px; font-weight: 800;
}
.player-cards.lobby .player-card-badges .rank-badge.card-rank-badge { font-size: 11px; padding: 3px 10px; border-width: 3px; }
.card-kick { position: absolute; top: -7px; right: -7px; }

.howto { font-size: 12px; color: var(--dim); line-height: 1.7; background: rgba(255, 255, 255, .5); border-radius: 14px; padding: 12px; }

/* 로비 캐릭터 카드 — 참가자 파악이 우선이라 상점/대국 화면보다 큼직하게 */
.player-cards.lobby { gap: 14px; }
.player-cards.lobby .player-card { width: 164px; padding: 14px 10px 12px; gap: 8px; }
.player-cards.lobby .player-avatar { width: 122px; height: 122px; border-radius: 24px; border-width: 5px; }
.player-cards.lobby .player-card-name { font-size: 14px; }
.player-cards.lobby .player-card-badges { gap: 4px; }
.player-cards.lobby .badge-host, .player-cards.lobby .badge-bot,
.player-cards.lobby .badge-ready, .player-cards.lobby .badge-notready,
.player-cards.lobby .badge-disconnected { font-size: 11px; padding: 3px 8px; }

/* 로비 액션 버튼 — 세로로 쌓지 않고 가로로 나열, 공간 부족하면 자동 줄바꿈 */
.lobby-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.lobby-actions button { flex: 1 1 120px; }

/* 1대1대1(3인) 전용 규칙 선택 — 정확히 3명일 때만 로비에 보인다 */
.trio-rule-panel {
    width: 100%; background: rgba(224, 210, 247, .25); border-radius: 14px; padding: 10px 12px;
    display: flex; flex-direction: column; gap: 6px; margin-top: 4px;
}
.trio-rule-panel .label { font-size: 12px; }
.trio-rule-options { display: flex; gap: 6px; }
.trio-rule-btn {
    flex: 1; border: 2px solid var(--line); background: #fff; color: var(--dim);
    font-weight: 700; font-size: 12px; padding: 8px 6px; border-radius: 12px; cursor: pointer;
}
.trio-rule-btn.active { border-color: var(--accent); background: var(--card-grad); color: var(--accent-dark); box-shadow: var(--shadow); }
.trio-rule-panel .hint { margin: 0; }

@media (max-width: 640px) {
    .player-cards.lobby .player-card { width: 128px; padding: 10px 7px 9px; }
    .player-cards.lobby .player-avatar { width: 92px; height: 92px; }
    .player-cards.lobby .player-card-name { font-size: 12px; }
}

/* ------------------------------------------------------------ 주사위 모달 */

.modal {
    position: fixed; inset: 0; background: rgba(60, 45, 90, .45);
    display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal.hidden { display: none; }
.modal-box {
    background: var(--panel-grad); border: 3px solid var(--line); border-radius: 22px;
    padding: 20px; width: 100%; max-width: 460px; max-height: 86vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 12px;
}
.dice-box { align-items: center; text-align: center; }
.dice-list { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.die {
    width: 60px; height: 68px; border-radius: 14px; background: #fff; border: 3px solid var(--line);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    box-shadow: var(--shadow);
}
.die-face { width: 38px; height: 38px; }
.die small { font-size: 10px; color: var(--dim); font-weight: 700; }
.die.rolling { animation: diceRoll .18s ease-in-out infinite; border-color: var(--accent); }
@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(-6deg) scale(1.06); }
}
.dice-order { list-style: decimal; text-align: left; padding-left: 22px; font-size: 13px; font-weight: 700; }
.dice-order.hidden { display: none; }

.hall-title { font-size: 16px; color: var(--accent-dark); }

/* ------------------------------------------------------------ 대국 화면 */

.turn-banner {
    width: 100%; padding: 10px 16px; border-radius: 14px; font-weight: 800; font-size: 15px;
    background: var(--panel-grad); border: 2px solid var(--line); color: var(--text);
}
.turn-banner.mine { background: linear-gradient(165deg, #d8f5ea, var(--good)); color: #1c5a4a; }
.win-length-hint { margin-top: -6px; }

.board-row { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.stage { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
/* 바둑 점수판(따낸 돌 수) */
.go-score-strip {
    display: flex; gap: 16px; justify-content: center; font-size: 13px; font-weight: 700;
    color: var(--dim); width: 100%;
}
.go-score-strip b { color: var(--text); }

/* 바둑 결과 화면 — 흑/백 최종 집 점수 비교 */
.go-result-score { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.go-score-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--card-grad); border: 2px solid var(--line); border-radius: 12px;
    padding: 10px 14px; font-weight: 800; font-size: 15px;
}
.go-score-row b { font-size: 20px; color: var(--accent-dark); }

#board, #go-board {
    width: 100%; max-width: 600px; aspect-ratio: 1 / 1;
    background: #f1e2c2; border-radius: 16px; box-shadow: var(--shadow);
    touch-action: manipulation;
}
/* 대국 중 캐릭터 카드 — 보드 양옆이라 자리가 좁지만, 꾸민 티가 나야 하니 크게 */
.player-cards.side { flex: 0 0 auto; flex-direction: column; width: 148px; gap: 10px; }
.player-cards.side .player-card { width: 148px; padding: 12px 8px 10px; }
.player-cards.side .player-avatar { width: 108px; height: 108px; border-radius: 22px; border-width: 5px; }
.player-cards.side .player-card-name { font-size: 13px; }

/*
 * 모바일 대국 화면: 예전엔 보드 양옆에 캐릭터 카드를 크게 두는 데스크톱 레이아웃을
 * 그대로 좁은 화면에 욱여넣어서, 카드는 큼직한데 정작 오목판은 가운데 조그맣게
 * 짜부라졌다. 모바일에서는 순서만 바꿔서(order) 왼쪽·오른쪽 카드 컨테이너를 보드
 * 위 한 줄로 모으고(카드 자체도 세로 배치 대신 가로로 나열), 보드는 그 아래에서
 * 폭 전체를 그대로 쓰게 한다.
 */
@media (max-width: 640px) {
    .board-row { flex-wrap: wrap; justify-content: center; gap: 6px; }
    .player-cards.side {
        order: 1; flex-direction: row; flex-wrap: wrap; justify-content: center;
        width: auto; gap: 6px;
    }
    .stage { order: 2; flex: 1 1 100%; width: 100%; }
    .player-cards.side .player-card { width: 76px; padding: 5px 3px 4px; gap: 3px; }
    .player-cards.side .player-avatar { width: 50px; height: 50px; border-radius: 12px; border-width: 3px; }
    .player-cards.side .player-card-name { font-size: 9px; }
    .player-cards.side .player-card-badges { gap: 2px; }
    .player-cards.side .player-card-badges .rank-badge.card-rank-badge { font-size: 7px; padding: 1px 4px; border-width: 1px; }
    .player-cards.side .badge-host, .player-cards.side .badge-bot, .player-cards.side .badge-ready,
    .player-cards.side .badge-notready, .player-cards.side .badge-disconnected, .player-cards.side .badge-team {
        font-size: 7px; padding: 1px 4px;
    }
}


.footer { display: flex; gap: 8px; width: 100%; }
.footer button { flex: 1; }

/* ------------------------------------------------------------ 결과 화면 */

.record {
    width: 100%; background: var(--panel-grad); border: 3px solid var(--line); border-radius: 18px;
    padding: 14px; font-size: 14px; font-weight: 700; display: flex; flex-direction: column; gap: 4px;
}
.record.hidden { display: none; }
.record .rank-loss { color: var(--bad-dark); }

/* ------------------------------------------------------------ 상점 */

.modal-box.shop-box { max-width: 920px; }

.shop-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-head .hall-title { flex: 1; text-align: left; font-size: 20px; }

.shop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
    max-height: 64vh; overflow-y: auto; padding: 3px;
}
.shop-card {
    background: var(--card-grad); border: 2px solid var(--line); border-radius: 18px;
    padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px;
}
.shop-card canvas { width: 180px; height: 180px; }
.shop-card .name { font-weight: 700; text-align: center; min-height: 34px; font-size: 14px; }
.shop-card .price { color: var(--dim); font-size: 12px; }
.shop-card button { width: 100%; padding: 9px 6px; font-size: 12px; }
.shop-card.equipped { border-color: var(--good-dark); }
.shop-card.owned .price { display: none; }

.decor-subtabs { margin-top: -2px; }
.decor-subtabs.hidden { display: none; }

/* ------------------------------------------------------------ 내 정보(모드별 전적) */

.myinfo-body { display: flex; flex-direction: column; gap: 10px; }
.myinfo-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--card-grad); border: 2px solid var(--line); border-radius: 14px;
    padding: 12px 16px;
}
.myinfo-mode { font-weight: 800; font-size: 14px; }
.myinfo-stats { font-size: 13px; color: var(--dim); text-align: right; }
.myinfo-stats b { color: var(--text); }

@media (max-width: 640px) {
    body { padding: 12px; }
    .modal-box { padding: 14px; }
    .shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 58vh; }
    .shop-card canvas { width: 130px; height: 130px; }
}
