/* 빌립보 고스톱 v0.2 — 설계도의 모바일 화면을 그대로 옮긴 모양 */
:root {
  --felt: #1F4A33;
  --felt-deep: #163726;
  --gold: #F2C14E;
  --gold-soft: #F7E3A8;
  --gold-deep: #8A5A00;
  --cream: #FFFBF2;
  --cream-2: #F3EADB;
  --ink: #1E1A16;
  --ink-2: #4A403A;
  --ink-3: #5A4E46;
  --blue: #2F5FA8;
  --muted: rgba(255, 255, 255, 0.86);
  --font: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --display: 'Black Han Sans', 'IBM Plex Sans KR', 'Apple SD Gothic Neo', sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html[data-font="large"] { font-size: 18px; }
html[data-font="xlarge"] { font-size: 20px; }
body { margin: 0; background: var(--felt); color: #fff; font-family: var(--font); line-height: 1.4; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hidden { display: none !important; }
#app { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }

.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ver { position: fixed; right: 10px; bottom: 4px; font-size: 11px; color: rgba(255, 255, 255, 0.5); pointer-events: none; z-index: 1; }

/* ===== 공통 막대 ===== */
.bar { min-height: 84px; flex: none; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(0, 0, 0, 0.4); }
.bar-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.g1 { margin: 0; font-size: 1.375rem; font-weight: 700; line-height: 1.25; }
.g2 { margin: 0; font-size: 1.25rem; line-height: 1.3; color: rgba(255, 255, 255, 0.88); }
.scorebtn { flex: none; min-width: 86px; height: 60px; padding: 0 10px; border-radius: 14px; border: 2px solid var(--gold); background: rgba(0, 0, 0, 0.3); color: var(--gold); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.scorebtn.hot { background: var(--gold); color: var(--ink); }
.scorebtn .num { font-family: var(--display); font-size: 30px; line-height: 1; }
.scorebtn .num small { font-size: 16px; }
.scorebtn .sub { font-size: 13px; color: var(--gold-soft); }
.scorebtn.hot .sub { color: #3A3128; }

/* ===== 카드 ===== */
.card { position: relative; flex: none; padding: 0; border: none; border-radius: 6px; background: #F7F1E4; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); overflow: visible; }
.card img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.card .m { position: absolute; left: 2px; top: 2px; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 11px; background: rgba(20, 16, 14, 0.85); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.card .k { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); height: 18px; padding: 0 6px; border-radius: 9px; display: flex; align-items: center; font-size: 12px; font-weight: 700; white-space: nowrap; color: #fff; box-shadow: 0 0 0 1.5px #fff; }
.k-gwang { background: #E8B53A; color: var(--ink) !important; }
.k-yeol { background: var(--blue); }
.k-tti { background: #C8323A; }
.k-pi { background: #4A4340; }
.card .fallback { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--ink); font-size: 13px; font-weight: 700; text-align: center; padding: 4px; }
.c-hand { width: 64px; height: 96px; border-radius: 7px; }
.c-hand .m { min-width: 24px; height: 24px; font-size: 16px; left: 3px; top: 3px; border-radius: 12px; }
.c-hand .k { height: 20px; font-size: 13px; padding: 0 7px; bottom: 4px; }
.c-floor { width: 52px; height: 78px; }
.c-mini { width: 34px; height: 52px; border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35); }
.c-mini .m, .c-mini .k, .c-tiny .m, .c-tiny .k { display: none; }
.c-tiny { width: 28px; height: 42px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.c-big { width: 72px; height: 108px; border-radius: 8px; }
.card.lit { box-shadow: 0 0 0 3px var(--gold), 0 3px 0 rgba(0, 0, 0, 0.3); }
.card.pickable { box-shadow: 0 0 0 4px var(--gold), 0 0 16px rgba(242, 193, 78, 0.8); }
.card.new { animation: pop 0.5s ease-out; }
@keyframes pop { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ===== 처음 화면 ===== */
.home { padding: 30px 24px 26px; }
.fan { position: relative; width: 180px; height: 100px; margin: 0 auto; }
.fan img { position: absolute; width: 56px; height: 84px; border-radius: 6px; object-fit: cover; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.title { margin: 12px 0 0; text-align: center; font-family: var(--display); font-weight: 400; font-size: 46px; line-height: 1.15; color: var(--gold); letter-spacing: 1px; }
.subtitle { margin: 4px 0 0; text-align: center; font-size: 1.1875rem; color: rgba(255, 255, 255, 0.9); }
.recchip { margin: 16px auto 0; min-height: 46px; padding: 0 12px 0 16px; border-radius: 23px; background: rgba(0, 0, 0, 0.26); border: 1.5px solid rgba(242, 193, 78, 0.55); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.0625rem; white-space: nowrap; }
.recchip b { color: var(--gold); }
.bigbtns { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.bigbtn { width: 100%; min-height: 92px; padding: 10px 16px; border: none; border-radius: 20px; background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28); display: flex; align-items: center; gap: 14px; text-align: left; }
.bigbtn .ico { width: 56px; height: 56px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.bigbtn .t { display: block; font-size: 1.5625rem; font-weight: 700; line-height: 1.25; }
.bigbtn .s { display: block; font-size: 1rem; color: var(--ink-3); }
.resume { width: 100%; min-height: 60px; margin-top: 12px; border-radius: 16px; border: 2px solid var(--gold); background: rgba(242, 193, 78, 0.16); color: #fff; font-size: 1.1875rem; font-weight: 700; }
.linebtn { width: 100%; min-height: 56px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.75); background: transparent; color: #fff; font-size: 1.1875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.note { margin: 8px 0 0; text-align: center; font-size: 1rem; color: var(--muted); }
.toolrow { display: flex; gap: 8px; margin-top: 18px; }
.toolbtn { flex: 1 1 0; min-width: 0; min-height: 52px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.22); color: #fff; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.grow { flex: 1; }

/* ===== 판 ===== */
.game { height: 100vh; height: 100dvh; min-height: 0; }
.game-main { flex: 1; min-height: 0; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.opps { flex: none; display: flex; gap: 8px; }
.opp { flex: 1 1 0; min-width: 0; min-height: 96px; padding: 8px 10px; border-radius: 16px; background: rgba(0, 0, 0, 0.24); border: 2px solid transparent; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.opp.now { border-color: var(--gold); }
.opp .top { display: flex; align-items: center; gap: 8px; }
.av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: var(--gold); color: var(--ink); }
.opp .name { flex: 1; min-width: 0; font-size: 1.0625rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp .mid { display: flex; align-items: center; justify-content: space-between; }
.opp .hc { display: flex; align-items: center; gap: 6px; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.88); }
.opp .hc i { width: 12px; height: 17px; border-radius: 2px; background: #B8322A; border: 1.5px solid #F3D9CF; display: inline-block; }
.opp .sc { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--gold); }
.opp .sc small { font-size: 13px; }
.opp .sum { font-size: 0.875rem; color: rgba(255, 255, 255, 0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floorbox { flex: 1; min-height: 120px; position: relative; padding: 10px 12px 12px; border-radius: 18px; background: rgba(0, 0, 0, 0.16); display: flex; flex-direction: column; gap: 8px; }
.floorbox .head { display: flex; align-items: center; justify-content: space-between; font-size: 1rem; }
.floorbox .head b { color: #fff; }
.recent { margin: 0; display: flex; align-items: flex-start; gap: 8px; font-size: 0.9375rem; line-height: 1.35; color: rgba(255, 255, 255, 0.92); }
.recent #recent { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.chip { flex: none; padding: 2px 8px; border-radius: 10px; background: rgba(242, 193, 78, 0.18); color: var(--gold); font-size: 13px; font-weight: 700; }
.floor { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; padding: 4px 2px; }
.floor-in { margin: auto 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px 6px; }
.deck { position: relative; width: 60px; height: 84px; flex: none; }
.deck span { position: absolute; width: 52px; height: 78px; border-radius: 7px; border: 2px solid #5E140E; }
.deck .d3 { left: 8px; top: 0; background: #8E2219; }
.deck .d2 { left: 4px; top: 3px; background: #A12A20; }
.deck .d1 { left: 0; top: 6px; background: #B8322A; box-shadow: inset 0 0 0 4px #B8322A, inset 0 0 0 6px #E9B9A8; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 22px; color: #FFE7B8; }
.flipshow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; padding: 10px 12px; border-radius: 16px; background: rgba(20, 16, 14, 0.85); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: flip 0.3s ease-out; pointer-events: none; }
.flipshow span { font-size: 0.9375rem; font-weight: 700; color: var(--gold-soft); }
@keyframes flip { 0% { transform: translate(-50%, -50%) rotateY(90deg); } 100% { transform: translate(-50%, -50%) rotateY(0); } }
.takenbox { flex: none; min-height: 92px; width: 100%; padding: 8px 12px 10px; border: none; border-radius: 16px; background: rgba(0, 0, 0, 0.24); display: flex; flex-direction: column; gap: 6px; text-align: left; }
.takenbox .head { display: flex; justify-content: space-between; align-items: center; font-size: 0.9375rem; font-weight: 700; color: rgba(255, 255, 255, 0.92); }
.takenbox .head span:last-child { font-weight: 400; color: rgba(255, 255, 255, 0.75); font-size: 0.875rem; }
.groups { display: flex; justify-content: space-between; align-items: center; }
.grp { display: flex; align-items: center; gap: 7px; }
.grp .stack { position: relative; width: 42px; height: 58px; flex: none; }
.grp .stack .card { position: absolute; }
.grp .stack .back { left: 8px; top: 0; }
.grp .stack .front { left: 0; top: 6px; }
.grp .stack .empty { position: absolute; left: 0; top: 6px; width: 34px; height: 52px; border-radius: 4px; border: 1.5px dashed rgba(255, 255, 255, 0.45); }
.grp .lab { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.grp .lab span { font-size: 0.875rem; color: rgba(255, 255, 255, 0.85); }
.grp .lab b { font-size: 1.25rem; }
.grp .lab b small { font-size: 0.875rem; font-weight: 400; }
.grp.on .lab b { color: var(--gold); }
.handbox { flex: none; padding: 8px 6px 12px; border-radius: 18px; background: rgba(0, 0, 0, 0.34); border: 2px solid transparent; display: flex; flex-direction: column; gap: 8px; }
.handbox.my { border-color: var(--gold); }
.handbox .head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.handbox .head b { font-size: 1.0625rem; display: block; }
.handbox .hint { font-size: 0.9375rem; color: var(--gold-soft); }
.pill { min-height: 48px; padding: 0 14px; border-radius: 24px; border: 1.5px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1rem; font-weight: 700; white-space: nowrap; }
.hand { display: flex; justify-content: center; min-height: 100px; padding: 0 2px; }
.hand .card { margin-left: var(--overlap, 5px); transition: transform 0.12s; }
.hand .card:first-child { margin-left: 0; }
.hand button.card:active { transform: translateY(-6px); }
.hand .empty { align-self: center; color: var(--muted); font-size: 1rem; }

/* ===== 아래에서 올라오는 창 ===== */
.sheet { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(0, 0, 0, 0.35); }
.sheet.clear { background: transparent; pointer-events: none; }
.sheet.clear .sheet-card { pointer-events: auto; }
.sheet-card { width: 100%; max-width: 430px; margin: 0 auto; max-height: 88vh; max-height: 88dvh; overflow: auto; padding: 20px 16px 22px; border-radius: 24px 24px 0 0; background: var(--cream); color: var(--ink); box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.3); animation: up 0.22s ease-out; }
@keyframes up { 0% { transform: translateY(40px); opacity: 0.4; } 100% { transform: translateY(0); opacity: 1; } }
.sheet-card h2 { margin: 0; font-size: 1.375rem; line-height: 1.3; }
.sheet-card .lead { margin: 4px 0 0; font-size: 1.125rem; color: var(--ink-2); }
.sheet-card .small { margin: 12px 0 0; font-size: 0.9375rem; color: var(--ink-2); text-align: center; }
.choice { width: 100%; min-height: 88px; margin-top: 12px; padding: 0 18px; border: none; border-radius: 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22); display: flex; align-items: center; gap: 16px; text-align: left; }
.choice.gold { background: var(--gold); color: var(--ink); }
.choice.blue { background: var(--blue); color: #fff; }
.choice.cream { background: #fff; color: var(--ink); border: 2px solid var(--cream-2); }
.choice .big { width: 70px; flex: none; text-align: center; font-family: var(--display); font-size: 36px; line-height: 1; }
.choice .t { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.choice .s { display: block; font-size: 1rem; line-height: 1.35; opacity: 0.92; }
.pickrow { display: flex; gap: 12px; margin-top: 14px; }
.pickopt { flex: 1 1 0; min-width: 0; padding: 12px 8px 14px; border-radius: 18px; border: 3px solid var(--cream-2); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12); }
.pickopt .t { font-size: 1.1875rem; font-weight: 700; }
.pickopt .s { font-size: 0.9375rem; color: var(--ink-3); text-align: center; }
.scorebig { display: flex; align-items: center; gap: 14px; }
.scorebig .n { font-family: var(--display); font-size: 50px; line-height: 1; color: var(--gold-deep); }
.scorebig .n small { font-size: 26px; }
.partrow { margin-top: 12px; min-height: 64px; padding: 8px 14px; border-radius: 14px; background: var(--cream-2); display: flex; align-items: center; gap: 12px; }
.partrow .imgs { display: flex; flex: none; }
.partrow .imgs .card { margin-left: -8px; }
.partrow .imgs .card:first-child { margin-left: 0; }
.partrow .t { flex: 1; min-width: 0; font-size: 1.125rem; font-weight: 700; }
.partrow .p { flex: none; font-size: 1.375rem; font-weight: 700; }
.lines { margin-top: 10px; border-top: 1px solid #E6DCCD; }
.lines div { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #E6DCCD; font-size: 1.0625rem; }
.lines div b { font-size: 1.125rem; }
.lines .sum { border-bottom: none; font-weight: 700; }
.lines .sum b { font-family: var(--display); font-size: 28px; font-weight: 400; color: var(--gold-deep); }
.taken-all { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.levels { display: flex; gap: 8px; margin-top: 14px; }
.levels button { flex: 1 1 0; min-height: 64px; border-radius: 14px; border: 2px solid var(--cream-2); background: #fff; color: var(--ink); font-size: 1.125rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.levels button small { font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); }
.levels button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); }
.primary { width: 100%; min-height: 64px; margin-top: 16px; border: none; border-radius: 18px; background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22); font-size: 1.375rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.secondary { width: 100%; min-height: 52px; margin-top: 10px; border-radius: 16px; border: 2px solid var(--ink-3); background: transparent; color: var(--ink); font-size: 1.125rem; font-weight: 700; }

/* ===== 판 결과 ===== */
.result { padding: 24px 16px 22px; gap: 0; }
.result .who { display: flex; flex-direction: column; align-items: center; text-align: center; }
.result .who .n { font-size: 1rem; color: rgba(255, 255, 255, 0.82); }
.result .who h1 { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 42px; color: var(--gold); }
.result .who p { margin: 4px 0 0; font-size: 1.25rem; }
.cardbox { margin-top: 14px; padding: 12px 16px; border-radius: 20px; background: var(--cream); color: var(--ink); }
.cardbox h3, .darkbox h3 { margin: 0; font-size: 1.125rem; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cardbox h3 small, .darkbox h3 small { font-size: 0.9375rem; font-weight: 400; }
.prow { min-height: 48px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #E6DCCD; }
.prow .imgs { position: relative; width: 70px; height: 42px; flex: none; }
.prow .imgs .card { position: absolute; top: 0; }
.prow .t { flex: 1; min-width: 0; font-size: 1.125rem; }
.prow .p { flex: none; font-size: 1.25rem; font-weight: 700; }
.prow.total { border-bottom: none; justify-content: space-between; }
.prow.total b { font-family: var(--display); font-size: 32px; font-weight: 400; color: var(--gold-deep); }
.gobadge { width: 38px; height: 38px; margin: 2px 16px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 19px; color: var(--ink); }
.foot { margin: 4px 0 0; font-size: 0.9375rem; color: var(--ink-2); }
.darkbox { margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(0, 0, 0, 0.24); display: flex; flex-direction: column; gap: 6px; }
.srow { min-height: 46px; padding: 0 10px; border-radius: 12px; border: 2px solid transparent; display: flex; align-items: center; gap: 8px; }
.srow.me { background: rgba(242, 193, 78, 0.14); border-color: var(--gold); }
.srow .av { background: #B8452A; color: #fff; }
.srow .av.ai { background: var(--gold); color: var(--ink); font-size: 12px; }
.srow .nm { flex: 1; min-width: 0; font-size: 1.125rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .nm small { font-weight: 400; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.85); }
.delta { flex: none; padding: 2px 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); font-size: 0.9375rem; font-weight: 700; }
.delta.plus { background: var(--gold); color: var(--ink); }
.amt { flex: none; width: 96px; text-align: right; white-space: nowrap; }
.amt b { font-family: var(--display); font-size: 22px; font-weight: 400; }
.amt small { margin-left: 2px; font-size: 13px; }
.reclink { margin-top: 10px; min-height: 48px; width: 100%; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.22); color: #fff; display: flex; align-items: center; gap: 10px; font-size: 1rem; text-align: left; }
.nextline { margin: 10px 0 0; text-align: center; font-size: 1rem; color: rgba(255, 255, 255, 0.88); }
.btnpair { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; }
.btnpair .go { flex: 3 1 0; min-height: 64px; border: none; border-radius: 18px; background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); font-size: 1.375rem; font-weight: 700; }
.btnpair .out { flex: 2 1 0; min-height: 64px; border-radius: 18px; border: 2px solid rgba(255, 255, 255, 0.7); background: transparent; color: #fff; font-size: 1.25rem; font-weight: 700; }

/* ===== 내 기록 · 설정 · 규칙 ===== */
.page { flex: 1; padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.lightcard { padding: 14px 18px 16px; border-radius: 20px; background: var(--cream); color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.lightcard .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lightcard .label { font-size: 1.0625rem; font-weight: 700; color: var(--ink-3); }
.tag { padding: 2px 9px; border-radius: 12px; background: var(--cream-2); font-size: 0.875rem; font-weight: 700; color: var(--ink-3); }
.bignum { display: flex; align-items: baseline; gap: 6px; }
.bignum b { font-family: var(--display); font-weight: 400; font-size: 52px; line-height: 56px; color: var(--gold-deep); }
.bignum span { font-size: 1.25rem; font-weight: 700; }
.manna { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--ink-2); }
.manna .tag { background: var(--gold); color: var(--ink); }
.rate { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.rate .pct { font-family: var(--display); font-size: 48px; line-height: 1; color: var(--gold); }
.rate .pct small { font-size: 26px; }
.bar33 { position: relative; height: 36px; }
.bar33 .bg { position: absolute; left: 0; right: 0; top: 2px; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.18); }
.bar33 .fg { position: absolute; left: 0; top: 2px; height: 14px; border-radius: 7px; background: var(--gold); }
.bar33 .mk { position: absolute; left: 33%; top: -2px; width: 3px; height: 22px; margin-left: -1px; background: #fff; }
.bar33 .ml { position: absolute; left: 33%; top: 20px; width: 90px; margin-left: -45px; text-align: center; font-size: 14px; font-weight: 700; }
.dots { display: flex; justify-content: space-between; }
.dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; border: 2px solid rgba(255, 255, 255, 0.45); color: rgba(255, 255, 255, 0.85); }
.dot.W { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.dot.none { border-style: dashed; opacity: 0.4; }
.setrow { min-height: 58px; width: 100%; padding: 0; border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: #fff; display: flex; align-items: center; gap: 12px; text-align: left; }
.setrow:last-child { border-bottom: none; }
.setrow .lab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.setrow .lab b { font-size: 1.125rem; }
.setrow .lab small { font-size: 0.875rem; color: rgba(255, 255, 255, 0.78); }
.setrow .val { flex: none; font-size: 1.0625rem; font-weight: 700; color: var(--gold); }
.setrow[disabled] { cursor: default; }
.setrow[disabled] .val { color: rgba(255, 255, 255, 0.5); }
.switch { position: relative; width: 56px; height: 32px; flex: none; border-radius: 16px; background: rgba(255, 255, 255, 0.25); transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: left 0.15s; }
[aria-checked="true"] .switch { background: var(--gold); }
[aria-checked="true"] .switch::after { left: 27px; }
.lightcard .switch { background: #C9BFB2; }
.lightcard [aria-checked="true"] .switch { background: #E8B53A; }
.group-title { font-size: 1.125rem; font-weight: 700; }
.groupbox { padding: 0 16px; border-radius: 18px; background: rgba(0, 0, 0, 0.24); }
.rules h3 { margin: 6px 0 2px; font-size: 1.1875rem; color: var(--gold); }
.rules p, .rules li { font-size: 1.0625rem; line-height: 1.55; }
.rules ol, .rules ul { margin: 4px 0; padding-left: 22px; }
.rules table { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.rules td { padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.rules td:last-child { text-align: right; font-weight: 700; color: var(--gold); white-space: nowrap; }

.toast { position: fixed; left: 50%; top: 96px; transform: translateX(-50%); z-index: 20; max-width: 360px; width: calc(100% - 40px); padding: 12px 16px; border-radius: 14px; background: rgba(20, 16, 14, 0.92); color: #fff; font-size: 1.0625rem; font-weight: 700; text-align: center; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }

@media (max-height: 700px) {
  .bar { min-height: 72px; }
  .g1 { font-size: 1.25rem; }
  .g2 { font-size: 1.0625rem; }
  .opp { min-height: 84px; }
  .takenbox { min-height: 80px; }
  .grp .stack { width: 36px; height: 50px; }
  .grp .stack .card.c-mini { width: 28px; height: 44px; }
  .c-floor { width: 46px; height: 69px; }
  .deck { width: 54px; height: 75px; }
  .deck span { width: 46px; height: 69px; }
  .floorbox { padding: 8px 10px 8px; gap: 6px; }
  .floor .deck { display: none; }   /* 작은 화면은 더미 그림 대신 위의 "남은 패 N장"만 */
  .floor { padding: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
