/* TEBA 테바: 배치는 기획서 구도, 모양은 야간 경기 중계 화면처럼 */
:root {
  --bg: #0d141d;
  --panel: #152030;
  --panel2: #1b2a3d;
  --panel3: #233550;
  --line: #2a3d55;
  --text: #eef3f8;
  --muted: #9db0c4;
  --dim: #6b8097;
  --accent: #f4a93c;
  --accent-ink: #1d1204;
  --good: #4fc98f;
  --bad: #ef6b6b;
  --gold: #f2c94c;
  --pit: #f28c52;
  --bat: #ec6680;
  --hl: #ffd84d;
  --r: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--text); background: var(--bg); }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #17263a 0%, var(--bg) 70%) fixed, var(--bg);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 1040px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.gold { color: var(--gold); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.narrow { max-width: 560px; margin: 0 auto; }

.screen { display: none; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.screen.on { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }

/* ---------- 버튼과 상자 ---------- */
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
.btn {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
  font-weight: 700; color: var(--text); text-align: center; transition: transform 0.06s, background 0.12s, border-color 0.12s;
}
.btn:hover { border-color: #3a5575; }
.btn:active { transform: translateY(1px); background: var(--panel3); }
.btn.black { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.black:active { background: #e39a2f; }
.btn.wide { width: 100%; }
.btn.big { padding: 14px; font-size: 17px; }
.btn[disabled] { opacity: 0.35; cursor: default; transform: none; }
.btn .sub { display: block; font-size: 12px; font-weight: 600; opacity: 0.8; margin-top: 2px; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.iconbtn svg { width: 20px; height: 20px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.box + .box { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); margin: 2px 4px 2px 0; white-space: nowrap; }
.chip.good { color: var(--good); }
.chip.bad { color: var(--bad); }
.chip.gold { color: var(--gold); }

/* ---------- 처음 화면 ---------- */
.cover { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 30px 0 14px; }
.cover .logo { font-size: 50px; font-weight: 900; line-height: 1.02; letter-spacing: 0.05em; }
.cover .logo small { display: block; font-size: 24px; font-weight: 700; color: var(--muted); letter-spacing: 0.18em; }
.cover svg { width: 104px; height: 104px; }
.cover svg * { stroke: var(--accent); }
.cover-sub { text-align: center; color: var(--muted); margin: 0 0 20px; }
.modes-title { font-size: 15px; font-weight: 800; color: var(--muted); margin: 6px 0 10px; }
.modes { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mode { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.mode .mi { width: 44px; height: 44px; border-radius: 12px; background: var(--panel3); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.mode .mi svg { width: 26px; height: 26px; }
.mode h3 { font-size: 19px; margin-bottom: 6px; }
.mode p { margin: 0 0 12px; font-size: 14px; color: #c6d3e0; flex: 1; }
.mode p .muted { color: var(--muted); }
.mode .save { font-size: 13px; color: var(--gold); margin-bottom: 8px; }
.mode .btns { display: flex; gap: 8px; }
.mode .btns .btn { flex: 1; }
.notes { margin-top: 16px; font-size: 13px; color: var(--dim); }
.notes p { margin: 4px 0; }
@media (min-width: 760px) { .modes { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- 만들기 ---------- */
.field-row { margin-top: 14px; }
.field-row label.lb { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.input { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 10px 12px; font: inherit; font-size: 16px; outline: none; }
.input:focus { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { padding: 7px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted); }
.pick.on { background: var(--panel3); border-color: var(--accent); color: var(--text); }
.pick[disabled] { opacity: 0.35; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 20px; font-weight: 800; color: var(--text); }
.stepper button[disabled] { opacity: 0.3; cursor: default; }
.stepper .val { min-width: 32px; text-align: center; font-weight: 800; font-size: 18px; }
.statline { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.statline:last-child { border-bottom: 0; }
.statline .nm { font-weight: 800; }
.statline .desc { font-size: 12px; color: var(--dim); grid-column: 1 / -1; margin-top: -4px; }
.bar { height: 7px; background: var(--panel3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #4f8fdc, #6fb3ff); border-radius: 99px; }
.points { font-weight: 800; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.emblem { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; flex: none; border: 2px solid rgba(255, 255, 255, 0.18); }
.emblem.sm { width: 22px; height: 22px; font-size: 11px; border-width: 1px; }
.emblem.lg { width: 64px; height: 64px; font-size: 24px; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.topbar h2 { flex: 1; }
.team-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.team-row + .team-row { margin-top: 8px; }
.team-row .tn { font-weight: 800; }
.team-row .ti { font-size: 12px; color: var(--muted); }
.team-row.on { border-color: var(--accent); background: var(--panel2); }

/* ---------- 기본 화면 (기획서 7장 구도) ---------- */
.hub { display: grid; gap: 10px; grid-template-columns: 1fr; }
.hub .h-prof { order: 1; }
.hub .h-log { order: 2; }
.hub .h-rec { order: 3; }
.hub .h-train { order: 4; }
.hub .h-menu { order: 5; }
.hub .h-next { order: 6; }
.h-prof .top { display: flex; gap: 12px; align-items: flex-start; }
.h-prof .face { width: 66px; height: 66px; flex: none; border-radius: 50%; }
.h-prof .pn { font-size: 19px; font-weight: 800; line-height: 1.3; }
.h-prof .pi { font-size: 14px; line-height: 1.5; color: #c6d3e0; }
.h-prof .menu-ic { margin-left: auto; }
.h-prof .season { margin-top: 12px; font-size: 15px; color: #c6d3e0; }
.h-prof .season b { font-weight: 800; color: var(--text); font-size: 17px; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 8px; }
.pairs .pr { display: grid; grid-template-columns: 44px 1fr 28px; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.pairs .pr b { color: var(--text); font-weight: 800; text-align: right; }
.pairs .bonus { color: var(--good); font-size: 11px; font-weight: 700; }
.pairs > span { font-size: 14px; color: var(--muted); }
.pairs > span b { color: var(--text); font-weight: 800; }
.pitch-list { margin-top: 8px; font-size: 13px; color: var(--muted); }
.pitch-list b { color: var(--gold); }
.h-log .dd { font-weight: 800; font-size: 16px; }
.h-log .st { color: var(--muted); font-size: 14px; }
.h-log ul { margin: 8px 0 0; padding: 0; list-style: none; }
.h-log li { padding: 3px 0; font-size: 15px; color: #d4dee8; }
.h-log .more { display: block; margin-left: auto; font-size: 13px; color: var(--muted); padding: 4px 0 0; }
.h-rec { width: 100%; padding: 12px; font-size: 16px; }
.h-train .tl { font-weight: 800; font-size: 15px; color: var(--muted); }
.select { width: 100%; max-width: 280px; margin-top: 8px; font: inherit; font-size: 16px; font-weight: 700; padding: 8px 34px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--panel2); color: var(--text); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9db0c4 50%), linear-gradient(135deg, #9db0c4 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.select:focus { outline: none; border-color: var(--accent); }
.h-train .eff { margin-top: 8px; font-size: 14px; color: #c6d3e0; }
.h-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.h-menu .btn { padding: 11px 6px; font-size: 15px; }
.h-menu .money { display: flex; flex-direction: column; justify-content: center; font-size: 13px; color: var(--muted); line-height: 1.35; padding-left: 4px; }
.h-menu .money b { font-size: 18px; color: var(--gold); }
.h-menu .stackbtn { display: grid; gap: 8px; }
.h-menu .full { grid-column: 1 / -1; }
.h-next { width: 100%; padding: 14px 10px; font-size: 19px; line-height: 1.35; border-radius: var(--r); }
.h-next .sub { font-size: 13px; }
.h-opts { order: 7; display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); align-items: center; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (min-width: 760px) {
  .hub { grid-template-columns: 240fr 240fr 92fr; grid-template-areas: 'prof log log' 'rec menu next' 'train menu next' 'opts opts opts'; }
  .hub .h-prof { grid-area: prof; }
  .hub .h-log { grid-area: log; }
  .hub .h-rec { grid-area: rec; align-self: start; }
  .hub .h-train { grid-area: train; }
  .hub .h-menu { grid-area: menu; }
  .hub .h-next { grid-area: next; height: 100%; }
  .hub .h-opts { grid-area: opts; }
}

/* ---------- 아래에서 올라오는 창 ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(3, 7, 12, 0.62); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; background: var(--panel);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  animation: up 0.18s ease-out;
}
@keyframes up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (min-width: 760px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 18px; border-bottom: 1px solid var(--line); } }
.sheet .sh-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet .sh-head h3 { flex: 1; font-size: 19px; }
.opt { display: block; width: 100%; text-align: left; padding: 11px 12px; }
.opt + .opt { margin-top: 8px; }
.opt .on-mark { color: var(--accent); font-weight: 900; }
.opt .od { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.reply { background: var(--panel2); border-radius: 12px; padding: 12px; margin-top: 12px; font-size: 15px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { flex: 1; padding: 8px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.tabs button.on { color: var(--text); border-color: var(--accent); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 700; font-size: 12px; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr.me td { color: var(--gold); font-weight: 800; }
.tbl-wrap { overflow-x: auto; }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 6px; }
.sg { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; font-size: 14px; }
.sg .k { color: var(--muted); }
.sg .v { font-weight: 800; text-align: right; }
.leader h4 { margin: 12px 0 4px; font-size: 14px; }
.leader ol { margin: 0; padding-left: 20px; font-size: 13px; }
.leader li.me { color: var(--gold); font-weight: 800; }
.mate { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mate .mn { font-weight: 700; }
.mate .mi { font-size: 12px; color: var(--muted); }
.mate .btn { padding: 6px 10px; font-size: 13px; }
.shop-item { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shop-item .btn { padding: 6px 9px; font-size: 13px; }
.award { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.award.me { color: var(--gold); font-weight: 800; }
.big-num { font-size: 30px; font-weight: 900; }

/* ---------- 경기 화면 (기획서 8장, 9장 구도) ---------- */
.game { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; grid-template-areas: 'field field' 'pict pict' 'top bottom' 'msg msg' 'acts acts'; }
.game.over { grid-template-areas: 'field field' 'pict pict' 'top top' 'bottom bottom' 'msg msg' 'acts acts'; }
#scr-game { padding-top: 10px; }
.g-field { grid-area: field; }
.g-pict { grid-area: pict; }
.g-top { grid-area: top; }
.g-bottom { grid-area: bottom; }
.g-msg { grid-area: msg; }
.g-acts { grid-area: acts; }
@media (min-width: 760px) {
  .game, .game.over { grid-template-columns: 300fr 300fr 310fr; grid-template-areas: 'field pict top' 'msg pict bottom' 'acts acts acts'; gap: 10px; }
}

/* 중계 화면 느낌의 운동장 */
.field { position: relative; width: 100%; aspect-ratio: 404 / 290; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: #244f33; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); }
.field svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tag {
  position: absolute; transform: translate(-50%, -50%); background: rgba(12, 18, 16, 0.78); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; white-space: nowrap; pointer-events: none;
  max-width: 30%; overflow: hidden; text-overflow: ellipsis;
}
.tag.bat, .tag.run { background: #fff; color: #111; border-radius: 999px; padding: 1px 8px 1px 5px; font-size: 12px; }
.tag.bat::before, .tag.run::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d64545; margin-right: 4px; vertical-align: -1px; }
.tag.me { box-shadow: 0 0 0 2px var(--hl); }
.tag.steal { background: var(--bat); color: #fff; border-radius: 5px; font-size: 10px; }
.tv { position: absolute; left: 2.5%; top: 4%; bottom: 4%; width: 23%; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.tv-teams { border-radius: 6px; overflow: hidden; flex: none; }
.tv-team { display: flex; align-items: center; gap: 5px; padding: 2px 6px; font-weight: 900; font-size: 15px; }
.tv-team .en { flex: 1; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-team.bat .en::after { content: ' ●'; color: var(--hl); font-size: 9px; }
.tv-box { flex: 1; min-height: 0; overflow: hidden; background: rgba(10, 13, 16, 0.84); border-radius: 6px; padding: 6px; color: #fff; display: flex; flex-direction: column; gap: 5px; font-size: 11px; }
.tv-pit b { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.tv-inn { display: flex; align-items: center; gap: 6px; }
.tv-inn .arrows { display: flex; flex-direction: column; align-items: center; line-height: 1; font-size: 9px; color: #5b6570; }
.tv-inn .arrows .on { color: #ef4444; }
.tv-inn .n { font-size: 18px; font-weight: 900; }
.tv-inn .dia { width: 34px; height: 26px; margin-left: auto; }
.tv-bso { display: grid; grid-template-columns: 10px 1fr; gap: 3px 5px; align-items: center; font-weight: 900; }
.tv-bso .dots { display: flex; gap: 4px; }
.tv-bso i { width: 8px; height: 8px; border-radius: 50%; background: #4b5561; display: block; }
.tv-bso .b i.on { background: #3ccf6e; }
.tv-bso .s i.on { background: #f2c230; }
.tv-bso .o i.on { background: #ef4444; }
.tv-pit { margin-top: auto; border-top: 1px solid #333c46; padding-top: 5px; line-height: 1.35; }
.tv-pit b { font-size: 12px; }
.tv-next { position: absolute; right: 2.5%; bottom: 4%; text-align: right; color: #fff; font-size: 10px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); pointer-events: none; }
.tv-next b { font-size: 11px; }
.tv-menu { position: absolute; right: 2%; top: 3%; display: flex; gap: 4px; }
.tv-menu button { width: 30px; height: 30px; background: rgba(10, 13, 16, 0.7); color: #fff; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.tv-menu svg { width: 17px; height: 17px; }
.ball { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3); pointer-events: none; opacity: 0; }

/* 투수와 타자 그림 (기획서 8장: 투수는 왼쪽 위 작게, 타자는 오른쪽 아래 크게. 9장: 포수와 타자 위, 투수 아래 크게) */
.g-pict { position: relative; min-height: 104px; border-radius: var(--r); overflow: hidden;
  background: radial-gradient(60% 70% at 70% 100%, rgba(120, 170, 230, 0.16), transparent 70%), radial-gradient(40% 50% at 20% 20%, rgba(242, 140, 82, 0.1), transparent 70%), var(--panel);
  border: 1px solid var(--line); }
.g-pict::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: 6px; height: 2px; background: rgba(157, 176, 196, 0.25); border-radius: 2px; }
.g-pict svg { position: absolute; }
.g-pict .fig-opp { left: 3%; top: 4%; width: 36%; height: 44%; }
.g-pict .fig-me { right: 4%; bottom: 8px; width: 84%; height: 76%; }
.g-pict.pit .fig-me { left: 36%; right: auto; bottom: 8px; width: 24%; height: 92%; }
.g-pict.pit .fig-opp { left: auto; right: 2%; top: 6%; width: 38%; height: 90%; }
.bubble { position: absolute; background: #fff; color: #111; padding: 5px 11px; font-weight: 800; font-size: 14px; border-radius: 12px; left: 3%; top: 8%; white-space: nowrap; z-index: 1; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.bubble::after { content: ''; position: absolute; right: 16px; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
@media (min-width: 760px) {
  .g-pict { min-height: 0; }
  .g-pict.pit .fig-opp { left: 22%; right: auto; top: 4%; width: 60%; height: 44%; }
  .g-pict.pit .fig-me { left: 16%; right: auto; bottom: 8px; width: 80%; height: 50%; }
}

/* 투수 칸 (따뜻한 주황), 타자 칸 (장밋빛) */
.card-p, .card-b { border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; height: 100%; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.card-p { background: linear-gradient(160deg, rgba(242, 140, 82, 0.24), rgba(242, 140, 82, 0.06) 70%), var(--panel); }
.card-b { background: linear-gradient(160deg, rgba(236, 102, 128, 0.24), rgba(236, 102, 128, 0.06) 70%), var(--panel); }
.card-p .hd, .card-b .hd { font-size: 12px; line-height: 1.35; color: var(--muted); }
.card-p .hd .role { color: var(--pit); font-weight: 800; }
.card-b .hd .role { color: var(--bat); font-weight: 800; }
.card-p .nm, .card-b .nm { display: block; font-weight: 800; font-size: 15px; color: var(--text); }
.card-p .st, .card-b .st { font-size: 13px; line-height: 1.5; margin-top: 3px; color: #c6d3e0; }
.card-p .st b, .card-b .st b { font-weight: 800; color: var(--text); }
.card-p .in { display: block; }
.card-p .pl { font-size: 12px; line-height: 1.4; display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; color: #c6d3e0; }
.card-p .pl b { font-weight: 800; color: var(--gold); }
.card-p .ft, .card-b .ft { font-size: 11px; color: var(--muted); margin-top: 3px; }
.card-p.me, .card-b.me { border-color: var(--hl); box-shadow: 0 0 0 1px var(--hl), 0 8px 22px rgba(0, 0, 0, 0.22); }
.weak { color: var(--bad); font-weight: 800; }
@media (min-width: 760px) {
  .card-p, .card-b { padding: 11px 14px; }
  .card-p .hd, .card-b .hd { font-size: 13px; }
  .card-p .nm, .card-b .nm { font-size: 18px; }
  .card-p .st, .card-b .st { font-size: 15px; }
  .card-p .in { display: flex; gap: 12px; align-items: flex-start; }
  .card-p .pl { display: grid; font-size: 13px; margin-left: auto; margin-top: 18px; }
  .card-p .ft, .card-b .ft { font-size: 12px; }
}

/* 상황 글 상자 */
.g-msg { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-height: 96px; position: relative; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.g-msg.tap { cursor: pointer; }
.g-msg .lines div { font-size: 14px; color: #93a6ba; }
.g-msg .lines div.new { color: #d9e3ec; }
.g-msg .lines div.big { color: var(--text); font-weight: 800; font-size: 15px; }
.g-msg .lines div.dig { font-size: 13px; color: var(--muted); }
.g-msg .sit { font-size: 16px; font-weight: 800; margin-top: 5px; color: var(--text); }
.g-msg .tri { display: inline-block; margin-left: 6px; font-size: 13px; color: var(--accent); animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* 선택 버튼 */
.g-acts .hint { background: #2a2414; color: #f5deb0; border: 1px solid #4d4020; border-radius: 12px; padding: 8px 12px; font-size: 14px; margin-bottom: 8px; }
.acts { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.acts .btn { padding: 10px 8px; font-size: 16px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: var(--r); }
.acts .btn svg { width: 22px; height: 22px; color: var(--accent); }
.acts .btn.black svg { color: var(--accent-ink); }
.acts .btn .gr { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 5px; border-radius: 6px; background: var(--panel3); color: var(--gold); font-size: 13px; font-weight: 900; }
.acts .btn .sgn { display: block; font-size: 11px; font-weight: 800; color: #111; background: #fff; border-radius: 999px; padding: 0 7px; }
.acts .btn.full { grid-column: 1 / -1; }
.acts.one { grid-template-columns: 1fr !important; }
.subrow { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.subrow .btn { flex: 1; padding: 8px 6px; font-size: 13px; }
@media (min-width: 760px) {
  .acts { grid-template-columns: repeat(var(--n, 3), 1fr); gap: 10px; }
  .acts .btn { min-height: 92px; font-size: 18px; }
  .acts .btn svg { width: 26px; height: 26px; }
}

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #f4f7fa; color: #10161d; padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 14px;
  z-index: 80; opacity: 0; pointer-events: none; transition: opacity 0.2s; max-width: 90%; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
#toast.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .g-msg .tri { animation: none; } }
