/* ───── 관리자 레이아웃: PC 는 왼쪽 메뉴, 휴대폰은 위쪽 탭 ───── */
body.admin { max-width: none; padding: 0; font-size: 15.5px; }
.shell { min-height: 100vh; }
.side { position: sticky; top: 0; z-index: 10; background: var(--green-dark); color: #fff; padding: 12px 14px 0; }
.side-brand { display: flex; align-items: baseline; gap: 8px; }
.side .logo { color: #fff; }
.side .logo b { color: #f1c49d; }
.side-sub { color: #e0c2a7; font-weight: 700; font-size: 14px; }
.back { display: none; }
.atabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.atabs::-webkit-scrollbar { display: none; }
.atabs button { flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 12px;
  color: #eee0d3; font-weight: 700; font-size: 14.5px; text-align: left; }
.atabs button i { font-style: normal; }
.atabs button small { display: none; }
.atabs button.on { background: #fff; color: var(--green-dark); }
.content { padding: 16px 14px 60px; }
.sec-title { font-size: 22px; margin: 4px 2px 16px; letter-spacing: -0.5px; }
.grid2 { display: grid; gap: 14px; }
.grid2 > .card, .grid2 > div > .card:last-child { margin-bottom: 0; }
.grid2 { margin-bottom: 14px; }

@media (min-width: 900px) {
  body.admin { font-size: 16px; }
  .shell { display: grid; grid-template-columns: 250px 1fr; }
  .side { height: 100vh; padding: 26px 16px; display: flex; flex-direction: column; }
  .side .logo { font-size: 27px; }
  .atabs { flex-direction: column; gap: 4px; padding: 26px 0; overflow: visible; }
  .atabs button { padding: 12px 14px; font-size: 16px; gap: 12px; }
  .atabs button i { font-size: 20px; }
  .atabs button small { display: block; font-size: 12px; font-weight: 500; color: #caaf98; margin-top: 2px; }
  .atabs button.on small { color: var(--sub); }
  .atabs button:not(.on):hover { background: rgba(255,255,255,.08); }
  .back { display: block; margin-top: auto; color: #e0c2a7; font-size: 14px; font-weight: 700; text-decoration: none; padding: 8px 14px; }
  .content { padding: 34px 40px 80px; max-width: 1180px; }
  .sec-title { font-size: 28px; margin-bottom: 22px; }
  .grid2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .sticky-card { position: sticky; top: 24px; }
  .stat-grid { grid-template-columns: repeat(6, 1fr); }
  .stat b { font-size: 28px; }
  .help { font-size: 14px; }
}

/* 로그인 */
.login { max-width: 400px; margin: 60px auto; text-align: center; padding: 30px 24px; }
.login-logo { font-size: 48px; }
.login h2 { margin: 6px 0 10px; }
.login .share { justify-content: center; }

/* 단계 안내 */
.steps { margin: 12px 0 0; padding-left: 20px; color: var(--sub); font-size: 13.5px; line-height: 1.7; }
.steps b { color: var(--text); }

/* 픽 관리 */
.legend { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--sub); }
.legend b { color: var(--text); margin-right: 6px; }
.legend b.red { color: var(--lose); }
.prow { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.prow-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prow-head .who { font-weight: 800; font-size: 16px; }
.prow-head .when { color: var(--sub); font-size: 13px; }
.prow-head .f { color: var(--odds); font-weight: 800; }
.prow-head .st { margin-left: auto; }
.prow-legs { margin: 10px 0; display: grid; gap: 4px; }
.prow-legs div { font-size: 14px; display: flex; gap: 8px; }
.prow-legs .n { color: var(--num); font-weight: 800; width: 42px; flex: none; }
.prow-legs .t { flex: 1; min-width: 0; }
.prow-legs .o { color: var(--odds); font-weight: 800; }
.prow-cmt { background: var(--yellow-soft); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; margin-bottom: 10px; }
.prow-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.prow-actions button { padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.btn-unshare { background: var(--btn); border: 1px solid var(--btn-line); }
.btn-delete { background: #fbe9e4; color: var(--lose); border: 1px solid #f3cfc4; }

.sec { display: none; }
.sec.on { display: block; }
.help { color: var(--sub); font-size: 13px; line-height: 1.55; margin: -4px 0 12px; }
.help code { background: var(--btn); padding: 1px 5px; border-radius: 5px; }
.inp { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 12px;
  font: inherit; color: var(--text); margin-bottom: 8px; resize: vertical; }
.inp:focus { outline: 2px solid var(--green-soft); border-color: var(--green); }
.wide { width: 100%; margin-top: 4px; }
.sticky-save { position: sticky; bottom: 12px; box-shadow: 0 6px 18px rgba(61, 39, 20,.25); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 6px; text-align: center; }
.stat b { display: block; font-size: 22px; color: var(--green-dark); }
.stat span { font-size: 12px; color: var(--sub); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; display: flex; gap: 8px; }
.checks li:first-child { border-top: 0; }
.checks small { display: block; color: var(--sub); font-size: 12px; margin-top: 2px; }

.mrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 6px; align-items: center; padding: 5px 0; }
.mrow .inp { margin: 0; padding: 9px 10px; font-size: 14px; min-width: 0; }
.mrow.off .inp { opacity: .45; }
.mhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 6px; font-size: 12px; color: var(--sub); font-weight: 700; padding: 0 2px; }
.mhead span:last-child { text-align: center; }
.mgroup { margin: 12px 0 2px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--sub); }
.mgroup b { color: var(--green-dark); }
.mhead + .mgroup { border-top: 0; padding-top: 0; margin-top: 8px; }

.switch { position: relative; width: 44px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #e1d8d1; border-radius: 20px; transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }

.preview-nav { position: static; border: 1px solid var(--line); border-radius: 12px; grid-template-columns: repeat(var(--n, 6), 1fr); }

.lrow { display: grid; grid-template-columns: 1fr 46px 30px; gap: 6px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); }
.lrow:first-child { border-top: 0; }
.lrow .fields .inp { margin-bottom: 6px; padding: 9px 10px; font-size: 14px; }
.lrow .fields .inp:last-child { margin-bottom: 0; }
.lrow .del { color: var(--lose); font-size: 18px; }

.mini-seg { display: inline-flex; background: var(--btn); border-radius: 8px; padding: 2px; }
.mini-seg button { font-size: 12px; padding: 4px 8px; border-radius: 6px; color: var(--sub); font-weight: 700; }
.mini-seg button.on { background: #fff; color: var(--text); }

/* 텔레그램 말풍선 미리보기 */
.tg-chat { background: #5b4f45; background-image: radial-gradient(#655649 1px, transparent 1px); background-size: 14px 14px;
  border-radius: 12px; padding: 14px 12px; }
.tg-msg { max-width: 330px; }
.tg-bubble { background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px 6px; font-size: 14.5px; line-height: 1.45; color: #111; }
.tg-bubble .from { color: #d0457a; font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.tg-bubble .time { text-align: right; color: #615953; font-size: 11.5px; }
.tg-btn { margin-top: 4px; background: rgba(50, 42, 35, .72); color: #fff; text-align: center; padding: 9px; border-radius: 10px;
  font-size: 14px; font-weight: 600; position: relative; }
.tg-btn::after { content: "↗"; position: absolute; right: 7px; top: 3px; font-size: 10px; opacity: .8; }
.tg-btn.app::after { content: "▢"; }
.tg-btn.warn { background: rgba(196, 71, 43, .7); }

.vrow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.vrow:first-child { border-top: 0; }
.vrow img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; background: var(--btn); }
.vrow .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vrow .t small { display: block; color: var(--sub); font-weight: 500; font-size: 12px; margin-top: 2px; }
.vrow .del { color: var(--lose); font-size: 13px; font-weight: 700; padding: 6px; }
.url-box { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 10px; padding: 8px 8px 8px 12px; }
.url-box code { flex: 1; min-width: 0; font-size: 12.5px; word-break: break-all; }
.url-box .btn-soft { padding: 8px 12px; flex: none; }
.srow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.srow:first-child { border-top: 0; }
.srow > span:first-child { flex: 1; font-weight: 700; }
.srow .ok { color: var(--green); font-size: 13px; }
.srow .no { color: var(--faint); font-size: 13px; }
.srow .del { color: var(--lose); font-size: 13px; font-weight: 700; }
.inline-field { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--sub); margin-top: 10px; }
.inline-field .inp { width: 80px; margin: 0; }

/* 정기 안내 */
.br-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.br-row label { font-size: 13px; color: var(--sub); font-weight: 700; }
.br-row .inp { margin-top: 4px; }
.br-hours { background: var(--green-soft); color: var(--green-dark); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 4px 0 12px; }

/* 문구·꾸미기 */
.seg.four { grid-template-columns: repeat(4, 1fr); }
.seg.four button { font-size: 13.5px; }
.part { display: none; }
.part.on { display: block; }
.text-item { margin-bottom: 14px; }
.inp.mono { font-size: 14.5px; line-height: 1.6; }
.chips-vars { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.chips-vars .var { background: var(--btn); border: 1px solid var(--btn-line); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; color: var(--sub); font-weight: 700; }
.chips-vars .var:hover { color: var(--green); border-color: var(--green); }
.text-item .reset { font-size: 13px; padding: 7px 12px; }
.brow { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.brow:first-child { border-top: 0; }
.brow > span:first-child { font-weight: 700; font-size: 14px; }
.brow .inp { margin: 0; }
#colorList .brow { grid-template-columns: 1fr 140px 120px; }
#colorList .tg-btn { margin: 0; padding: 8px; font-size: 13px; }
#colorList .tg-btn::after { content: none; }
.color-none { background: rgba(50, 42, 35, .72); }
.color-success { background: #744821; }
.color-primary { background: #6f4826; }
.color-danger { background: #d9534f; }
.emoji-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.emoji-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--btn); border: 1px solid var(--btn-line); border-radius: 12px; padding: 6px 8px 6px 12px; font-size: 22px; }
.emoji-chip button { font-size: 12px; color: var(--lose); }
.ok { color: var(--green); font-size: 13px; }
.red { color: var(--lose); font-size: 13px; }
@media (max-width: 600px) { .seg.four { grid-template-columns: 1fr 1fr; } .brow, #colorList .brow { grid-template-columns: 1fr; } }

/* 경기분석 */
.an-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.an-item-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.an-item-head small { color: var(--sub); font-size: 12.5px; }
.an-item-head .del { margin-left: auto; color: var(--lose); font-weight: 700; font-size: 13px; }
.an-item ol { margin: 8px 0 0; padding-left: 20px; }
.an-item li { margin-bottom: 6px; font-size: 13.5px; line-height: 1.55; }
.an-item li b { display: block; }
.an-item li span { color: var(--sub); }
#anPv { max-height: 640px; overflow-y: auto; }

.an-pk { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.an-pk span { background: var(--yellow-soft); border: 1px solid #f0d77e; border-radius: 8px; padding: 3px 8px; }
.an-pk.none { color: var(--faint); }

.an-warn { margin-top: 6px; font-size: 12.5px; color: #9a5b00; background: #fff4e0; border-radius: 8px; padding: 5px 8px; }

.an-item .grp { font-style: normal; font-size: 11.5px; color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 1px 6px; margin-right: 2px; }

/* 회원 */
.mem-search { margin-bottom: 10px; }
.mem-card { padding: 6px 16px; overflow-x: auto; }
.mem-head, .mem-row { display: grid; grid-template-columns: 44px minmax(150px, 1.6fr) 80px 74px 88px 92px 78px 104px 92px; gap: 10px; align-items: center; min-width: 900px; }
.mem-head { font-size: 12px; color: var(--sub); font-weight: 700; padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.mem-row { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.mem-row:first-child { border-top: 0; }
.mem-row small { display: block; color: var(--sub); font-size: 12px; }
.mem-name b { font-size: 15px; }
.mem-name .tag { font-style: normal; font-size: 11px; background: var(--yellow-soft); color: #8a5a00; border-radius: 6px; padding: 1px 6px; margin-left: 6px; font-weight: 800; }
.mem-reset { border: 1px solid #f1c4c4; background: #fff5f5; color: #c0392b; border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.mem-reset:hover { background: #ffe9e9; }
.mem-av { position: relative; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #f6e4d4, #eac8aa); display: grid; place-items: center; overflow: hidden; }
.mem-av i { font-style: normal; font-weight: 900; color: var(--green-dark); }
.mem-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.danger-card { border-color: #f3cfc4; }
.reset-row { display: flex; gap: 8px; }
.reset-row .inp { margin: 0; flex: 1; }
.reset-row .btn-delete { padding: 0 16px; border-radius: 10px; font-weight: 800; white-space: nowrap; }
.inp.sm { display: inline-block; padding: 6px 8px; margin: 0; text-align: right; }

/* 스포츠다방: 왼쪽 메뉴 색 */
.side { background: linear-gradient(180deg, #4a220c 0%, #563519 60%, #744821 100%); }

/* 칭호 */
.mem-honor { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mem-honor .hn { font-style: normal; font-size: 11px; font-weight: 900; border-radius: 8px; padding: 2px 6px; }
.mem-honor .hn.mvp { background: #fff1c2; color: #8a5a00; }
.mem-tosin { border: 1px solid #d6c6f5; background: #fff; color: #5b2fb3; border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.mem-tosin.on { background: #5b2fb3; border-color: #5b2fb3; color: #fff; }

/* 휴대폰: 회원 목록을 표 대신 카드로 (옆으로 밀지 않아도 버튼이 다 보이게) */
@media (max-width: 760px) {
  .mem-card { overflow: visible; padding: 4px 14px; }
  .mem-head { display: none; }
  .mem-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; padding: 12px 0; }
  .mem-row > :first-child { flex: none; }
  .mem-row .mem-name { flex: 1 1 calc(100% - 60px); min-width: 0; }
  .mem-row [data-label] { flex: 1 1 auto; font-size: 13px; background: var(--bg); border-radius: 8px; padding: 5px 8px; }
  .mem-row [data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--sub); font-weight: 600; }
  .mem-row [data-label] small { display: inline; margin-left: 4px; }
  .mem-row .mem-honor { flex-direction: row; align-items: center; flex: 1 1 auto; }
  .mem-row > :last-child { flex: none; margin-left: auto; }
}

/* 추천 조합 */
.cb { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; background: #fff; }
.cb:last-child { margin-bottom: 0; }
.cb-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; }
.cb-head b { font-size: 16px; }
.cb-odds { color: var(--odds); font-weight: 800; font-size: 16px; }
.cb-head small { color: var(--sub); font-size: 13px; margin-left: auto; }
.cb-tag { font-style: normal; font-size: 12px; color: var(--green-dark); background: var(--bg); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.cb-leg { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; min-width: 0; }
.cb-leg small { display: block; color: var(--sub); font-size: 12px; }
.cb-game { font-size: 14px; margin: 2px 0; overflow-wrap: anywhere; }
.cb-pick { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; font-size: 14px; }
.cb-pick b { color: var(--green-dark); overflow-wrap: anywhere; }
.cb-pick span { color: var(--sub); font-size: 13px; white-space: nowrap; }
.cb-note { margin: 4px 0 8px; resize: vertical; line-height: 1.5; }
.cb .btn-primary { width: 100%; margin: 0; }
.cb-rec { display: grid; gap: 6px; font-size: 14px; }
.cb-rec div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.cb-rec span { color: var(--sub); }

/* 정기 안내 (직접 쓰는 글) */
.sch { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; background: #fffcf7; }
.sch.off { opacity: .6; }
.sch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sch-head .inp { flex: 1; min-width: 0; margin: 0; padding: 9px 10px; }
.sch-no { flex: none; background: var(--green-dark); color: #fff; border-radius: 9px; padding: 6px 9px; font-size: 13px; }
.sch-text { min-height: 150px; resize: vertical; line-height: 1.5; margin-bottom: 8px; }
.sch-mode { margin: 4px 0 8px; }
.sch-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 8px 0 4px; }
.sch-days button { padding: 8px 0; border-radius: 9px; background: var(--btn); color: var(--sub); font-weight: 700; border: 1px solid var(--btn-line); }
.sch-days button.on { background: var(--green); color: #fff; border-color: var(--green); }
.sch .share { font-size: 14px; margin: 6px 2px; }
.sch-del { color: #c0392b !important; border-color: #f1c4c4 !important; background: #fff5f5 !important; }
