:root {
  --bg1: #eef6ee; --bg2: #d6ead8; --panel: #ffffff; --panel2: #f1f6f1; --line: rgba(20, 60, 30, 0.14);
  --text: #13281a; --dim: #5f7465; --accent: #15803d; --accent2: #166534; --gold: #c58a06; --bad: #dc2626; --good: #16a34a;
  --board: #14361f; --boardLine: #0b2414; --boardText: #f0fdf4; --boardDim: #9fc4ab; --led: #fde047;
  --grass: #4d9d4f; --dirt: #c99a63; --r: 14px; --team: #2563eb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg1: #0d1a12; --bg2: #08110b; --panel: #15261b; --panel2: #1c3123; --line: rgba(180, 230, 190, 0.14);
    --text: #e3f1e6; --dim: #93ab99; --accent: #22c55e; --accent2: #86efac; --gold: #facc15;
    --board: #07150c; --boardLine: #000; --grass: #2f6b33; --dirt: #8a6a45;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: linear-gradient(180deg, var(--bg1), var(--bg2)); color: var(--text);
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  display: flex; flex-direction: column; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
[hidden] { display: none !important; }
.dim { color: var(--dim); } .small { font-size: 0.8rem; } .good { color: var(--good); } .bad { color: var(--bad); } .gold { color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }

/* ── 상단 ── */
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); flex: none; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent2);
  text-decoration: none; font-size: 0.85rem; font-weight: 700;
}
.club { flex: 1; min-width: 0; font-weight: 800; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.club small { color: var(--dim); font-weight: 600; margin-left: 4px; }
.tools { display: flex; gap: 6px; flex: none; }
.mini { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-weight: 800; }

/* ── 공통 ── */
.screen { flex: 1; overflow-y: auto; padding: 4px 14px 24px; -webkit-overflow-scrolling: touch; }
.screen > * { max-width: 720px; margin-left: auto; margin-right: auto; }
#office { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 1.02rem; display: flex; align-items: center; gap: 6px; }
.card h3 small { margin-left: auto; color: var(--dim); font-weight: 600; font-size: 0.78rem; }
.btn { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-weight: 800; }
.btn.go { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.warn { background: color-mix(in srgb, var(--bad) 12%, var(--panel)); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.small { padding: 6px 10px; font-size: 0.82rem; }
.btn.wide { width: 100%; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns > .btn { flex: 1; min-width: 0; }
.sub { display: flex; gap: 6px; margin: 2px 0 12px; overflow-x: auto; }
.sub button { flex: 1; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.sub button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip { display: inline-block; font-style: normal; font-size: 0.7rem; padding: 1px 7px; border-radius: 999px; background: var(--panel2); color: var(--dim); border: 1px solid var(--line); white-space: nowrap; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.inj { background: color-mix(in srgb, var(--bad) 15%, var(--panel)); color: var(--bad); }
.chip.gd { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.tag { font-weight: 800; }
.hint { font-size: 0.8rem; color: var(--dim); margin: 6px 2px 0; line-height: 1.5; }
.empty { text-align: center; color: var(--dim); padding: 18px 8px; font-size: 0.88rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.88rem; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; font-weight: 700; }
.meter { height: 8px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.meter b { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.warn b { background: var(--bad); }
.tname { font-weight: 800; white-space: nowrap; }
.tdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }

/* ── 하단 탭 ── */
.bnav { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bnav button { border: 0; background: none; padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 0.72rem; font-weight: 700; color: var(--dim); position: relative; }
.bnav button i { font-style: normal; font-size: 1.25rem; line-height: 1.1; }
.bnav button.on { color: var(--accent); }
.bnav .dot { position: absolute; top: 5px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--bad); }

/* ── 새 커리어 ── */
.logo { text-align: center; margin: 4px auto 14px; }
.logo h1 { margin: 6px 0 2px; font-size: 1.6rem; letter-spacing: -0.02em; }
.logo h1 span { color: var(--accent); }
.logo p { margin: 0; color: var(--dim); font-size: 0.9rem; line-height: 1.5; }
.logo-art { width: 170px; height: 64px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 70px; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; font-size: 0.86rem; }
.seg button small { display: block; font-weight: 500; color: var(--dim); font-size: 0.7rem; margin-top: 1px; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.seg button.on small { color: rgba(255, 255, 255, 0.85); }
.seg.tight button { min-width: 48px; padding: 7px 2px; }
.teamcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; margin-bottom: 8px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); border-left: 5px solid var(--tc); }
.teamcard .te { font-size: 2rem; width: 44px; text-align: center; flex: none; }
.teamcard .tt { flex: 1; min-width: 0; }
.teamcard .tt b { display: block; font-size: 1rem; }
.teamcard .tt small { color: var(--dim); font-size: 0.76rem; display: block; line-height: 1.45; }
.teamcard .ts { text-align: right; flex: none; }
.teamcard .ts b { display: block; font-size: 1.1rem; }
.stars { color: var(--gold); letter-spacing: 1px; }

/* ── 홈 ── */
.next { border-left: 5px solid var(--team); }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; margin: 4px 0 12px; }
.vs .side b { display: block; font-size: 1rem; } .vs .side .e { font-size: 2rem; }
.vs .side small { color: var(--dim); font-size: 0.75rem; display: block; }
.vs .mid { font-weight: 900; color: var(--dim); }
.sp-line { font-size: 0.78rem; color: var(--dim); margin-top: 3px; }
.news { list-style: none; padding: 0; margin: 0; font-size: 0.86rem; }
.news li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; }
.news li:last-child { border-bottom: 0; }
.news li small { color: var(--dim); flex: none; font-size: 0.72rem; width: 46px; }
.offer { border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); background: color-mix(in srgb, var(--gold) 8%, var(--panel)); border-radius: 12px; padding: 10px; margin-bottom: 8px; font-size: 0.86rem; }
.offer .btns { margin-top: 8px; }
.warnbox { border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); border-radius: 12px; padding: 10px 12px; font-size: 0.86rem; margin-bottom: 10px; }
.warnbox li { margin-left: 2px; }
.bracket { display: grid; gap: 8px; }
.series { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--panel2); font-size: 0.88rem; }
.series .sr { display: flex; justify-content: space-between; align-items: center; }
.series .sr.win b { color: var(--accent); }
.series small { color: var(--dim); }
.step-dots { display: flex; gap: 6px; justify-content: center; margin: 2px 0 12px; }
.step-dots i { font-style: normal; font-size: 0.72rem; padding: 3px 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); }
.step-dots i.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-dots i.done { color: var(--accent); }

/* ── 표 ── */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 5px; text-align: right; white-space: nowrap; }
.tbl th { color: var(--dim); font-weight: 700; font-size: 0.72rem; border-bottom: 1px solid var(--line); }
.tbl td { border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.tbl th:first-child, .tbl td:first-child, .tbl .l { text-align: left; }
.tbl tr.me td { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 800; }
.tbl tr.cut td { border-bottom: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); }
.tbl tr[data-p], .tbl tr[data-team] { cursor: pointer; }

