:root {
  --bg: #fbf3e7;
  --card: #fffcf7;
  --text: #3b1f0e;
  --sub: #8a6a52;
  --faint: #c2aa92;
  --line: #eedfcb;
  --btn: #f7ebdb;
  --btn-line: #ead6bd;
  --green: #6b3410;
  --green-2: #8c4a1e;
  --green-soft: #f6e4cf;
  --green-dark: #4a220c;
  --num: #a0480e;
  --odds: #c4472b;
  --lose: #c4472b;
  --yellow: #f6c64a;
  --yellow-soft: #fff6d8;
  --gold: #e3a50d;
  --win: #e8710e; /* 적중·포인트 강조 (로고 농구공 주황) */
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "GmarketSans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px; letter-spacing: -0.3px;
  font-synthesis: none; /* 없는 굵기를 억지로 만들면 글씨가 뭉개진다 */
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { max-width: 520px; margin: 0 auto; padding-bottom: 150px; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }
main { padding: 0 14px; }
.page { display: none; }
.page.on { display: block; }

/* ───── 헤더 · 티커 ───── */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 14px 14px 0;
  border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 4px; }
.logo { font-size: 23px; font-weight: 900; color: var(--green-dark); letter-spacing: -1px; }
.logo b { color: var(--green); font-weight: 900; }
.logo::before { content: "☕"; font-size: 18px; margin-right: 3px; }
.page-name { color: var(--sub); font-size: 13.5px; font-weight: 600; }
.ticker { overflow: hidden; white-space: nowrap; padding: 9px 0 10px; font-size: 13px; font-weight: 700;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: inline-block; animation: tick 30s linear infinite; padding-left: 4px; }
.ticker-track span { margin-right: 26px; color: var(--green); }
.ticker-track span:nth-child(3n+2) { color: var(--odds); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.top:not(:has(.ticker:not([hidden]))) { padding-bottom: 12px; }

/* ───── 공통 카드 ───── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  margin-bottom: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.sec-head b { font-size: 16px; }
.sec-head small { color: var(--sub); font-size: 12px; }
.count-line { color: var(--sub); font-size: 13.5px; font-weight: 600; margin: 4px 2px 10px; }
.count-line b { color: var(--green); }
.empty { text-align: center; color: var(--sub); padding: 40px 0; }

.btn-dark { width: 100%; margin-top: 12px; background: var(--green-dark); color: #fff; font-weight: 800;
  padding: 14px; border-radius: 12px; }
.btn-primary { width: 100%; background: var(--green); color: #fff; font-weight: 800; padding: 15px;
  border-radius: 12px; font-size: 16px; }
.btn-primary:disabled { opacity: .5; }
.btn-soft { background: var(--btn); border: 1px solid var(--btn-line); border-radius: 12px; padding: 12px 6px; font-weight: 700; font-size: 14px; }
.btn-yellow { background: var(--yellow-soft); border: 1.5px solid var(--yellow); border-radius: 12px; padding: 12px 6px; font-weight: 700; font-size: 14px; }

.chips { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips:empty { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 20px; background: #f6ece4; font-weight: 700; font-size: 14px; color: #30271f; }
.chip small { color: var(--faint); font-weight: 600; margin-left: 3px; }
.chip.on { background: var(--green-dark); color: #fff; }
.chip.on small { color: #e0c2a7; }
.chip.lg.on { background: var(--green); }
.chip.lg { background: var(--card); border: 1px solid var(--line); font-size: 13px; padding: 7px 12px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #eedfcb; padding: 4px; border-radius: 12px; margin-bottom: 10px; }
.seg button { padding: 10px 0; border-radius: 9px; color: var(--sub); font-weight: 700; }
.seg button.on { background: var(--card); color: var(--text); font-weight: 800; box-shadow: 0 1px 3px rgba(69, 45, 24,.1); }

.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #f6e4d4, #eac8aa);
  color: var(--green-dark); display: grid; place-items: center; font-weight: 900; flex: none; font-size: 15px; }
.avatar.big { width: 56px; height: 56px; font-size: 28px; }
.chip-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px;
  background: var(--green-soft); color: var(--green); vertical-align: 2px; }
.chip-badge:empty { display: none; }

/* ───── 내정보 ───── */
.pf-row { display: flex; align-items: center; gap: 12px; }
.pf-name b { font-size: 19px; }
.pf-sub { color: var(--sub); font-size: 13px; margin-top: 3px; }
.score-box { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 10px; background: var(--green-dark);
  color: #fff; border-radius: 14px; padding: 14px 4px; text-align: center; }
.score-box span { display: block; font-size: 12px; color: #e0c2a7; margin-bottom: 4px; }
.score-box b { font-size: 19px; }
.score-box div:first-child b { color: #f7ddc7; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--btn); border-radius: 12px; text-align: center; padding: 14px 4px; }
.tile b { display: block; font-size: 20px; }
.tile span { color: var(--sub); font-size: 12.5px; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

.streak-banner { background: linear-gradient(90deg, #fde9b8, #fff3d4); color: #7a4b00; font-weight: 800; font-size: 14px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 8px; }
.pro { padding: 14px 0; border-top: 1px dashed var(--line); }
.pro:first-of-type { border-top: 0; }
.pro-row { display: flex; align-items: center; gap: 10px; }
.pro .medal { width: 28px; text-align: center; font-size: 20px; font-weight: 900; color: var(--sub); }
.pro .nm { flex: 1; min-width: 0; }
.pro .nm b { font-size: 16px; }
.pro .nm div { color: var(--sub); font-size: 12.5px; margin-top: 3px; }
.pro .sc { text-align: right; }
.pro .sc b { display: block; font-size: 19px; color: var(--green); font-weight: 900; }
.pro .sc small { color: var(--sub); font-size: 12px; }

/* ───── 배당판 ───── */
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0 14px; margin-bottom: 10px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--sub); stroke-width: 2; flex: none; }
.search input { flex: 1; border: 0; background: none; font: inherit; padding: 13px 0; outline: none; color: var(--text); }

.game { padding: 14px; }
.game-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.game-head .lg { font-weight: 800; }
.game-head .tm { color: var(--sub); margin-left: 6px; font-weight: 500; }
.round { background: var(--yellow-soft); color: #8a5a00; border: 1px solid #f3dc92; font-size: 11.5px; font-weight: 800;
  padding: 3px 9px; border-radius: 10px; }
.game-title { text-align: center; font-weight: 800; font-size: 17px; margin: 12px 0 10px; }
.game-title .vs { color: var(--faint); font-weight: 500; font-size: 13px; margin: 0 7px; }
.mk { display: grid; grid-template-columns: 50px 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.mk-name { font-size: 12px; line-height: 1.35; color: #30271f; }
.mk-name b { color: var(--num); font-size: 13px; display: block; }
.opts { display: grid; gap: 6px; }
.opts.n2 { grid-template-columns: 1fr 1fr; }
.opts.n3 { grid-template-columns: 1fr 1fr 1fr; }
.opt { background: var(--btn); border: 1px solid var(--btn-line); border-radius: 12px; padding: 7px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; transition: background .12s, transform .08s; }
.opt:active { transform: scale(.97); }
.opt span { font-size: 12.5px; color: #3c322a; }
.opt b { font-size: 16px; font-weight: 700; }
.opt.sel { background: var(--green); border-color: var(--green); color: #fff; }
.opt.sel span { color: #fae9db; }
.opt.mine { border: 1.5px solid var(--green); background: var(--green-soft); }
.opt:disabled { opacity: .35; cursor: default; }

/* ───── 픽 카드 (내 배팅 · 공유픽) ───── */
.member-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.member-head .nm { flex: 1; min-width: 0; }
.member-head .nm b { font-size: 16px; }
.member-head .nm div { color: var(--sub); font-size: 12.5px; margin-top: 2px; }
.member-head .best { text-align: right; font-size: 13px; color: var(--sub); }
.member-head .best b { color: var(--odds); }
.member-head .best div { font-size: 12px; margin-top: 2px; }
.member-body { margin-top: 12px; }
.pick { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; background: #fffefd; }
.member-body .pick:first-child { margin-top: 0; }
.pick-head { display: flex; align-items: center; gap: 8px; }
.pick-head .t { font-weight: 800; }
.pick-head .f { color: var(--odds); font-weight: 800; font-size: 14px; }
.pick-head .st { margin-left: auto; }
.st { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 10px; }
.st-before { background: #f5ede6; color: #463220; }
.st-open { background: var(--green-soft); color: var(--green); }
.st-won { background: var(--win); color: #fff; }
.st-lost { background: #f8e3dc; color: var(--lose); }
.st-void { background: var(--btn); color: var(--sub); }
.leg { padding: 10px 0; border-top: 1px dashed var(--line); }
.pick-head + .leg, .cmt + .leg { border-top: 0; }
.leg .meta { font-size: 12.5px; color: var(--sub); }
.leg .meta b { color: var(--num); margin-right: 3px; }
.leg .teams { font-weight: 800; font-size: 15.5px; margin-top: 3px; }
.leg .pk { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-weight: 800; font-size: 16px; }
.leg .pk .o { color: var(--odds); font-size: 17px; }
.leg.win .pk span:first-child::after { content: " ✓"; color: var(--win); }
.leg.lose .pk { opacity: .45; text-decoration: line-through; }
.leg.void .pk { opacity: .55; }
.leg .res { font-size: 12px; color: var(--sub); margin-left: 4px; font-weight: 600; }
.cmt { background: var(--yellow-soft); border: 1px solid #f0d77e; border-left: 4px solid var(--yellow); border-radius: 10px;
  padding: 9px 12px; margin: 10px 0 2px; font-weight: 700; }
.cmt small { display: block; color: #9a7300; font-size: 11.5px; margin-bottom: 3px; font-weight: 700; }
.pick-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; font-size: 14px; }
.pick-foot b.win { color: var(--win); }
.copy { margin-top: 10px; width: 100%; padding: 10px; border-radius: 10px; background: var(--green-soft);
  color: var(--green); font-weight: 800; }

/* ───── 랭킹 ───── */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 12px; }
.pod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; padding: 14px 6px 12px; }
.pod .medal { font-size: 28px; }
.pod .nm { font-weight: 800; margin-top: 4px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .sc { color: var(--win); font-weight: 900; font-size: 17px; margin-top: 4px; }
.pod .hr { color: var(--sub); font-size: 12px; margin-top: 2px; }
.pod.p1 { padding-top: 22px; border: 2px solid var(--gold); background: #fffbea; }
.list { padding: 4px 14px; }
.row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .rk { width: 26px; font-weight: 800; color: var(--sub); text-align: center; }
.row .nm { flex: 1; font-weight: 700; min-width: 0; }
.row .nm div { color: var(--sub); font-weight: 500; font-size: 12px; margin-top: 2px; }
.row .sc { font-weight: 900; text-align: right; }
.row .sc small { display: block; font-weight: 600; font-size: 11.5px; color: var(--sub); }
.row.me { background: var(--green-soft); margin: 0 -14px; padding: 12px 14px; }
.fame h3 { font-size: 15px; margin: 18px 2px 10px; }
.up { color: var(--green); }
.down { color: var(--lose); }

/* ───── 하단 탭 ───── */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); background: #fffcf7; border-top: 1px solid var(--line);
  padding: 7px 0 calc(7px + env(safe-area-inset-bottom)); }
.bottom button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.bottom svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bottom button.on { color: var(--green-dark); font-weight: 800; }
.bottom button.on svg { stroke: var(--green); stroke-width: 1.9; }
/* 아이콘 뒤 알약 모양 바탕: 누른 칸만 크림색으로 */
.bottom svg { box-sizing: content-box; padding: 3px 14px; border-radius: 14px; transition: background .15s; }
.bottom button.on svg { background: var(--green-soft); }
svg .f { fill: currentColor; stroke: none; opacity: 0; }
.bottom button.on svg .f, .subtabs button.on svg .f { opacity: .18; }

/* ───── 슬립 · 시트 ───── */
.slipbar { position: fixed; left: 12px; right: 12px; bottom: 74px; max-width: 496px; margin: 0 auto;
  background: var(--green-dark); color: #fff; border-radius: 16px; display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px; box-shadow: 0 8px 24px rgba(61, 39, 20,.3); z-index: 20; }
.slip-clear { color: #e0c2a7; font-size: 16px; }
.slip-info { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: #e4d0bf; }
.slip-info b { color: #fff; }
.slip-open { background: var(--green-2); color: #fff; font-weight: 800; padding: 11px 18px; border-radius: 12px; }

.sheet-bg { position: fixed; inset: 0; background: rgba(38, 25, 13,.45); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); z-index: 31; max-height: 86vh; overflow-y: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; margin-bottom: 6px; }
.sheet-head .x { font-size: 18px; color: var(--sub); }
.sheet .leg { display: flex; align-items: center; gap: 8px; }
.sheet .leg .body { flex: 1; min-width: 0; }
.sheet .leg .o { color: var(--odds); font-weight: 800; }
.sheet .leg .rm { color: var(--faint); padding: 4px; }
.sum { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-radius: 12px; padding: 10px 6px; margin: 10px 0; text-align: center; }
.sum span { display: block; font-size: 12px; color: var(--sub); }
.sum b { font-size: 17px; }
.green { color: var(--green); }
.share { display: flex; gap: 8px; align-items: center; margin: 12px 2px 8px; font-weight: 700; }
.share input { width: 18px; height: 18px; accent-color: var(--green); }
.share small { color: var(--sub); font-weight: 500; }
.comment { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px; font: inherit; }
.comment:focus { outline: 2px solid var(--green-soft); border-color: var(--green); }
.left { color: var(--sub); font-size: 12.5px; margin: 8px 2px; }
.how { padding-left: 20px; line-height: 1.6; }
.how li { margin-bottom: 8px; }
.note { background: var(--bg); border-radius: 10px; padding: 10px 12px; color: var(--sub); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 140px; transform: translateX(-50%); background: rgba(60, 37, 17,.95);
  color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: 90vw; text-align: center; }

/* ───── 관리자 버튼 · 공유픽 탭 · 유튜브 ───── */
.btn-admin { display: block; text-align: center; margin-top: 10px; padding: 11px; border-radius: 12px; border: 1px dashed var(--green);
  color: var(--green); font-weight: 800; text-decoration: none; font-size: 14px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.vrow { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.vrow:first-child { border-top: 0; }
.vrow img { width: 112px; height: 63px; object-fit: cover; border-radius: 10px; flex: none; background: var(--btn); }
.vrow .t { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vrow .t small { display: block; color: var(--sub); font-weight: 500; font-size: 12px; margin-top: 3px; }
a.btn-dark { display: block; text-align: center; text-decoration: none; }

/* ───── 연출: 꽃가루 · 적중 팝업 · 1위 반짝임 ───── */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.win-pop { position: fixed; inset: 0; z-index: 55; background: rgba(38, 25, 13,.55); display: grid; place-items: center; padding: 24px;
  animation: fadeIn .2s ease-out; }
.win-card { background: var(--card); border-radius: 24px; padding: 26px 22px 18px; width: 100%; max-width: 320px; text-align: center;
  animation: popIn .45s cubic-bezier(.2, 1.6, .4, 1); }
.win-emoji { font-size: 58px; animation: wiggle 1s ease-in-out infinite; display: inline-block; }
.win-title { font-size: 26px; font-weight: 900; color: var(--green-dark); margin-top: 6px; }
.win-score { font-size: 34px; font-weight: 900; color: var(--win); margin: 6px 0 4px; }
.win-sub { color: var(--sub); font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.12); } }

.pod.p1 { position: relative; overflow: hidden; }
.pod.p1::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent); animation: shine 2.8s ease-in-out infinite; }
.pod.p1 .medal { display: inline-block; animation: bounce 1.6s ease-in-out infinite; }
@keyframes shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.st-won { animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(110, 67, 30,.18); } }
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; } }

.score-box small { display: block; font-size: 11.5px; margin-top: 2px; font-weight: 700; }
.score-box small.up { color: #f1c49d; }
.score-box small.down { color: #f2a48f; }

/* ───── 경기분석 ───── */
.an-open { width: 100%; margin: -2px 0 8px; padding: 10px; border-radius: 12px; background: var(--green-soft);
  color: var(--green); font-weight: 800; font-size: 13.5px; border: 1px solid #f2e2d4; }
.an-day { font-size: 13.5px; color: var(--sub); margin: 18px 4px 10px; font-weight: 800; }
.an-day:first-child { margin-top: 4px; }
.an-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; margin-bottom: 10px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: transform .08s; }
.an-row:active { transform: scale(.98); }
.an-row.past { opacity: .55; }
.an-time { display: flex; flex-direction: column; align-items: center; width: 52px; flex: none;
  border-right: 1px solid var(--line); padding-right: 12px; }
.an-time b { font-size: 17px; color: var(--green-dark); font-weight: 900; }
.an-time small { font-size: 11.5px; color: var(--sub); margin-top: 2px; white-space: nowrap; }
.an-teams { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.an-teams b { font-size: 16px; font-weight: 800; }
.an-teams i { font-style: normal; color: var(--faint); font-size: 12px; font-weight: 700; }
.an-teams small { width: 100%; color: var(--sub); font-size: 12px; margin-top: 4px; }
.an-count { flex: none; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 12px;
  padding: 5px 9px; border-radius: 20px; }
.an-back { color: var(--green); font-weight: 800; margin: 0 2px 12px; font-size: 15px; }
.an-card { padding: 0; overflow: hidden; }
.an-hero { background: linear-gradient(160deg, #4a220c, #4c3119); color: #fff; padding: 18px 18px 22px; text-align: center; }
.an-chip { display: inline-block; background: rgba(255,255,255,.12); color: #f7ddc7; font-weight: 800; font-size: 12.5px;
  padding: 5px 11px; border-radius: 20px; }
.an-when { color: #e0c2a7; font-size: 12.5px; margin-top: 8px; }
.an-vs { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.an-vs b { flex: 1; font-size: 20px; font-weight: 900; line-height: 1.25; word-break: keep-all; }
.an-vs span { color: #f1c49d; font-weight: 900; font-size: 13px; background: rgba(255,255,255,.1); border-radius: 8px; padding: 4px 7px; }
.an-sec { font-size: 13px; font-weight: 800; color: var(--sub); padding: 18px 18px 6px; }
.an-sec small { background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 1px 7px; margin-left: 4px; }
.an-point { margin: 0 14px 10px; padding: 14px 14px 14px 16px; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--green-2); border-radius: 12px; }
.an-title { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15.5px; margin-bottom: 7px; }
.an-num { width: 22px; height: 22px; border-radius: 50%; background: var(--green-dark); color: #f7ddc7; font-weight: 900;
  display: grid; place-items: center; flex: none; font-size: 12px; }
.an-body { color: #352b23; font-size: 14.5px; line-height: 1.7; word-break: keep-all; }
.an-body .hl { color: var(--green); font-weight: 800; }
.an-bet { width: calc(100% - 28px); margin: 6px 14px 16px; }

.an-picks { margin: 14px 14px 2px; background: var(--yellow-soft); border: 1px solid #f0d77e; border-radius: 14px; padding: 12px 14px; }
.an-picks-head { font-weight: 900; font-size: 13.5px; color: #8a5a00; margin-bottom: 6px; }
.an-pick { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-top: 1px dashed #efd98f; font-size: 14.5px; }
.an-pick:first-of-type { border-top: 0; }
.an-pick span { color: #8a6a1f; font-weight: 700; font-size: 13px; }
.an-pick b { font-weight: 900; color: var(--green-dark); }
.an-teams small em { font-style: normal; background: var(--yellow-soft); color: #8a5a00; border-radius: 6px; padding: 1px 5px; font-weight: 800; margin-right: 3px; }
.an-teams small { color: var(--green-dark); font-weight: 700; }
.an-count { background: none; color: var(--faint); font-size: 22px; padding: 0; }

/* 하단 탭 이름이 두 줄로 넘어가지 않게 (탭이 많을 때 글자를 조금 줄임) */
.bottom button { white-space: nowrap; letter-spacing: -0.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bottom.many button { font-size: 10.5px; }
.bottom.many svg { width: 21px; height: 21px; }

.an-group { margin: 16px 18px 8px; font-size: 13.5px; font-weight: 900; color: var(--green); display: flex; align-items: center; gap: 8px; }
.an-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 프로필 사진 */
.avatar { position: relative; overflow: hidden; }
.av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.pod-av { position: relative; display: inline-block; }
.pod-av .medal { position: absolute; right: -8px; bottom: -6px; font-size: 22px; }
.pod.p1 .pod-av .avatar { box-shadow: 0 0 0 3px var(--gold); }

/* 배당 변경 표시 */
.opt b .mv { font-style: normal; font-size: 10px; margin-left: 2px; vertical-align: 2px; }
.opt b .mv.up { color: #d64545; }
.opt b .mv.dn { color: #6c4524; }
.opt.sel b .mv, .opt.mine b .mv { color: inherit; }
.gh-right { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.moved-tag { font-style: normal; font-size: 11px; font-weight: 800; color: #b5541b; background: #fff1e6; border: 1px solid #f6d2b5; border-radius: 8px; padding: 2px 6px; white-space: nowrap; }
.moved-chip { margin-left: 8px; border: 1px solid #f6d2b5; background: #fff1e6; color: #b5541b; font-size: 12.5px; font-weight: 800; border-radius: 14px; padding: 4px 10px; }
.moved-chip b { color: inherit !important; }
.moved-chip.on { background: #b5541b; border-color: #b5541b; color: #fff; }
.game-head .tm { white-space: nowrap; }

/* ───── 스포츠다방 갈색·크림 테마 ───── */
html, body { background: linear-gradient(180deg, #f7ddc7 0, #fbede0 260px, var(--bg) 520px) no-repeat, var(--bg); }
body.admin { background: var(--bg); }
.top { background: rgba(250, 233, 219, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(110, 67, 30, .12); }
.logo { color: var(--green-dark); }
.logo b { background: linear-gradient(180deg, #a15717, #6b3410); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card { box-shadow: 0 6px 18px rgba(110, 67, 30, .07); border-color: #f5eae0; }
.hero-banner { margin: 0 0 14px; border-radius: 20px; overflow: hidden; aspect-ratio: 2 / 1;
  box-shadow: 0 10px 24px rgba(110, 67, 30, .18); border: 2px solid #fff; }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; display: block; }

/* ───── 위쪽 작은 탭 (하단 한 칸에 메뉴가 여러 개일 때) ───── */
.brand { align-items: center; }
.subtabs { display: grid; gap: 4px; margin: 10px 0 0; background: rgba(255, 255, 255, .55); padding: 4px; border-radius: 13px; }
.subtabs[hidden] { display: none; }
.subtabs button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 0; border-radius: 10px;
  color: var(--sub); font-weight: 700; font-size: 14px; white-space: nowrap; }
.subtabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.subtabs button.on { background: var(--card); color: var(--green-dark); font-weight: 800; box-shadow: 0 1px 4px rgba(69, 45, 24, .12); }
.subtabs button.on svg { stroke: var(--green); }
.bottom button { font-size: 12px; }

/* 바탕화면 바로가기 버튼 */
.home-add { margin-left: auto; flex: none; font-size: 12.5px; font-weight: 800; color: var(--green-dark); background: #fff;
  border: 1px solid #f3e2d4; border-radius: 14px; padding: 6px 10px; box-shadow: 0 2px 6px rgba(110, 67, 30, .12); }
.home-add:active { transform: scale(.96); }

/* 칭호 */
.honor { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 900; line-height: 1;
  padding: 3px 7px; border-radius: 9px; margin-left: 4px; vertical-align: 2px; white-space: nowrap; }
.honor.mvp { background: linear-gradient(180deg, #fff4c9, #ffe08a); color: #8a5a00; border: 1px solid #f1cd62; }
.honor.tosin { background: linear-gradient(180deg, #efe6ff, #d9c6ff); color: #5b2fb3; border: 1px solid #c3a9f5; }
.card.honored { border: 1.5px solid #f1cd62; box-shadow: 0 6px 18px rgba(241, 180, 40, .18); }

/* 아이폰 바탕화면 추가 안내 */
.ios-lead { font-size: 14px; color: var(--sub); margin: 0 2px 10px; line-height: 1.5; }
.ios-steps small { color: var(--sub); }
.ios-share { display: inline-block; border: 1.5px solid var(--green); color: var(--green); border-radius: 6px; padding: 0 5px; font-size: 12px; line-height: 18px; }
.ios-link { display: flex; gap: 8px; margin: 12px 0 8px; }
.ios-link input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font-size: 13px; color: var(--sub); background: #fcf9f6; }
.ios-link .btn-primary { width: auto; flex: none; padding: 0 18px; }

/* ───── 글씨체(G마켓 산스) 맞춤 ───── */
input, textarea, select { font: inherit; letter-spacing: inherit; }
/* 버튼 글씨는 한 단계 얇게 (굵으면 글자가 뭉쳐 보임) */
.btn-primary, .btn-soft, .btn-yellow, .btn-dark, .btn-admin, .slip-open, .copy, .an-open, .home-add { font-weight: 500; }
/* 한글은 단어 단위로만 줄바꿈 (글자 중간에서 "포인/트" 처럼 끊기지 않게) */
html, body { word-break: keep-all; overflow-wrap: break-word; }
/* 한 줄로 꼭 보여야 하는 것들 */
.two-btn button, .two-btn a, .logo, .page-name, .score-box span, .tile span, .subtabs button, .bottom button,
.opt span, .opt b, .chip, .seg button, .honor, .chip-badge, .gh-right, .round { white-space: nowrap; }
.two-btn button { font-size: 14px; letter-spacing: -0.5px; padding-left: 4px; padding-right: 4px; }
.page-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand { min-width: 0; }
.score-box span { letter-spacing: -0.5px; overflow: hidden; text-overflow: ellipsis; }
.pro .sc, .row .sc { flex: none; }
.search input { min-width: 0; text-overflow: ellipsis; }
/* 시상대: 닉네임이 길어도 칸 크기 고정 (1등 가운데가 항상 제일 크게) */
.podium { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
.pod { min-width: 0; }

/* ───── 불러오는 중 (점 3개 통통) ───── */
.loading { display: flex; justify-content: center; gap: 7px; padding: 46px 0; }
.loading i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); opacity: .3; animation: dot 1s ease-in-out infinite; }
.loading i:nth-child(2) { animation-delay: .15s; }
.loading i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 40% { opacity: 1; transform: translateY(-6px); } }

/* ───── 빈 화면 안내 (로고 + 문구) ───── */
.empty { line-height: 1.6; font-size: 14px; padding: 34px 12px 38px; }
.empty::before { content: ""; display: block; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px;
  background: url("/static/icon-180.png") center / cover; box-shadow: 0 6px 14px rgba(110, 67, 30, .18); opacity: .92; }
.card .empty, .list .empty { padding: 22px 8px 24px; }

/* 아이폰 홈바 기종에서 베팅 슬립이 아래 메뉴를 가리지 않게 */
.slipbar { bottom: calc(74px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(140px + env(safe-area-inset-bottom)); }

/* 첫 화면 배너를 조금 납작하게 (내 점수가 바로 보이게) */
.hero-banner { aspect-ratio: 2.5 / 1; margin-bottom: 12px; }
.hero-banner img { object-position: 50% 50%; } 

/* 시상대 메달 크게 */
.pod-av .medal { font-size: 26px; right: -10px; bottom: -8px; filter: drop-shadow(0 2px 3px rgba(69, 45, 24, .25)); }
.pod.p1 .pod-av .medal { font-size: 30px; }

/* 내정보 버튼 그림 아이콘 (도넛·카페 건물) — 이모지는 폰마다 모양이 달라서 그림으로 고정 */
.ic { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; flex: none; }
.sheet-head .ic { width: 20px; height: 20px; }
/* 두 버튼 칸이 글자 때문에 넓어지지 않게 고정 → 넘치면 fitTwoBtn() 이 글씨를 줄인다 */
.two-btn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-btn button { min-width: 0; overflow: hidden; }

/* 🔔 경기 알림 */
.game-title.has-bell { position: relative; padding: 0 38px; }
.bell { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--btn); border: 1px solid var(--btn-line); }
.bell svg { width: 18px; height: 18px; fill: none; stroke: var(--sub); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bell.on { background: var(--yellow-soft); border-color: var(--yellow); }
.bell.on svg { fill: var(--gold); stroke: var(--green); }
.bell small { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 16px; }
.al-game { background: var(--bg); border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; }
.al-game .meta { font-size: 12.5px; color: var(--sub); }
.al-game .teams { font-weight: 800; font-size: 16px; margin-top: 2px; word-break: keep-all; }
.al-game .vs { color: var(--faint); font-weight: 500; font-size: 13px; margin: 0 4px; }
.al-tip { font-size: 13px; color: var(--sub); margin: 0 0 8px; }
.al-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.al-chip { padding: 10px 14px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; color: var(--text); white-space: nowrap; }
.al-chip.on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.al-note { font-size: 12.5px; color: var(--sub); margin: 14px 0 12px; line-height: 1.5; }
.al-btns { display: flex; gap: 8px; }
.al-btns .btn-soft { flex: 0 0 96px; }
.al-btns .btn-soft[hidden] { display: none; }
.al-btns .btn-primary { flex: 1; }
