/* ───────── 체스 매니저 — 모바일 우선 스타일 ───────── */
:root {
  --pink: #ff7aa2; --pink-d: #e8557f; --pink-l: #ffe3ec;
  --mint: #4fc3a1; --mint-l: #dcf7ee;
  --sky: #6aa9ff; --sky-l: #e3efff;
  --gold: #f5b82e; --gold-l: #fff3d1;
  --red: #ef5b5b; --green: #36b37e;
  --ink: #2d3047; --ink-2: #5b5e78; --ink-3: #9a9cb3;
  --bg: #fff6f9; --card: #ffffff; --line: #f0e3ea;
  --shadow: 0 4px 16px rgba(80, 40, 70, .08);
  --r: 16px;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --head: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
h1, h2, h3, .head { font-family: var(--head); font-weight: 400; margin: 0; letter-spacing: .2px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }

/* ───── 버튼 ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--pink); color: #fff; box-shadow: 0 4px 0 var(--pink-d); }
.btn.primary:active { box-shadow: 0 1px 0 var(--pink-d); transform: translateY(3px); }
.btn.mint { background: var(--mint); color: #fff; box-shadow: 0 4px 0 #36a185; }
.btn.sky { background: var(--sky); color: #fff; box-shadow: 0 4px 0 #4c8be0; }
.btn.gold { background: var(--gold); color: #fff; box-shadow: 0 4px 0 #d39a17; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }

/* ───── 카드 ───── */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.card + .card { margin-top: 12px; }
.card-title { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 18px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--pink-l); color: var(--pink-d); white-space: nowrap; }
.chip.mint { background: var(--mint-l); color: #23866a; }
.chip.sky { background: var(--sky-l); color: #3a6fc4; }
.chip.gold { background: var(--gold-l); color: #a87400; }
.chip.gray { background: #eef0f5; color: var(--ink-2); }
.chip.red { background: #ffe1e1; color: #c53b3b; }
.flag { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 4px; border-radius: 4px; background: #eef0f5; color: var(--ink-2); letter-spacing: .3px; vertical-align: 1px; }
.flag.KOR { background: #e9f0ff; color: #2853a8; }
.ttl { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: #fff0c2; color: #9a6a00; margin-right: 3px; vertical-align: 1px; }

/* ───── 앱 레이아웃 ───── */
#app { min-height: 100%; }
.screen { min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 246, 249, .92); backdrop-filter: blur(8px);
  padding: calc(8px + var(--safe-t)) 14px 8px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line);
}
.topbar .date { font-family: var(--head); font-size: 16px; }
.topbar .stat { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13.5px; background: var(--card); padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
.view { padding: 14px 14px calc(var(--tab-h) + 86px + var(--safe-b)); max-width: 760px; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around;
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--ink-3); font-weight: 700; }
.tabbar button .ico { font-size: 22px; line-height: 1; filter: grayscale(.8); opacity: .7; transition: transform .15s; }
.tabbar button.on { color: var(--pink-d); }
.tabbar button.on .ico { filter: none; opacity: 1; transform: translateY(-2px) scale(1.1); }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 29; padding: 10px 14px;
  background: linear-gradient(to top, var(--bg) 70%, rgba(255, 246, 249, 0)); display: flex; gap: 8px; max-width: 760px; margin: 0 auto;
}
.actionbar .btn { flex: 1; min-height: 52px; font-size: 16px; }
.actionbar .btn.sub { flex: 0 0 auto; }

/* ───── 아바타 ───── */
.avatar { width: 100%; height: 100%; display: block; }
.ava { position: relative; width: 72px; height: 80px; flex: 0 0 auto; }
.ava.sm { width: 44px; height: 48px; }
.ava.xs { width: 34px; height: 37px; }
.ava.lg { width: 170px; height: 188px; }
.ava.xl { width: 220px; height: 242px; }
.ava .portrait-img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.ava-bg { border-radius: 50%; background: radial-gradient(circle at 50% 60%, #fff 0%, var(--pink-l) 70%); }

/* 홈 */
.hero { display: flex; gap: 12px; align-items: flex-end; position: relative; padding: 14px; border-radius: 22px; background: linear-gradient(160deg, #ffe7ef, #e7f1ff); overflow: hidden; }
.hero .ava { margin-bottom: -14px; }
.hero .ava.xl { width: 150px; height: 165px; }
@media (min-width: 600px) { .hero .ava.xl { width: 220px; height: 242px; } }
.hero .info { flex: 1; min-width: 0; padding-bottom: 4px; }
.hero h2 { font-size: 24px; }
.bubble { position: relative; background: #fff; border-radius: 16px; padding: 10px 12px; font-size: 14px; box-shadow: var(--shadow); margin-bottom: 10px; }
.bubble::after { content: ''; position: absolute; left: 18px; bottom: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 8px; align-items: center; font-size: 12.5px; }
.bar { height: 9px; background: #f1edf2; border-radius: 9px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 9px; background: var(--pink); transition: width .4s; }
.bar.mint > i { background: var(--mint); } .bar.sky > i { background: var(--sky); } .bar.gold > i { background: var(--gold); } .bar.red > i { background: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.kpi { background: var(--card); border-radius: 14px; padding: 9px 6px; text-align: center; box-shadow: var(--shadow); }
.kpi b { display: block; font-family: var(--head); font-size: 19px; font-weight: 400; }
.kpi span { font-size: 11px; color: var(--ink-3); }
.news li { list-style: none; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.news li:last-child { border-bottom: 0; }
.news { margin: 0; padding: 0; }
.news .when { color: var(--ink-3); font-size: 11px; margin-right: 6px; }

/* 능력치 */
.attr-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.attr { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid #f6eef2; }
.attr .nm { flex: 1; font-size: 13.5px; }
.attr .val { width: 30px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; }
.attr .arr { width: 14px; font-size: 11px; text-align: center; }
.v1 { background: #c9c9d6; } .v2 { background: #9bb8d9; } .v3 { background: #5cc8b0; } .v4 { background: #f5b82e; } .v5 { background: #ff7aa2; } .v6 { background: #b05cff; }
.up { color: var(--green); } .down { color: var(--red); }
.stars { color: var(--gold); letter-spacing: 1px; }

/* 훈련 선택 그리드 */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt { background: var(--card); border-radius: 14px; padding: 12px 10px; text-align: left; box-shadow: inset 0 0 0 1.5px var(--line); display: flex; flex-direction: column; gap: 3px; min-height: 76px; }
.opt .ic { font-size: 22px; }
.opt b { font-size: 14px; }
.opt span { font-size: 11.5px; color: var(--ink-3); }
.opt.on { box-shadow: inset 0 0 0 2.5px var(--pink); background: #fff7fa; }
.seg { display: flex; background: #f3eef2; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 40px; border-radius: 10px; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.seg button.on { background: #fff; color: var(--pink-d); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }

/* 대회 목록 */
.ev { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); margin-bottom: 10px; }
.ev .wk { width: 50px; text-align: center; flex: 0 0 auto; }
.ev .wk b { font-family: var(--head); font-size: 18px; display: block; font-weight: 400; }
.ev .wk span { font-size: 10.5px; color: var(--ink-3); }
.ev .body { flex: 1; min-width: 0; }
.ev .body .nm { font-weight: 800; font-size: 14.5px; }
.ev.reg { box-shadow: inset 0 0 0 2.5px var(--mint), var(--shadow); }
.ev.locked { opacity: .62; }
.tier { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.t1 { background: #b8e0d2; } .t2 { background: #6fcf97; } .t3 { background: #56ccf2; } .t4 { background: #bb6bd9; } .t5 { background: #f2994a; } .t6 { background: #eb5757; } .t7, .t8 { background: #222; }
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.subtabs button.on { background: var(--ink); color: #fff; box-shadow: none; }

/* 표 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 700; color: var(--ink-3); font-size: 11.5px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 4px; border-bottom: 1px solid #f7f0f3; }
.tbl tr.me td { background: #fff1f6; font-weight: 800; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 옷장 */
.closet-top { display: flex; gap: 12px; align-items: center; }
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.item { background: var(--card); border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 6px 6px 8px; text-align: center; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.item .pv { width: 100%; aspect-ratio: 1 / 1.05; background: #fbf5f8; border-radius: 10px; overflow: hidden; }
.item .pv svg { width: 100%; height: 100%; }
.item b { font-size: 12px; line-height: 1.25; }
.item.eq { box-shadow: inset 0 0 0 2.5px var(--pink); }
.item .price { font-size: 11.5px; color: var(--pink-d); font-weight: 800; }

/* ───── 오버레이 ───── */
.ovl { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; }
.ovl .dim { position: absolute; inset: 0; background: rgba(30, 20, 40, .42); animation: fade .2s; }
.sheet {
  position: relative; margin-top: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 18px 16px calc(16px + var(--safe-b));
  max-height: 92vh; overflow: auto; animation: up .25s cubic-bezier(.2, .9, .3, 1.1); width: 100%; max-width: 640px; margin-left: auto; margin-right: auto;
}
.sheet .grab { width: 42px; height: 5px; border-radius: 5px; background: #e2d6dd; margin: -6px auto 12px; }
.full { position: relative; background: var(--bg); flex: 1; overflow: auto; animation: fade .2s; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.bob { animation: bob 2.4s ease-in-out infinite; }

/* 대화 */
.dlg { display: flex; gap: 10px; align-items: flex-end; }
.dlg .bubble { flex: 1; font-size: 15px; }
.dlg .bubble::after { left: -8px; bottom: 18px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.choice { text-align: left; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14.5px; min-height: 48px; display: flex; gap: 8px; align-items: center; }
.choice:active { background: var(--pink-l); }
.choice .tag { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; flex: 0 0 auto; }
.tag.comfort { background: #ffe3ec; color: #d94a76; } .tag.strict { background: #e6e8f2; color: #4a4f73; } .tag.analyze { background: #e3efff; color: #3a6fc4; }
.tag.joke { background: #fff3d1; color: #a87400; } .tag.praise { background: #dcf7ee; color: #23866a; } .tag.treat { background: #f3e5ff; color: #8240c9; }
.fx-pop { display: inline-block; font-weight: 800; animation: pop .4s; }

/* 토스트 */
#toast-root { position: fixed; left: 0; right: 0; top: calc(10px + var(--safe-t)); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); animation: up .25s; max-width: 90vw; }

/* ───── 보드 ───── */
.board-wrap { position: relative; width: min(calc(100vw - 20px), 520px, calc(100dvh - 300px)); min-width: 260px; margin: 0 auto; }
.board { position: relative; width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px rgba(60, 30, 50, .18); user-select: none; }
.sq { position: relative; display: flex; align-items: center; justify-content: center; }
.sq.last::before { content: ''; position: absolute; inset: 0; background: rgba(255, 214, 64, .45); }
.sq.check::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 60, 60, .85) 0%, rgba(255, 60, 60, .2) 60%, transparent 75%); }
.sq .co { position: absolute; font-size: 9.5px; font-weight: 800; opacity: .65; pointer-events: none; }
.sq .co.f { right: 3px; bottom: 1px; } .sq .co.r { left: 3px; top: 1px; }
.pc { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: calc(min(calc(100vw - 20px), 520px, calc(100dvh - 300px)) / 8 * .78); line-height: 1; will-change: transform; }
.pc.w { color: #fff; -webkit-text-stroke: 1.4px #3b3b48; text-shadow: 0 2px 2px rgba(0, 0, 0, .25); }
.pc.b { color: #26232f; text-shadow: 0 2px 2px rgba(0, 0, 0, .25); -webkit-text-stroke: .6px #000; }
.pc img, .pc svg { width: 94%; height: 94%; filter: drop-shadow(0 1.5px 1px rgba(0,0,0,.25)); }
.pc.anim { transition: transform .22s ease-out; }
.mark { position: absolute; z-index: 3; top: 2px; right: 2px; font-size: 11px; font-weight: 900; padding: 1px 4px; border-radius: 6px; color: #fff; pointer-events: none; animation: pop .35s; }
.mark.bad { background: var(--red); } .mark.great { background: #19a974; } .mark.event { background: var(--sky); }
.evalbar { height: 10px; border-radius: 10px; background: #2b2a33; overflow: hidden; margin: 8px auto 0; width: min(calc(100vw - 20px), 520px, calc(100dvh - 300px)); }
.evalbar > i { display: block; height: 100%; background: #fff; box-shadow: inset 0 0 0 1px #ddd; transition: width .5s; }

/* 대국 화면 */
.match { display: flex; flex-direction: column; min-height: 100%; padding: calc(8px + var(--safe-t)) 10px calc(10px + var(--safe-b)); gap: 8px; }
.mhead { display: flex; align-items: center; gap: 8px; }
.mhead .ev-name { font-family: var(--head); font-size: 15px; flex: 1; min-width: 0; }
.pcard { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 6px 10px; box-shadow: var(--shadow); position: relative; width: min(calc(100vw - 20px), 520px, calc(100dvh - 300px)); margin: 0 auto; min-width: 260px; }
.pcard .nm { font-weight: 800; font-size: 14px; }
.pcard .sub { font-size: 11.5px; color: var(--ink-3); }
.pcard .clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 16px; padding: 4px 9px; border-radius: 9px; background: #f1edf2; }
.pcard .clock.on { background: var(--ink); color: #fff; }
.pcard .clock.low { background: var(--red); color: #fff; }
.pcard.me { box-shadow: inset 0 0 0 2px var(--pink), var(--shadow); }
.pcard .say { position: absolute; left: 54px; bottom: calc(100% + 4px); background: #fff; border-radius: 12px; padding: 6px 10px; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); animation: pop .3s; z-index: 5; white-space: nowrap; }
.pcard.top .say { bottom: auto; top: calc(100% + 4px); }
.feed { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 8px 12px; font-size: 13.5px; max-height: 118px; overflow: auto; width: min(calc(100vw - 20px), 520px); margin: 0 auto; }
.feed p { margin: 3px 0; }
.feed p.bad { color: #c53b3b; font-weight: 700; } .feed p.great { color: #12895f; font-weight: 700; } .feed p.opening { color: #3a6fc4; } .feed p.result { font-weight: 800; }
.mctrl { display: flex; gap: 6px; width: min(calc(100vw - 20px), 520px); margin: 0 auto; }
.mctrl .btn { flex: 1; min-height: 46px; padding: 0 6px; font-size: 14px; }
.movestrip { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow-x: auto; width: min(calc(100vw - 20px), 520px); margin: 0 auto; scrollbar-width: none; }
.movestrip::-webkit-scrollbar { display: none; }
.movestrip span { padding: 2px 4px; border-radius: 5px; }
.movestrip span.cur { background: var(--ink); color: #fff; }
.movestrip span.n { color: var(--ink-3); }

/* 대회 화면 */
.tourn-head { padding: calc(14px + var(--safe-t)) 16px 18px; color: var(--ink); }
.tourn-head h2 { font-size: 22px; }
.vs { display: flex; align-items: center; justify-content: space-around; gap: 6px; text-align: center; }
.vs .side { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vs .x { font-family: var(--head); font-size: 26px; color: var(--pink); }
.result-big { font-family: var(--head); font-size: 34px; text-align: center; animation: pop .5s; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* 하이라이트 */
.moments { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; width: min(calc(100vw - 20px), 520px); margin: 0 auto; }
.moments::-webkit-scrollbar { display: none; }
.moments button { flex: 0 0 auto; padding: 6px 10px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 12.5px; font-weight: 700; }
.moments button.on { background: var(--ink); color: #fff; box-shadow: none; }
.game-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.res { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; flex: 0 0 auto; }
.res.W { background: var(--green); } .res.D { background: #a0a3b8; } .res.L { background: var(--red); }

/* 타이틀 / 새 게임 */
.title-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 20px calc(24px + var(--safe-b)); background: linear-gradient(170deg, #ffe3ec 0%, #fff6f9 45%, #e3efff 100%); text-align: center; }
.logo { font-family: var(--head); font-size: 40px; line-height: 1.1; color: var(--ink); }
.logo small { display: block; font-size: 17px; color: var(--pink-d); margin-top: 6px; }
.title-avas { display: flex; justify-content: center; gap: 0; margin: 4px 0 6px; }
.title-avas .ava { margin: 0 -8px; }
.cands { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cand { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 12px; display: flex; gap: 12px; align-items: center; text-align: left; }
.cand.on { box-shadow: inset 0 0 0 3px var(--pink), var(--shadow); }
.cand-ava { width: 112px; height: 124px; }
.title-avas .ava.lg { width: 128px; height: 141px; }
.cand .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.input { width: 100%; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line); padding: 0 14px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.input:focus { outline: none; border-color: var(--pink); }

/* 데스크톱 확장 */
@media (min-width: 900px) {
  .view { max-width: 980px; }
  .home-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
  .home-grid .card + .card { margin-top: 0; }
  .home-grid > .col > .card + .card { margin-top: 0; }
  .cands { grid-template-columns: repeat(3, 1fr); }
  .cand { flex-direction: column; text-align: center; }
  .cand-ava { width: 170px; height: 188px; }
  .title-avas .ava.lg { width: 170px; height: 188px; }
  .items { grid-template-columns: repeat(5, 1fr); }
  .match-layout { display: grid; grid-template-columns: auto 320px; gap: 14px; align-items: start; max-width: 1000px; margin: 0 auto; width: 100%; }
  .match-layout .side-panel .feed, .match-layout .side-panel .mctrl, .match-layout .side-panel .movestrip { width: 100%; }
  .match-layout .side-panel .feed { max-height: 360px; }
  .board-wrap, .pcard, .evalbar { width: min(560px, calc(100dvh - 210px)); }
  .pc { font-size: calc(min(560px, calc(100dvh - 210px)) / 8 * .78); }
}
@media (max-width: 360px) {
  .attr-list { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .items { grid-template-columns: repeat(2, 1fr); }
}
