/* 그리드벳 미니게임(/main/minigame.php) — 원본 CSS(module.css 의 미니게임영상 · 미니게임시간 · 미니게임버튼내역 · 게임중지 · 미니게임 리스트 절,
   layout_pc/mobile.css 의 탭 · 표)에 없는 칸만 원본 색 변수로 보탠다 */

.tr-mg [hidden]{display:none!important}
.tr-mg .mg-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* 종류 · 게임 탭 숫자 */
.tr-mg .tabTitle a .mg-n{margin-left:4px;font-family:'p6';font-size:11px;color:var(--38ffa8)}
.tr-mg .tabTitle.depth1 a:not(.on) .mg-n{color:var(--939393)}

/* 불러오는 중 · 빈 목록 · 오류 */
.tr-mg .mg-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:220px;margin:10px 0;padding:36px 16px;border-radius:10px;background:var(--3838);box-shadow:inset 0 0 0 1px var(--module-panel-border);font-size:13px;line-height:1.6;color:var(--aeae);text-align:center;word-break:keep-all}
.tr-mg .mg-state b{font-family:'p6';font-weight:normal;font-size:16px;color:var(--font-color)}
.tr-mg .mg-state[data-kind=err] b{color:#ffb36b}
.tr-mg .mg-act{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:8px}
.tr-mg .mg-btn{display:inline-flex;align-items:center;justify-content:center;height:38px;padding:0 22px;border-radius:8px;background:var(--module-primary-gradient,var(--126e51));font-family:'p6';font-size:13px;color:#fff}
.tr-mg .mg-btn:hover{filter:brightness(1.08)}
.tr-mg .mg-conn{margin:0 0 10px;padding:10px 14px;border-radius:8px;border:1px solid rgba(255,179,107,.35);background:rgba(255,179,107,.08);font-size:12px;line-height:1.5;color:#ffb36b}

/* 열린 게임 목록(원본 .minigameArea .section 칸) */
.tr-mg .mg-note{margin:0 0 10px;padding:12px 14px;border-radius:8px;border:1px solid rgba(13,192,212,.3);background:rgba(13,192,212,.06);font-size:13px;line-height:1.5;color:var(--font-color);word-break:keep-all}
.tr-mg .mg-cat{margin:0 0 10px}
.tr-mg .mg-cat .section{margin:0}
.tr-mg .mg-cat .section .sTitle span{font-family:'p6';font-size:13px}
.tr-mg .mg-cat .section ul.mg-glist{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:5px}
.tr-mg .mg-cat .section ul.mg-glist li{height:auto;min-height:54px;padding:8px 12px}
.tr-mg .mg-cat .section ul.mg-glist li .name{font-family:'p6';font-size:13px}
.tr-mg .mg-cat .section ul.mg-glist li .name small{display:block;margin-top:3px;overflow:hidden;font-family:'p4';font-size:11px;color:var(--939393);text-overflow:ellipsis}
.tr-mg .mg-cat .section ul.mg-glist li .rate{color:var(--38ffa8)}
.tr-mg .mg-cat .section ul.mg-glist li .rate.mg-off{color:var(--939393)}
.tr-mg .mg-cat .section ul.mg-glist li:focus-visible,.tr-mg .mg-board .section ul li:focus-visible{outline:2px solid var(--38ffa8);outline-offset:-2px}

/* 영상 칸(원본 .videoWrap) — 시계 줄은 원본 .clockArea */
.tr-mg .videoWrap .clockArea{gap:12px}
.tr-mg .videoWrap .clockArea .gameTitle{overflow:hidden;min-width:0;white-space:nowrap;text-overflow:ellipsis}
.tr-mg .videoWrap .clockArea .gameTitle #gameRound{margin-left:6px;font-size:14px}
.tr-mg .mg-clock{display:flex;flex:0 0 auto;align-items:center;gap:8px}
.tr-mg .mg-clock em{font-style:normal;font-size:12px;color:var(--aeae)}
.tr-mg .mg-clock em[data-tone=open]{color:var(--38ffa8)}
.tr-mg .videoWrap .game-iframe{overflow:hidden;min-height:120px}
.tr-mg .videoWrap .game-iframe.mg-has-frame{background:#000}
.tr-mg .videoWrap .game-iframe #game_frame{position:absolute;top:0;left:0;border:0;transform-origin:0 0}
.tr-mg .videoWrap .game-iframe .btnResize{z-index:2;cursor:pointer}
/* 영상이 없는 게임(자체 추첨 · 공급사 화면 미연결): 최근 결과 */
.tr-mg .mg-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:240px;padding:24px 16px;text-align:center;word-break:keep-all}
.tr-mg .mg-stage small{font-size:12px;color:var(--aeae)}
.tr-mg .mg-stage b{font-family:'p7';font-weight:normal;font-size:26px;line-height:1.3;color:var(--font-color)}
.tr-mg .mg-stage b.mg-stage-none{font-family:'p6';font-size:16px;color:var(--aeae)}
.tr-mg .mg-stage p{font-size:11px;color:var(--939393)}
.tr-mg .mg-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.tr-mg .mg-chips span{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:15px;background:var(--black);font-family:'p6';font-size:12px;color:var(--38ffa8)}
.tr-mg .mg-chips span em{font-family:'p4';font-style:normal;color:var(--aeae)}
.tr-mg .mg-chips span.mg-miss{color:var(--939393)}

/* 공급사 · 회차 연결 상태 줄 */
.tr-mg .mg-src{display:flex;align-items:center;gap:8px;margin:-2px 0 0;padding:0 4px;font-size:12px;line-height:1.5;color:var(--aeae);word-break:keep-all}
.tr-mg .mg-pill{flex:0 0 auto;padding:0 10px;border-radius:11px;background:var(--black);font-family:'p6';font-size:11px;line-height:22px;color:#ffb36b}
.tr-mg .mg-pill[data-tone=open]{color:var(--38ffa8)}

/* 목록 제목 */
.tr-mg .mg-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:18px 0 10px 10px}
.tr-mg .mg-head h3{font-family:'p6';font-weight:normal;font-size:16px;color:var(--font-color)}
.tr-mg .mg-head small{font-size:12px;color:var(--939393)}

/* 배당 칸(원본 .minigameArea .section · 잠금 .betting_lock) */
.tr-mg .mg-board{min-height:130px}
.tr-mg .mg-mks{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.tr-mg .mg-mks .section.mg-wide{grid-column:1 / -1}
.tr-mg .mg-board .section ul.mg-gridn{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.tr-mg .mg-board .section ul li .rate{font-variant-numeric:tabular-nums}
.tr-mg .mg-board .betting_lock{min-height:130px}
.tr-mg .mg-board .betting_lock .line-center{font-size:18px}
.tr-mg .mg-board .betting_lock .line-center .iconfont{height:40px;margin:0 0 8px;font-size:38px}
.tr-mg .mg-board .betting_lock .line-center small{margin-top:4px;padding:0 12px;font-family:'p4';font-size:12px;color:var(--aeae);word-break:keep-all}
.tr-mg .mg-empty{padding:30px 10px;border-radius:10px;background:var(--3838);font-size:13px;color:var(--aeae);text-align:center}

/* 내 베팅(원본 미니게임 리스트 .betGameList) */
.tr-mg .mg-bets{margin:20px 0 0}
.tr-mg .mg-bets .betTitle{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px}
.tr-mg .mg-bets .betTitle h3.title{margin:0 0 0 10px}
.tr-mg .mg-bets .betTitle #listReload{float:none;width:auto;margin:0;padding:0 12px}
.tr-mg .mg-bets .inner dd ul li{text-overflow:ellipsis}
.tr-mg .mg-bets .mg-bets-msg{padding:24px 10px;font-size:13px;color:var(--aeae);text-align:center}
.tr-mg .mg-bets .mg-bets-msg a{margin-left:6px;color:var(--38ffa8);text-decoration:underline}
.tr-mg .mg-more{margin:8px 10px 0;font-size:12px;text-align:right}
.tr-mg .mg-more a{color:var(--aeae);text-decoration:underline}
.tr-mg .mg-more a:hover{color:var(--38ffa8)}
.tr-mg .event-result-lose{color:#ff6b6b}

/* 최근 결과(원본 .game_data.result + .tables) */
.tr-mg .game_data.mg-res{margin-top:0;padding:6px 10px}
.tr-mg .mg-res .tables col.c-no{width:120px}
.tr-mg .mg-res .tables col.c-at{width:110px}
.tr-mg .mg-res .tables col.c-sum{width:38%}
.tr-mg .mg-res .tables th{font-weight:normal;color:var(--aeae)}
.tr-mg .mg-res .tables td.mg-sum{font-family:'p6';color:var(--font-color)}
.tr-mg .mg-res .tables td.mg-win{overflow:hidden;color:var(--38ffa8);white-space:nowrap;text-overflow:ellipsis}
.tr-mg .mg-res .tables td.no-data{height:70px;color:var(--aeae)}
.tr-mg .mg-res .mg-empty{background:none}
.tr-mg .mg-rule{margin:14px 10px 0;font-size:11px;line-height:1.6;color:var(--939393);word-break:keep-all}

/* 슬립(원본 #right) — 고른 항목의 마감 글자 · 한 항목 안내 */
#right #picklist li.mg-pk .mg-pk-msg{margin:6px 10px 0;font-size:11px;line-height:1.5;color:var(--38ffa8)}
#right #picklist li.mg-pk .mg-pk-msg.is-off,#right #picklist li.mg-pk .mg-pk-msg.is-warn{color:#ffb36b}
#right #picklist li.mg-pk.tr-pk-off{opacity:.7}
#right #picklist li.mg-pk .delete{cursor:pointer}
#right #picklist li.mg-pk .selInfo .rate.tr-up{color:#38ffa8}
#right #picklist li.mg-pk .selInfo .rate.tr-dn{color:#ff4d6d}
#right #mgAvailWon{font-style:normal}
#right .mg-slip-note{margin:8px 0 10px;font-size:11px;line-height:1.5;color:var(--939393);word-break:keep-all}

/* 밝은 테마 */
[data-theme-mode=light] .tr-mg .mg-state,[data-theme-mode=light] .tr-mg .mg-empty{background:#e8eff8;color:#64748b}
[data-theme-mode=light] .tr-mg .mg-res .mg-empty{background:none}
[data-theme-mode=light] .tr-mg .mg-state[data-kind=err] b{color:#c2410c}
[data-theme-mode=light] .tr-mg .mg-conn{border-color:rgba(194,65,12,.3);background:#fff7ed;color:#c2410c}
[data-theme-mode=light] .tr-mg .mg-note{border-color:#c7d7ee;background:#f1f6fd}
[data-theme-mode=light] .tr-mg .tabTitle a .mg-n,[data-theme-mode=light] .tr-mg .mg-cat .section ul.mg-glist li .rate,[data-theme-mode=light] .tr-mg .mg-clock em[data-tone=open],[data-theme-mode=light] .tr-mg .mg-pill[data-tone=open],[data-theme-mode=light] .tr-mg .mg-chips span,[data-theme-mode=light] .tr-mg .mg-res .tables td.mg-win{color:var(--126e51)}
[data-theme-mode=light] .tr-mg .tabTitle.depth1 a:not(.on) .mg-n,[data-theme-mode=light] .tr-mg .mg-cat .section ul.mg-glist li .rate.mg-off,[data-theme-mode=light] .tr-mg .mg-chips span.mg-miss{color:#94a3b8}
[data-theme-mode=light] .tr-mg .mg-pill,[data-theme-mode=light] .tr-mg .mg-chips span{background:#fff}
[data-theme-mode=light] .tr-mg .mg-pill{color:#c2410c}
[data-theme-mode=light] .tr-mg .videoWrap .clockArea .mg-clock em{color:#fff}
[data-theme-mode=light] .tr-mg .event-result-lose{color:#dc2626}
[data-theme-mode=light] #right #picklist li.mg-pk .mg-pk-msg{color:var(--126e51)}
[data-theme-mode=light] #right #picklist li.mg-pk .mg-pk-msg.is-off,[data-theme-mode=light] #right #picklist li.mg-pk .mg-pk-msg.is-warn{color:#c2410c}

/* 모바일(원본 module.css 모바일 절은 .videoWrap 을 좌우 끝까지 편다) */
[device-mode=mobile] .tr-mg .mg-state{min-height:180px;padding:28px 14px}
[device-mode=mobile] .tr-mg .mg-cat .section ul.mg-glist{grid-template-columns:1fr}
[device-mode=mobile] .tr-mg .mg-mks{grid-template-columns:1fr}
[device-mode=mobile] .tr-mg .videoWrap .clockArea{padding:0 10px}
[device-mode=mobile] .tr-mg .videoWrap .clockArea .gameTitle{font-size:13px}
[device-mode=mobile] .tr-mg .videoWrap .clockArea .gameTitle #gameRound{font-size:12px}
[device-mode=mobile] .tr-mg .mg-clock em{display:none}
[device-mode=mobile] .tr-mg .mg-stage{min-height:200px}
[device-mode=mobile] .tr-mg .mg-stage b{font-size:20px}
[device-mode=mobile] .tr-mg .mg-src{padding:0 2px}
[device-mode=mobile] .tr-mg .mg-head{margin:14px 0 8px 2px}
[device-mode=mobile] .tr-mg .mg-bets .inner .row .grid4 li{gap:2px}
[device-mode=mobile] .tr-mg .mg-bets .inner .row .grid4 li small{font-size:10px;color:var(--939393)}
[device-mode=mobile] .tr-mg .mg-bets .inner .row .selected{padding:8px 10px;line-height:1.5;word-break:keep-all}
[device-mode=mobile] .tr-mg .mg-bets .inner .row .mg-bet-res{margin:6px 2px 0;font-size:11px;color:var(--aeae)}
[device-mode=mobile] .tr-mg .game_data.mg-res{padding:0;background:none}
[device-mode=mobile] .tr-mg .mg-res .tables col.c-no{width:76px}
[device-mode=mobile] .tr-mg .mg-res .tables td{height:auto;min-height:35px;padding:8px 6px;line-height:1.4;white-space:normal;word-break:keep-all}
[device-mode=mobile] .tr-mg .mg-res .tables td small{display:block;margin-top:3px;font-size:10px}
[device-mode=mobile] .tr-mg .mg-res .tables td small.mg-at{color:var(--939393)}
[device-mode=mobile] .tr-mg .mg-res .tables td.mg-sum b{font-weight:normal}
[device-mode=mobile] .tr-mg .mg-res .tables td.mg-sum small.mg-win{font-family:'p4';font-size:11px;color:var(--38ffa8)}
[data-theme-mode=light][device-mode=mobile] .tr-mg .mg-res .tables td.mg-sum small.mg-win{color:var(--126e51)}
[device-mode=mobile] .tr-mg .mg-rule{margin:12px 2px 0}
