/* 삼성생명배의 리그 표와 모바일 입력창을 배치한다. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: #20262c; background: #fff; font: 14px Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; letter-spacing: 0; }
header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 12px 24px; background: #fff; border-bottom: 1px solid #ddd; }
header a { color: #0066cc; text-decoration: none; white-space: nowrap; }
h1 { min-width: 0; margin: 0; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 14px; margin: 12px 0 8px; }
nav, .segments, .toolbar, .division-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
nav { gap: 4px; }
button, select { font: inherit; }
button { min-height: 36px; padding: 6px 12px; border: 1px solid #b9c2c9; background: #fff; color: #25313a; border-radius: 4px; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button.active { background: #1e6b58; border-color: #1e6b58; color: #fff; }
nav button { padding-inline: 16px; border: 1px solid transparent; border-radius: 100px; color: #5c5c5e; background: transparent; }
nav button:hover { background: #f3f3f5; }
nav button.active, #gender-tabs button.active, #grade-tabs button.active, #group-tabs button.active { background: #0066cc; border-color: #0066cc; color: #fff; }
main { padding: 16px 20px; }
.division-bar { gap: 14px; padding: 11px 24px; background: #f5f5f7; border-bottom: 1px solid #ddd; }
#gender-tabs button { min-width: 57px; border-radius: 100px; border-color: #b3d4ff; }
#gender-tabs [data-gender="여자"] { border-color: #ffb3b3; }
#gender-tabs [data-gender="여자"].active { background: #d63838; border-color: #d63838; }
#grade-tabs { padding-left: 12px; border-left: 1px solid #ddd; }
#grade-tabs button { border-radius: 100px; }
#group-tabs { padding: 6px 16px; border-bottom: 1px solid #d8dce0; background: #f7f7f8; }
#group-tabs button { min-width: 47px; min-height: 29px; padding: 3px 9px; font-size: 12px; }
.toolbar { padding: 7px 16px; background: #eef3fa; border-bottom: 1px solid #d4d9de; }
.toolbar button { min-height: 29px; padding: 4px 10px; font-size: 12px; }
.toolbar h2 { margin-inline-start: auto; font-size: 14px; }
#intra-team { color: #824916; background: #fff3e3; border-color: #cd854a; }
#gonbang-area { display: contents; }
#gonbang-panel { order: 1; flex: 1 0 100%; overflow-x: auto; }
#gonbang-result table { min-width: 510px; }
#status { min-height: 20px; color: #59646e; }
#status:empty { min-height: 0; margin: 0; }
#three-panel { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(0, 5fr) minmax(0, 4fr); gap: 10px; align-items: start; }
#three-panel > section { min-width: 0; }
#three-panel h3 { margin: 0 0 7px; padding: 7px 10px; border-radius: 4px 4px 0 0; background: #1a3a6b; color: #fff; font-size: 13px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 6px; border: 1px solid #d4d9de; text-align: center; white-space: nowrap; }
th { background: #f1f3f5; font-weight: 600; }
#three-panel th, #three-panel td { padding: 4px 5px; font-size: 11px; border-color: #d8dce1; }
#three-panel thead th { background: #eef3f9; }
.roster-table th:nth-child(n+2), .roster-table td:nth-child(n+2) { text-align: start; }
.match-table { min-width: 540px; }
#three-panel .round-label { text-align: start; padding: 5px 8px; background: #e9eff7; color: #1a3a6b; }
.score-cell { min-width: 32px; font-weight: 700; }
.score-detail, .matrix-score { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.winner { background: #fff4de; font-weight: 700; }
.forfeit { color: #687382; text-decoration: line-through; }
.carried { display: inline-block; padding: 2px 4px; border-radius: 3px; background: #edf3fc; color: #38557e; }
.matrix-diag { background: linear-gradient(to top right, transparent calc(50% - .5px), #86929e 50%, transparent calc(50% + .5px)); }
.match-button { min-height: 24px; padding: 2px 8px; border: 0; border-radius: 3px; background: #1a3a6b; color: #fff; font-size: 11px; }
.match-button:hover { background: #2a5298; }
dialog { border: 1px solid #b4bdc5; border-radius: 6px; width: 420px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); padding: 0; }
dialog::backdrop { background: #0007; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #1a3a6b; color: #fff; }
.dialog-header button { background: transparent; border: 0; color: inherit; padding: 0; width: 32px; font-size: 23px; }
.dialog-body { padding: 16px; }
.match-player, .score-total { padding: 8px; background: #f0f4fa; border-radius: 4px; overflow-wrap: anywhere; }
.match-versus { margin: 4px; color: #59646e; text-align: center; }
.reason-label { display: grid; gap: 5px; margin-top: 12px; }
.reason-label select { min-height: 34px; padding: 5px; border: 1px solid #b4bdc5; border-radius: 4px; }
#games { margin: 12px 0 0; padding: 0; border: 0; min-inline-size: 0; }
.score-row { display: grid; grid-template-columns: 40px 66px min-content 66px; gap: 8px; align-items: center; margin-top: 6px; }
.score-row input { width: 100%; min-height: 35px; padding: 4px; border: 1px solid #b4bdc5; border-radius: 4px; font: inherit; text-align: center; }
.score-total { margin-top: 12px; text-align: center; }
.score-total strong { font-size: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
#score-error { margin: 8px 0 0; color: #b42318; }
#score-error:empty { display: none; }
#score-save { background: #1a3a6b; color: #fff; }
#other-view { max-width: 1100px; }
#other-view h2 { margin: 18px 0 12px; }
.profile-heading { display: flex; align-items: baseline; gap: 10px; }
.profile-heading > span, .profile-name > span { color: #58626b; }
.profile-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.profile-list > li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 13px 0; border-top: 1px solid #d8dce0; }
.profile-list > li > div { min-width: 0; }
.profile-photo { flex: 0 0 auto; width: 76px; height: 95px; object-fit: contain; border-radius: 4px; background: #f2f4f7; }
.profile-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 9px; overflow-wrap: anywhere; }
.profile-name strong { font-size: 16px; }
.profile-highlights { margin: 6px 0 0; padding-left: 17px; color: #38444e; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 1150px) { #three-panel { grid-template-columns: minmax(135px, 1fr) minmax(0, 4fr); } #three-panel > section:last-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { header, .division-bar { padding: 10px 12px; } main { padding: 12px; } h1 { font-size: 18px; } nav button { padding: 7px 8px; } #three-panel { display: grid; grid-template-columns: minmax(0, 1fr); } .toolbar h2 { flex-basis: 100%; margin: 4px 0; } button, #group-tabs button { min-height: 40px; } .match-button { min-height: 34px; } .profile-list { grid-template-columns: minmax(0, 1fr); } }
@media print { header, #category-controls, .toolbar button, #gonbang-area, dialog, #status { display: none; } main { padding: 0; } #three-panel { display: block; } #three-panel > section:nth-child(-n+2) { display: none; } .table-scroll { overflow: visible; } @page { size: A4 landscape; margin: 10mm; } }
