/* 모바일 앱 (참가자·심판) — 어르신 가독성 우선: 큰 글씨·큰 버튼·높은 대비 */
body { font-size: 17px; }
@media (min-width: 560px) { body { background: #d9e2d6; } #app { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, .12); } }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 92px; }

#top { position: sticky; top: 0; z-index: 30; background: linear-gradient(135deg, var(--g9), var(--g7)); color: #fff; padding: 12px 16px 12px; padding-top: max(12px, env(safe-area-inset-top)); }
#top .r1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#top .ev { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
#top .r2 { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; opacity: .95; }
#top .r2 .bar { flex: 1; background: rgba(255, 255, 255, .22); }
#top .r2 b { font-variant-numeric: tabular-nums; }

#nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 520px); z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 6px 6px max(6px, env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(20, 35, 26, .06); }
#nav button { border: 0; background: none; padding: 6px 2px 5px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--mute); min-height: 58px; }
#nav button svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#nav button.on { color: var(--g7); background: var(--g1); }

.pad { padding: 14px 14px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pad > * { min-width: 0; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.card h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.h2 { margin: 4px 2px 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.sub { color: var(--mute); font-size: 14px; margin: 2px 2px 0; }
.empty { text-align: center; color: var(--mute); padding: 28px 12px; }

.searchbox { position: relative; }
.searchbox input { width: 100%; height: 56px; border-radius: 16px; border: 2px solid var(--line); background: #fff; padding: 0 16px 0 48px; font-size: 18px; outline: none; }
.searchbox input:focus { border-color: var(--g5); box-shadow: 0 0 0 4px rgba(44, 154, 95, .16); }
.searchbox svg { position: absolute; left: 15px; top: 16px; width: 24px; height: 24px; stroke: var(--mute); fill: none; stroke-width: 2.2; stroke-linecap: round; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 15px; font-weight: 700; font-size: 15px; min-height: 42px; }
.chip.on { background: var(--g7); border-color: var(--g7); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--g7); color: #fff; font-weight: 800; font-size: 17px; }
.btn:disabled { background: #c6cfc7; color: #f5f7f4; cursor: not-allowed; }
.btn.line { background: #fff; color: var(--g7); box-shadow: inset 0 0 0 2px var(--g7); }
.btn.red { background: var(--red); }
.btn.big { min-height: 60px; font-size: 19px; width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* 목록 행 */
.list { display: grid; gap: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.lrow { display: grid; grid-template-columns: 46px 1fr 44px 58px 44px; align-items: center; gap: 4px; padding: 10px 8px 10px 12px; border-top: 1px solid var(--line); background: #fff; width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; cursor: pointer; min-height: 64px; }
.lrow:first-child { border-top: 0; }
.lrow:active { background: var(--g1); }
.lrow .rk { font-weight: 800; font-size: 17px; text-align: center; font-variant-numeric: tabular-nums; }
.lrow .nm b { font-size: 17px; display: block; line-height: 1.25; }
.lrow .nm small { font-size: 13px; }
.lrow .th { text-align: center; font-size: 15px; color: var(--mute); font-variant-numeric: tabular-nums; }
.lrow .tp { text-align: right; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.star { border: 0; background: none; font-size: 30px; line-height: 1; color: #c2cbc3; width: 44px; height: 44px; border-radius: 12px; }
.star.on { color: #e8a800; }
.lhead { display: grid; grid-template-columns: 46px 1fr 44px 58px 44px; gap: 4px; padding: 8px 8px 8px 12px; font-size: 12.5px; font-weight: 700; color: var(--mute); background: var(--soft); }
.lhead span:nth-child(1), .lhead span:nth-child(3) { text-align: center; } .lhead span:nth-child(4) { text-align: right; }
.more { margin: 4px auto 0; }

/* 내 선수 카드 */
.pcard { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px; border: 0; width: 100%; text-align: left; display: block; cursor: pointer; }
.pcard .t { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pcard .name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pcard .meta { color: var(--mute); font-size: 14px; }
.pcard .main { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin: 12px 0 10px; align-items: end; }
.pcard .big { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pcard .lab { font-size: 13px; color: var(--mute); font-weight: 600; margin-top: 3px; }
.pcard .kv b { font-size: 24px; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pcard .bar { margin: 6px 0 10px; }

.feed { display: grid; gap: 0; }
.feed div { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.feed div:first-child { border-top: 0; }
.feed time { color: var(--mute); font-variant-numeric: tabular-nums; flex: none; width: 44px; font-size: 14px; }
.ann { background: #fffbe8; border: 1px solid #f0e3a6; }
.ann p { margin: 0; font-weight: 600; }

/* 시트 (상세) */
#sheet { position: fixed; inset: 0; z-index: 100; background: var(--bg); overflow-y: auto; }
#sheet .panel { max-width: 520px; margin: 0 auto; min-height: 100%; background: var(--bg); position: relative; }
#sheet .sh-top { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
#sheet .sh-top h2 { font-size: 18px; margin: 0; flex: 1; }
#sheet .back { border: 0; background: var(--g1); color: var(--g7); border-radius: 12px; height: 46px; padding: 0 14px; font-weight: 800; font-size: 16px; }
.hero { background: linear-gradient(135deg, var(--g9), var(--g7)); color: #fff; border-radius: 20px; padding: 18px; }
.hero .nm { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.hero .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; text-align: center; }
.hero .stats b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.hero .stats span { font-size: 12.5px; opacity: .85; }
.grp-m { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.grp-m:first-of-type { border-top: 0; }
.grp-m.me { background: var(--g1); margin: 0 -10px; padding: 10px; border-radius: 12px; border-top-color: transparent; }
.gcard { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; width: 100%; text-align: left; border: 0; cursor: pointer; display: block; }
.gcard .gh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.gcard .gh b { font-size: 17px; }
.gm { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 16px; }
.gm .tp { font-weight: 800; min-width: 38px; text-align: right; }

/* 심판 */
.hole-head { text-align: center; }
.hole-head .hn { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.hole-head .par { display: inline-block; margin-top: 4px; padding: 3px 14px; border-radius: 99px; background: var(--g1); color: var(--g7); font-weight: 800; }
.pick { border-top: 1px solid var(--line); padding: 12px 0; }
.pick:first-of-type { border-top: 0; }
.pick .who { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pick .who b { font-size: 20px; }
.nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.nums button { height: 58px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 24px; font-weight: 800; }
.nums button.on { background: var(--g7); border-color: var(--g7); color: #fff; }
.nums button.ace { border-color: var(--gold); color: var(--gold); }
.nums button.ace.on { background: var(--gold); color: #fff; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--mute); }
.field input, .field select { height: 54px; border-radius: 14px; border: 2px solid var(--line); padding: 0 14px; font-size: 18px; background: #fff; width: 100%; }
.field input:focus, .field select:focus { border-color: var(--g5); outline: none; }
.ck { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.ck:first-of-type { border-top: 0; }
.ck .mk { width: 30px; height: 30px; border-radius: 50%; background: #e3e9e1; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.ck.ok .mk { background: var(--g5); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--soft); font-weight: 700; font-size: 13px; color: var(--mute); }
.warn { background: var(--orange-bg); color: var(--orange); border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; }

/* 스캐너 */
.scan { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; flex-direction: column; }
.scan video { flex: 1; object-fit: cover; width: 100%; min-height: 0; }
.scan .frame { position: absolute; left: 50%; top: 38%; width: 240px; height: 240px; transform: translate(-50%, -50%); border: 4px solid var(--lime); border-radius: 24px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); pointer-events: none; }
.scan .bt { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px max(20px, env(safe-area-inset-bottom)); display: grid; gap: 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #fff; text-align: center; }
.scan .msg { font-weight: 700; font-size: 17px; }
.modal { position: fixed; inset: 0; z-index: 250; background: rgba(10, 20, 14, .6); display: grid; place-items: center; padding: 16px; }
.modal .box { background: #fff; border-radius: 22px; padding: 22px; width: min(100%, 380px); text-align: center; display: grid; gap: 12px; justify-items: center; }
.install ol { margin: 6px 0 0; padding-left: 20px; font-size: 15px; }
.install li { margin: 4px 0; }
.kakao { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