/* ── 선수 줄 ── */
.prow { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 6px; }
.prow.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent) inset; }
.prow.target { border-style: dashed; border-color: var(--accent); }
.prow .no { width: 20px; text-align: center; font-weight: 900; color: var(--dim); flex: none; }
.prow .pos { flex: none; min-width: 38px; text-align: center; padding: 3px 6px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); font-weight: 800; font-size: 0.78rem; }
.prow .pos.bad { color: var(--bad); }
.prow .nm { flex: 1; min-width: 0; }
.prow .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .nm small { color: var(--dim); font-size: 0.72rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .ov { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; background: var(--panel2); font-size: 0.95rem; }
.ov.o80 { background: #fde68a; color: #78350f; } .ov.o70 { background: #bbf7d0; color: #14532d; } .ov.o60 { background: #dbeafe; color: #1e3a8a; } .ov.o50 { background: var(--panel2); } .ov.o0 { background: var(--panel2); color: var(--dim); }
.prow .arr { display: flex; flex-direction: column; gap: 2px; flex: none; }
.prow .arr button { border: 1px solid var(--line); background: var(--panel2); border-radius: 6px; font-size: 0.6rem; padding: 1px 6px; line-height: 1.3; }
.prow .chk { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.prow .side { flex: none; text-align: right; font-size: 0.74rem; color: var(--dim); }
.prow .fat { width: 40px; }
.sect { font-size: 0.8rem; font-weight: 800; color: var(--dim); margin: 14px 2px 6px; display: flex; align-items: center; gap: 6px; }
.sect .btn { margin-left: auto; }
.pickbar { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border: 1px solid var(--accent); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; font-size: 0.84rem; display: flex; align-items: center; gap: 8px; }
.pickbar .btn { margin-left: auto; }

/* ── 능력치 ── */
.rt { display: grid; grid-template-columns: 44px 1fr 30px; align-items: center; gap: 8px; font-size: 0.84rem; margin: 4px 0; }
.rt .bar { height: 10px; border-radius: 99px; background: var(--panel2); overflow: hidden; border: 1px solid var(--line); }
.rt .bar b { display: block; height: 100%; border-radius: 99px; }
.rt span:last-child { text-align: right; font-weight: 800; }
.phead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phead .ov { width: 52px; height: 52px; font-size: 1.35rem; border-radius: 14px; display: grid; place-items: center; font-weight: 900; }
.phead b { font-size: 1.15rem; }
.phead small { display: block; color: var(--dim); font-size: 0.8rem; }

/* ── 경기 화면 ── */
#game { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 10px; max-width: 720px; width: 100%; margin: 0 auto; position: relative; }
.g-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; flex: none; }
.g-title { flex: 1; min-width: 0; }
.g-title b { display: block; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-title small { color: var(--dim); font-size: 0.74rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speeds { display: flex; gap: 4px; flex: none; }
.speeds button { width: 36px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 0.85rem; }
.speeds button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.board { background: var(--board); color: var(--boardText); border-radius: 12px; padding: 6px 8px; border: 2px solid var(--boardLine); overflow-x: auto; flex: none; }
.board table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.board th, .board td { padding: 2px 3px; text-align: center; min-width: 17px; }
.board th { color: var(--boardDim); font-weight: 600; font-size: 0.7rem; }
.board td:first-child, .board th:first-child { text-align: left; white-space: nowrap; min-width: 66px; }
.board td.cur { color: var(--led); }
.board td.rhe { font-weight: 900; color: var(--led); border-left: 1px solid rgba(255, 255, 255, 0.15); }
.board tr.bat td:first-child::after { content: ' ◀'; color: var(--led); font-size: 0.65rem; }
.field-row { display: flex; gap: 10px; align-items: center; margin: 8px 0 6px; flex: none; }
.diamond { width: 96px; height: 96px; flex: none; }
.diamond .grass { fill: var(--grass); } .diamond .dirt { fill: var(--dirt); }
.diamond .base { fill: #f8fafc; stroke: rgba(0, 0, 0, 0.25); stroke-width: 1; transition: fill 0.2s; }
.diamond .base.on { fill: var(--led); stroke: #b45309; stroke-width: 2; }
.diamond .home { fill: #f8fafc; }
.sit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sit .inn { font-weight: 900; font-size: 1.05rem; }
.sit .outs { display: flex; gap: 6px; align-items: center; font-size: 0.75rem; color: var(--dim); }
.sit .outs::before { content: 'OUT'; font-weight: 800; }
.sit .outs i { width: 13px; height: 13px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); }
.sit .outs i.on { background: var(--bad); border-color: var(--bad); }
.wp-bar { height: 9px; border-radius: 99px; background: color-mix(in srgb, var(--bad) 35%, var(--panel2)); overflow: hidden; }
.wp-bar b { display: block; height: 100%; background: var(--accent); transition: width 0.4s; }
.wp small { color: var(--dim); font-size: 0.72rem; }
.matchup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: none; }
.mu { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; font-size: 0.78rem; min-width: 0; }
.mu b { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu small { color: var(--dim); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu .meter { margin-top: 4px; height: 6px; }
.log { flex: 1; min-height: 80px; overflow-y: auto; margin: 8px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; font-size: 0.84rem; }
.log p { margin: 0; padding: 5px 0; border-bottom: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); }
.log p.hr { color: #c2410c; font-weight: 900; }
.log p.run { color: var(--accent2); font-weight: 800; }
.log p.hit { font-weight: 700; }
.log p.walk { color: #2563eb; }
.log p.out { color: var(--dim); }
.log p.sub { color: #7c3aed; font-size: 0.8rem; }
.log p.dec { color: var(--gold); font-weight: 800; }
.log p.half { text-align: center; font-size: 0.72rem; color: var(--dim); background: var(--panel2); border-radius: 6px; border: 0; margin: 4px 0; padding: 3px; }
.log p.end { text-align: center; font-weight: 900; color: var(--bad); }
.log p.new { animation: flash 0.6s; }
@keyframes flash { from { background: color-mix(in srgb, var(--led) 45%, transparent); } to { background: transparent; } }
.g-foot { display: flex; gap: 8px; flex: none; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.g-foot .btn { flex: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--panel); border-radius: 18px 18px 0 0; border: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25); padding: 14px 14px max(14px, env(safe-area-inset-bottom)); max-height: 78%; overflow-y: auto; animation: up 0.25s ease-out; }
@keyframes up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 2px; font-size: 1.05rem; }
.sheet .sit2 { font-size: 0.82rem; color: var(--dim); margin-bottom: 10px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); margin-bottom: 7px; }
.opt .oi { font-size: 1.4rem; width: 30px; text-align: center; flex: none; }
.opt .ot { flex: 1; min-width: 0; }
.opt .ot b { display: block; } .opt .ot small { color: var(--dim); font-size: 0.75rem; }
.opt .op { flex: none; font-weight: 900; color: var(--accent); }
.opt:hover { border-color: var(--accent); }
.result { text-align: center; }
.result .score { font-size: 2.2rem; font-weight: 900; margin: 4px 0; font-variant-numeric: tabular-nums; }
.result .wl { font-size: 1.3rem; font-weight: 900; }
.result .wl.w { color: var(--accent); } .result .wl.l { color: var(--bad); }
.result ul { text-align: left; font-size: 0.86rem; padding-left: 18px; margin: 8px 0; }

/* ── 모달·알림 ── */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.modal .box { background: var(--panel); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); animation: up 0.22s ease-out; }
@media (min-width: 700px) { .modal { align-items: center; } .modal .box { border-radius: 18px; } }
.modal .box h2 { margin: 0 0 10px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.modal .box h2 .x { margin-left: auto; border: 0; background: var(--panel2); width: 32px; height: 32px; border-radius: 50%; }
.help h4 { margin: 14px 0 4px; }
.help p, .help li { font-size: 0.88rem; line-height: 1.6; }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; background: #102a18; color: #f0fdf4; padding: 10px 16px; border-radius: 12px; font-size: 0.88rem; font-weight: 700; max-width: 90vw; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.err { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.7); color: #fff; display: grid; place-items: center; padding: 20px; text-align: center; }
.err .box { background: #1f2937; border-radius: 16px; padding: 20px; max-width: 420px; }
.noscript { text-align: center; padding: 30px; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--panel2); font-size: 0.8rem; opacity: 0.5; }
.ach.got { opacity: 1; border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: color-mix(in srgb, var(--gold) 9%, var(--panel)); }
.ach b { display: block; font-size: 0.86rem; }
.ach small { color: var(--dim); }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trade-cols .prow { padding: 6px 7px; gap: 6px; }
.trade-cols .prow .ov { width: 30px; height: 30px; font-size: 0.82rem; }
.trade-cols .prow .nm small { font-size: 0.68rem; }
.verdict { margin: 10px 0; padding: 10px; border-radius: 12px; background: var(--panel2); font-size: 0.86rem; }
@media (max-width: 420px) {
  .back-txt { display: none; }
  .trade-cols { grid-template-columns: 1fr; }
  .diamond { width: 84px; height: 84px; }
}

/* ── 선수 키우기 ── */
.namebox { display: flex; gap: 8px; }
.namebox input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-weight: 800; font-size: 1rem; }
.teamcard.on { box-shadow: 0 0 0 2px var(--accent) inset; }
.btn.big { padding: 14px; font-size: 1.05rem; margin-bottom: 14px; }
.ov.inl { display: inline-grid; width: auto; height: auto; padding: 1px 7px; border-radius: 7px; place-items: center; font-weight: 900; }
.big { font-size: 1.2rem; }
.chip.farm { color: #15803d; border-color: color-mix(in srgb, #16a34a 45%, transparent); background: color-mix(in srgb, #16a34a 10%, var(--panel)); }
.prow.mine { border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: color-mix(in srgb, var(--gold) 9%, var(--panel)); }
.news li.mine span { font-weight: 800; }
.news li b { margin-left: auto; flex: none; font-size: 0.78rem; }
.role { font-weight: 800; text-align: center; margin: -2px 0 10px; padding: 7px; border-radius: 10px; background: var(--panel2); font-size: 0.9rem; }
.trow { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; padding: 4px 0 6px; border-bottom: 1px dashed var(--line); }
.trow .rt { margin: 0; }
.trow small { grid-column: 1; font-size: 0.72rem; padding-left: 52px; }
.trow .btn { grid-row: 1 / span 2; grid-column: 2; min-width: 66px; }
.trow .btn small { padding: 0; font-size: 0.7rem; opacity: 0.85; }
.series.wait { opacity: 0.7; border-style: dashed; }
.card.slim { padding: 8px 14px; } .card.slim h3 { margin: 0; font-size: 0.9rem; }
.legend .score small { font-size: 1rem; margin-left: 2px; }
.mebar { flex: none; font-size: 0.82rem; padding: 5px 10px; margin-bottom: 6px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 9%, var(--panel)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu.mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.log p.me { background: color-mix(in srgb, var(--gold) 12%, transparent); border-radius: 6px; padding-left: 6px; }
.diamond .base.me { fill: #f97316; stroke: #9a3412; }
.opt .pv { display: block; margin-top: 2px; color: var(--accent2); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.opt.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.opt .op small { font-size: 0.7rem; font-weight: 600; }
.logo-art.wide { width: 220px; }
.seg.wrap2 button { flex: 1 1 40%; }
.news li small { width: 58px; }
.next .btns .btn { white-space: nowrap; padding: 10px 8px; }

/* ── 직접 치기·던지기 ── */
.duel { position: absolute; left: 0; right: 0; top: 46px; bottom: 0; z-index: 6; display: flex; flex-direction: column; background: var(--panel); border-radius: 16px 16px 0 0; border: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3); overflow: hidden; animation: up 0.2s ease-out; }
.d-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; flex: none; }
.d-count { display: grid; grid-template-columns: auto auto auto auto; gap: 3px 4px; align-items: center; font-size: 0.7rem; font-weight: 900; color: var(--dim); flex: none; }
.d-count span { grid-column: 1; }
.d-count i { width: 11px; height: 11px; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); }
.d-count i.b { background: #22c55e; border-color: #16a34a; } .d-count i.s { background: #facc15; border-color: #ca8a04; } .d-count i.o { background: #ef4444; border-color: #b91c1c; }
.d-info { flex: 1; min-width: 0; font-size: 0.8rem; line-height: 1.4; }
.d-stage { position: relative; flex: 1; min-height: 220px; touch-action: none; user-select: none; -webkit-user-select: none; }
.d-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.d-msg { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%) scale(0.9); padding: 6px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.55); color: #fff; font-weight: 900; font-size: 1.05rem; white-space: nowrap; opacity: 0; transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.d-msg.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.d-msg.good { color: #86efac; } .d-msg.bad { color: #fca5a5; }
.d-tip { position: absolute; left: 8px; right: 8px; bottom: 6px; text-align: center; font-size: 0.74rem; color: rgba(255, 255, 255, 0.78); pointer-events: none; }
.d-ctrl { flex: none; padding: 8px 10px max(10px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.d-ctrl .types button { font-size: 0.85rem; }
