/* 경기 기록지·전광판 스킨: style.css 위에 덮어 쓴다.
 * 원칙: 알약과 둥근 모서리를 없애고, 연한 배경 대신 선으로 칸을 나눈다. */
:root {
  --bg: #eef0ea; --surface: #fbfcf8; --surface-2: #e3e7df;
  --ink: #101b15; --ink-2: #46534b; --ink-3: #5f6b63; --line: #b7c0b6;
  --grass: #145c3a; --grass-2: #1d7149; --grass-soft: #d5e3d8;
  --clay: #a84a27; --clay-soft: #f0dcd1; --stitch: #c0262f;
  --gold: #856000; --gold-soft: #f1e6bf;
  --shadow: none; --radius: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1512; --surface: #111f1a; --surface-2: #1a2c24;
    --ink: #edf3ee; --ink-2: #b4c2b8; --ink-3: #8f9f94; --line: #385045;
    --grass: #63cf95; --grass-2: #3ba56f; --grass-soft: #1b3a2c;
    --clay: #ec9670; --clay-soft: #3d281e; --stitch: #f4727b;
    --gold: #eec35c; --gold-soft: #3b3218; --shadow: none;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1512; --surface: #111f1a; --surface-2: #1a2c24;
  --ink: #edf3ee; --ink-2: #b4c2b8; --ink-3: #8f9f94; --line: #385045;
  --grass: #63cf95; --grass-2: #3ba56f; --grass-soft: #1b3a2c;
  --clay: #ec9670; --clay-soft: #3d281e; --stitch: #f4727b;
  --gold: #eec35c; --gold-soft: #3b3218; --shadow: none;
}


/* 글자 */
.brand, .hero .name, .ovr b, .stat b, .big-line, .screen-title, .ovr-change b, .modal h2, .scoreboard .mon, .grade { letter-spacing: 0; }
.landing h1 { font-size: clamp(30px, 9vw, 38px); font-weight: 800; letter-spacing: 0; line-height: 1.18; }

