/* 공용 격자·손익 색. 색 값은 앱 game.css 가 --game-up/--game-down 을 자기 팔레트 변수에 맵핑한다. */
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .game-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.game-grid > * { min-width: 0; }

.pnl-up { color: var(--game-up); }
.pnl-down { color: var(--game-down); }

/* 조작부 — 애플식: 회색 트랙 위 흰 알약(세그먼트), 채운 둥근 주문 버튼. */
#tools { display: grid; gap: 14px; margin: 14px 0 10px; font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", system-ui, sans-serif; }
.tool-group { display: grid; gap: 6px; }
.tool-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: #8e8e93; }
.tool-hint { margin: 0; font-size: 12px; color: #8e8e93; line-height: 1.5; }
#tools button { font: inherit; cursor: pointer; border: 0; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, box-shadow .2s ease, transform .1s ease, opacity .2s ease; }
.seg { display: flex; padding: 2px; border-radius: 9px; background: rgba(120, 120, 128, .12); }
.seg button { flex: 1; padding: 6px 10px; border-radius: 7px; background: transparent; color: inherit; font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--bg, #fff); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
#actions { display: flex; gap: 8px; }
#actions button { flex: 1; padding: 11px 0; border-radius: 12px; font-size: 15px; font-weight: 600; color: #fff; }
#actions button:active:not(:disabled) { transform: scale(.97); }
#actions [data-action="buy"] { background: var(--game-up); }
#actions [data-action="sell"] { background: var(--game-down); }
#actions [data-action="hold"] { background: rgba(120, 120, 128, .16); color: inherit; }
#actions [data-action="end"] { flex: 0 0 auto; padding: 11px 14px; background: transparent; color: #8e8e93; font-weight: 500; }
#actions button:disabled { opacity: .35; cursor: not-allowed; }
#tools button:focus-visible { outline: 2px solid #b3282d; outline-offset: 2px; }
#panel table, #summary table, #account table { border-collapse: collapse; width: 100%; }
#panel th, #summary th { text-align: left; font-weight: 400; opacity: 0.75; padding: 2px 8px 2px 0; }
#panel td, #summary td, #account td { text-align: right; padding: 2px 0 2px 8px; font-variant-numeric: tabular-nums; }
#account th, #account td:first-child, #account td:nth-child(2) { text-align: left; }
#log { list-style: none; padding: 0; margin: 6px 0; max-height: 220px; overflow-y: auto; font-size: 0.9em; }
#log .msg { opacity: 0.8; font-style: italic; }
.halted { font-size: 0.75em; padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; }

/* 시작 줄·검색창 — 블로그 «종목검색» 창과 같은 값(#d8d8d8 테두리, 포커스 #b3282d + 옅은 고리, 결과 줄 #fbeceb). */
#start-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; padding: 12px; border-radius: 14px; background: rgba(120, 120, 128, .07); }
#start-form .tg-search { flex: 1 1 240px; }
.start-note { margin: 0 0 14px; font-size: 12px; color: #8a8a8a; }
#start-form input, .tg-search input { width: 100%; box-sizing: border-box; padding: 9px 11px; font: inherit; font-size: 14px; line-height: 1.5;
  color: #222; background: #fff; border: 1px solid #d8d8d8; border-radius: 8px; -webkit-appearance: none; appearance: none; }
#start-form #date { width: auto; flex: 0 0 auto; }
#start-form input:focus, .tg-search input:focus { outline: 0; border-color: #b3282d; box-shadow: 0 0 0 3px rgba(179, 40, 45, .12); }
#start-btn { flex: 0 0 auto; padding: 9px 22px; border: 0; border-radius: 8px; background: #b3282d; color: #fff; font: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, transform .1s ease; }
#start-btn:hover { background: #8b0000; }
#start-btn:active { transform: scale(.97); }
.tg-search { position: relative; margin: 0 0 8px; }
#start-form .tg-search { margin: 0; }
.tg-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  max-height: 300px; overflow-y: auto; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05); }
.tg-list[hidden] { display: none; }
.tg-list li { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 14px; line-height: 1.4; color: #1a1a1a; cursor: pointer; }
.tg-list li.on { background: #fbeceb; }
.tg-list b { font-weight: 600; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.tg-list i { font-style: normal; font-size: 12.5px; color: #6b6b6b; }
.tg-list span { margin-left: auto; font-size: 11px; color: #8a8a8a; white-space: nowrap; }

/* 신고가·업종 패널(boards.js) — 0 중심 양방향 막대, 색은 캔들·손익과 같은 변수. */
.board { max-height: 420px; overflow-y: auto; }
.board-empty { margin: 6px 0; font-size: 13px; color: #8e8e93; }
.board-highs { border-collapse: collapse; width: 100%; font-size: 12.5px; line-height: 1.7; }
.board-highs th { font-weight: 400; opacity: .75; text-align: right; }
.board-highs th:first-child, .board-highs td:first-child { text-align: left; }
.board-highs td { text-align: right; font-variant-numeric: tabular-nums; padding: 0 0 0 8px; }
.board-highs td:first-child { padding: 0; }
.board-highs i, .bar-name i { font-style: normal; font-size: 11px; color: #8e8e93; }
.board-highs.pick tbody tr { cursor: pointer; }
.board-highs.pick tbody tr:hover { background: rgba(120, 120, 128, .08); }
.bar-row { display: grid; grid-template-columns: 1fr 1fr 64px; gap: 8px; align-items: center; font-size: 12.5px; line-height: 1.7; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { position: relative; height: 10px; background: rgba(120, 120, 128, .12); border-radius: 5px; }
.bar-track b { position: absolute; top: 0; height: 100%; border-radius: 5px; }
.bar-track .pnl-up { background: var(--game-up); }
.bar-track .pnl-down { background: var(--game-down); }
.bar-row.mine { font-weight: 600; background: rgba(120, 120, 128, .08); }
#actions [data-action="another"] { flex: 0 0 auto; padding: 11px 14px; background: transparent; color: #8e8e93; font-weight: 500; }
#board-highs h3, #board-industries h3 { margin: 0 0 6px; font-size: 15px; }
#start-form .blind-toggle { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; cursor: pointer; }
#start-form .blind-toggle input { width: auto; margin: 0; padding: 0; -webkit-appearance: checkbox; appearance: auto; accent-color: #b3282d; }
#start-form .blind-toggle:has(input:disabled) { opacity: .45; cursor: not-allowed; }