/* 칩: 채운 알약 대신 선으로 그린 표찰 */
.chip, .ach-diff, .grade-chip, .ach-badges em { background: transparent; border: 1px solid currentColor; }
.chip { padding: 2px 7px; color: var(--ink-2); }
.chip.grass, .chip.up { background: transparent; color: var(--grass); }
.chip.clay { background: transparent; color: var(--clay); }
.chip.down { background: transparent; color: var(--stitch); }
.chip.gold { background: transparent; color: var(--gold); }
.hero .chip { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.ach-diff { color: var(--ink-2); }
.grade-chip { color: var(--grass); }
.ach-badges em { border-color: var(--line); }
.ach-badges em.on.d-easy, .ach-badges em.on.d-normal, .ach-badges em.on.d-real { background: transparent; }

/* 메인 화면 경로: 경기표처럼 이어진 칸 */
.landing .steps { display: grid; grid-template-columns: 0.95fr 1.3fr 0.95fr 1.15fr 0.65fr; gap: 0; margin: 14px 0 0; border: 1px solid var(--ink); background: var(--surface); }
.landing .steps .chip { flex-direction: row; justify-content: center; min-width: 0; padding: 8px 2px; border: 0; border-right: 1px solid var(--ink); color: var(--ink); font-size: 12px; font-weight: 700; }
.landing .steps .chip:last-child { border-right: 0; }

/* 카드와 구분선 */
.card { border-color: var(--line); }
.card h3 { color: var(--ink); font-weight: 800; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.rows > .row, .moment, .shop-item, .slot, .retired-no { border-bottom-style: solid; }
.retired-no { border-top-style: solid; }
.stat-grid { gap: 0; padding: 0 1px 1px 0; }
.stat { background: transparent; border: 1px solid var(--line); margin: 0 -1px -1px 0; }

/* 버튼과 선택지 */
.btn { min-height: 50px; border: 1px solid var(--grass); }
:root .btn { color: #fff; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--ink); }
:root .btn.ghost { color: var(--ink); }
.btn.clay { border-color: var(--clay); }
.btn:active:not(:disabled) { transform: none; filter: brightness(0.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .btn:not(.ghost) { color: #07130e; } }
:root[data-theme='dark'] .btn:not(.ghost) { color: #07130e; }
.pick, .opt, .input { border-width: 1px; }
.pick.on { color: var(--surface); }
.opt.on { background: var(--grass-soft); box-shadow: none; } /* 고른 제안: 테두리 선 없이 바탕 면으로 */
.style-card.on { box-shadow: inset 0 0 0 1px var(--grass); }
.avatars button { border-width: 1px; border-color: var(--line); background: transparent; }
.avatars button.on { background: transparent; box-shadow: inset 0 0 0 1px var(--grass); }
.seg { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; padding: 0; background: transparent; border-color: var(--ink); }
.seg button { border-right: 1px solid var(--ink); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--bg); box-shadow: none; }

/* 하단 탭 */
.nav { border-top-color: var(--ink); }
.nav button.on { background: transparent; color: var(--grass); box-shadow: inset 0 2px 0 var(--grass); }

/* 선수 카드와 전광판 */
.hero { background: #10291f; border: 1px solid #000; }
.hero::before, .hero::after { display: none; }
.scoreboard { background: #0a1c15; border: 2px solid #000; }
.track { background: rgba(255, 255, 255, 0.16); }
.track i { background: #63cf95; }
.grade { background: transparent; border: 1px solid rgba(255, 255, 255, 0.6); }

/* 알림 */
.banner, .tick.good, .tick.gold { background: transparent; }
.banner { border: 1px solid currentColor; }
.toast { border: 1px solid var(--bg); }
.modal { border-top: 2px solid var(--ink); }
.hof.in { background: transparent; }
.result-stage { background: var(--surface-2); }
.sync-side { background: transparent; border: 1px solid var(--line); }
.tour-board .stop.on { background: transparent; }
tr.me td, .rank-row.me, .br-team.me { box-shadow: inset 0 0 0 1px var(--grass); background: transparent; }

/* 점 표시는 야구 베이스 모양으로 */
.list li::before { transform: translateY(-1px) rotate(45deg); }
.timeline .m::before { transform: rotate(45deg); }
.steps b { background: transparent; }
.steps span.done b { background: transparent; border-color: var(--grass); }

/* 구단 도감 */
.dex { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 8px; }
.dex span { gap: 5px; }
.dex small { font-size: 12px; line-height: 1.3; }

/* 윗줄과 메뉴: 손가락으로 한 번에 눌리는 크기 (0016) */
.top { padding: 6px 2px; gap: 6px; }
.top .brand { min-width: 0; }
.top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-left { display: flex; align-items: center; gap: 2px; min-width: 0; }
.top-right { flex-shrink: 0; gap: 4px; }
.icon-btn { width: 48px; height: 48px; flex-shrink: 0; font-size: 26px; line-height: 1; }
.top .btn.small { min-height: 40px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.modal-head h2 { margin: 0; }
.modal .btn.small, .modal .pick { min-height: 48px; }
.modal .pick { min-width: 48px; justify-content: center; }

/* 좁은 화면 + 큰 글자: 업적 칸이 화면 밖으로 밀리지 않게 (넓은 화면 배치는 css/web.css 가 정한다) */
.ach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ach { min-width: 0; overflow-wrap: anywhere; }
.ach-badges { flex-wrap: wrap; }

/* 평생의 맞수: 시즌별 승패 칸 */
.nem-line { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); margin: 10px 0 8px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.nem-box { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 3px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nem-box small { font-size: 11px; color: var(--ink-3); }
.nem-box b { font-size: 13px; color: var(--ink-3); }
.nem-box.r-W b, .nem-res.r-W { color: var(--grass); }
.nem-box.r-L b, .nem-res.r-L { color: var(--stitch); }
.nem-res.r-D { color: var(--ink-2); }
/* 맞수 카드: 좁은 화면·큰 글자에서는 값이 다음 줄로 내려간다 */
.nem .rows > .row { flex-wrap: wrap; row-gap: 2px; }
.nem .rows .k { flex: 0 1 auto; min-width: 0; }
.nem .rows .v { min-width: 0; margin-left: auto; overflow-wrap: anywhere; }
.nem .sub, .nem .muted { overflow-wrap: anywhere; }

/* 팬 반응 꼬리표: 밝은 테마에서 11px 글자가 잘 읽히게 */
.post.v-chat .vtag { color: #755500; }
.post.v-rival .vtag { color: #8f3d1d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .post.v-chat .vtag { color: var(--gold); }
  :root:not([data-theme='light']) .post.v-rival .vtag { color: var(--clay); }
}
:root[data-theme='dark'] .post.v-chat .vtag { color: var(--gold); }
:root[data-theme='dark'] .post.v-rival .vtag { color: var(--clay); }

/* 접히는 상점 카드 */
.shop-fold > summary { list-style: none; }
.shop-fold > summary::-webkit-details-marker { display: none; }
.fold-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fold-arrow { font-style: normal; color: var(--ink-2); }
.fold-arrow::before { content: '▸'; }
.shop-fold[open] .fold-arrow::before { content: '▾'; }
.shop-fold .fold-open, .shop-fold[open] .fold-closed { display: none; }
.shop-fold[open] .fold-open { display: inline; }


/* 시즌 결과의 「결정적 순간」 줄: 큰 글자에서 넘치지 않게 */
.clutch-rows > .row { flex-wrap: wrap; row-gap: 2px; }
.clutch-rows .k { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.clutch-rows .v { min-width: 0; margin-left: auto; overflow-wrap: anywhere; }

/* 은퇴 화면: 좁은 화면·큰 글자에서 가로로 넘치지 않게 */
.view-retired .rows > .row { flex-wrap: wrap; row-gap: 2px; }
.view-retired .rows .k { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.view-retired .rows .v { min-width: 0; margin-left: auto; overflow-wrap: anywhere; }
.hero-retired .hero-main { flex-wrap: wrap; }
.hero-retired .hero-main > div:last-child { flex: 1 1 150px; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 361px) and (max-width: 430px) {
  .view-retired .stat-grid { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
}
/* 긴 이름이어도 OVR 이 카드 밖으로 밀려나지 않게 한다. 이름 칸이 너무 좁아지는 화면(320px·아주 크게)에서는 OVR 만 다음 줄로 내린다 */
.hero:not(.hero-retired) .hero-main { flex-wrap: wrap; }
.hero:not(.hero-retired) .hero-main > div:nth-child(2) { flex: 1 1 72px; min-width: 0; overflow-wrap: anywhere; }
