#customerCenter,#lobby .br-lobby-actions button,#lobby .br137-record,.br222-rank-ribbon,
.help-panel button,.store-referral button,
/* G088 W008: fixed-pixel chamfers, generated from each panel's actual size. */
.glass, .jack, .room-badge, .room-card, .tour-card,
.stat-grid article, .sentiment, .players, .mini-chart,
.seed-box, .odds, .direction, .service article, .service > strong,
.profile-row button, .money button, .account button, .room-card button, #tourGrid .tour-card>button,
.preset-row button, .game-actions > button, header button,
.players nav button, #startGate button, #modal, #modal button,
#modal input, #notice {
  --frame-color: #4ddfff;
  --frame-cut: 10;
  background-color: transparent;
  background-image: var(--frame-image);
  background-origin: border-box;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
}
.jack, .context { --frame-color: #ffd65a; }
.seed-box { --frame-color: #b36cff; }
.direction.dd, .odds.down, .stat-grid article:nth-child(1),
.room-card:nth-child(1), .room-card:nth-child(1) button { --frame-color: #ff566f; }
.direction.ud, .odds.up, .stat-grid article:nth-child(2),
.room-card:nth-child(4), .room-card:nth-child(4) button { --frame-color: #48f2a5; }
.stat-grid article:nth-child(3), .room-card:nth-child(3),
.room-card:nth-child(3) button, .tour-card:nth-child(1), .tour-card:nth-child(3) { --frame-color: #ffd65a; }
.stat-grid article:nth-child(4), .tour-card:nth-child(2) { --frame-color: #b36cff; }
.odds.down > b, .stat-grid article:nth-child(1) > small { color: var(--red); }
.odds.up > b, .stat-grid article:nth-child(2) > small { color: var(--mint); }
.stat-grid article:nth-child(3) > small { color: var(--gold); }
.stat-grid article:nth-child(4) > small { color: #d4a8f4; }
.glass::before, .sentiment h3, .players h3 { color: #95efff; text-shadow: 0 0 6px #0b638866; }
.profile-row button, .money button, .account button,
.room-card button, #tourGrid .tour-card>button, .preset-row button, .game-actions > button,
#modal button, #modal input, #startGate button { --frame-cut: 6; }
header button, .players nav button { --frame-cut: 3; }
.preset-row button:nth-child(1) { --frame-color: #48f2a5; }
.preset-row button:nth-child(2) { --frame-color: #4ddfff; }
.preset-row button:nth-child(3) { --frame-color: #b36cff; }
.preset-row button:nth-child(4) { --frame-color: #ff5fa2; }
.preset-row button:nth-child(5) { --frame-color: #ffd65a; }
.preset-row button:nth-child(6) { --frame-color: #ff566f; }
#modal.warning { --frame-color: #ff566f; }
@media (hover: hover) {
  .money button:hover:not(:disabled), .account button:hover:not(:disabled),
  .room-card button:hover:not(:disabled), .profile-row button:hover:not(:disabled),
  .game-actions > button:hover:not(:disabled), #modal button:hover:not(:disabled) { filter: brightness(1.18); }
}

/* Value-driven donuts; outer panel geometry is preserved. */
.core-dials i { position: relative; width: 80px; height: 88px; border: 0; border-radius: 0; display: block; text-align: center; color: #83e9ff; }
.core-dials i:nth-child(2) { color: var(--mint); }
.core-dials i:nth-child(3) { color: var(--red); }
.core-dials svg { display: block; width: 80px; height: 75px; }
.core-dials b { position: absolute; top: 24px; left: 0; width: 100%; font-size: 19px; line-height: 24px; color: #f1fbff; }
.dial-label { display: block; font-size: 12px; font-weight: 800; line-height: 13px; }
.dial-track { stroke: #1a3a4c; stroke-width: 12; fill: none; stroke-linecap: round; }
.dial-progress { stroke: currentColor; stroke-width: 10; fill: none; stroke-linecap: round; }
.dial-rim { stroke: currentColor; stroke-opacity: .3; stroke-width: 1; fill: none; }
.metric { line-height:24px; }
.metric progress { width:62px; margin:0; justify-self:end; appearance: none; height: 9px; border: 1px solid #36786e; border-radius: 5px; background: #14312f; }
.metric progress::-webkit-progress-bar { background: #14312f; border-radius: 5px; }
.metric progress::-webkit-progress-value { background: var(--mint); border-radius: 5px; }
.metric progress::-moz-progress-bar { background: var(--mint); border-radius: 5px; }


.players nav button { border-style: solid; border-width: 1px; }
.sentiment > strong[data-signal="UP"], .ai-core h2[data-trend="상승 추세"] { color: var(--mint); }
.sentiment > strong[data-signal="DOWN"], .ai-core h2[data-trend="하락 추세"] { color: var(--red); }

/* Four independent rows within the original 300 x 656 right panel. */
.right-panel { display: grid; grid-template-rows: 168px 266px 150px 34px; gap: 6px; align-content: start; }
.sentiment { height: auto; margin: 0; padding: 10px 8px; display: grid; grid-template-rows: 18px minmax(0, 1fr) 17px 23px 14px; gap: 3px; }
.sentiment h3 { line-height: 18px; font-size: 13px; }
.sentiment h4 { line-height: 17px; font-size: 13px; }
.sentiment > strong { line-height: 23px; font-size: 20px; }
.sent-ring { position: relative; width: 240px; max-width: 100%; height: 100%; min-height: 0; margin: 0 auto; border: 0; border-radius: 0; background: none; }
.sent-ring svg { display: block; width: 100%; height: 100%; }
.sent-ring b { position: absolute; left: 0; bottom: 1px; width: 100%; font-size: 34px; line-height: 37px; color: #f0fbff; }
.sent-leds { display: flex; gap: 2px; width: 220px; max-width: 100%; height: 14px; margin: 0 auto; align-items: center; }
.sent-leds span { flex: 1; height: 10px; background: #143548; border: 1px solid #285568; }
.sent-leds span.lit { background: #25cbed; border-color: #69e2ff; }
.sent-leds span.lit:nth-child(-n+3) { background: #ff566f; border-color: #ff8394; }
.players { height: auto; margin: 0; padding: 5px 6px; display: grid; grid-template-rows: 14px 104px 16px; gap: 2px; }
.players h3 { margin: 0; line-height: 14px; }
.players nav { height: 16px; margin: 0; }
.players nav button { height: 16px; padding: 0 7px; line-height: 14px; }
.player-row { font-size: 10px; line-height: 13px; }
.player-bets { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0 3px; }
.player-bet { display: inline-flex; gap: 3px; align-items: center; }
.player-side { font-size: 10px; font-weight: 800; }
.player-side.up-text { color: #48f2a5; -webkit-text-fill-color: #48f2a5; }
.player-side.down-text { color: #ff566f; -webkit-text-fill-color: #ff566f; }
.player-amount { color: #f0fbff; -webkit-text-fill-color: #f0fbff; }
.game-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-actions > button { width: 100%; height: 34px; margin: 0; padding: 0 6px; border-style: solid; border-width: 1px; font-size: 13px; font-weight: 700; }

/* Central readouts occupy separate rows above the candle plot. */
.round-counter { position: absolute; left: 286px; top: 0; width: 166px; text-align: center; color: #ffb347; font-size: 19px; line-height: 23px; z-index: 9; }
.round-timer { top: 24px; height: 98px; padding-top: 25px; --timer-color:#b36cff; transform-origin:83px 49px; }
.round-timer strong { margin-top: 0; line-height: 30px; }
.round-timer small { line-height: 21px; font-size:16px; font-weight:800; color:var(--timer-color); }
.center-pool { position: absolute; left: 210px; top: 269px; width: 320px; line-height: 24px; text-align: center; color: #8fefff; font-size: 16px; font-weight: 700; }
.center-pool b { margin-left: 8px; color: #ffb347; font-size: 21px; }
/* Each half has aligned ID / side / amount columns and a centre divider. */
.players #playerRows { column-gap: 0; background: linear-gradient(to right, transparent calc(50% - .5px), #39809a calc(50% - .5px), #39809a calc(50% + .5px), transparent calc(50% + .5px)); }
.player-row { display: grid; grid-template-columns: minmax(0,1fr) 79px; column-gap: 3px; padding-right: 6px; }
.player-row:nth-child(2n) { padding-left: 6px; padding-right: 0; }
.player-name { max-width: 100%; font-weight: 500; }
.player-bets { display: flex; flex-direction: column; align-items: stretch; width: 79px; }
.player-bet { display: grid; grid-template-columns: 22px 54px; gap: 3px; }
.player-side { text-align: center; font-size: 11px; }
.player-amount { text-align: right; font-variant-numeric: tabular-nums; font-size: 10px; }
/* Live leader effects continue with the confirmed winner through celebration. */
:is(.center-frame,.mini-chart.one,.mini-chart.sec).race-up { --race-ink: #48f2a5; --race-glow: rgba(72,242,165,.78); }
:is(.center-frame,.mini-chart.one,.mini-chart.sec).race-down { --race-ink: #ff566f; --race-glow: rgba(255,86,111,.78); }
:is(.center-frame,.mini-chart.one,.mini-chart.sec):is(.race-up,.race-down) { animation: race-outline 1.2s ease-in-out infinite; animation-delay:var(--race-delay,0s); }
:is(.center-frame,.mini-chart):is(.race-up,.race-down)::after { animation: race-inset 1.2s ease-in-out infinite; animation-delay:var(--race-delay,0s); }
@keyframes race-outline { 0%,100% { border-color: var(--race-glow); box-shadow: 0 0 6px var(--race-glow); } 50% { border-color: var(--race-ink); box-shadow: 0 0 18px var(--race-ink); } }
@keyframes race-inset { 0%,100% { box-shadow: inset 0 0 12px 2px var(--race-glow); } 50% { box-shadow: inset 0 0 48px 7px var(--race-glow), inset 0 0 7px 2px var(--race-ink); } }

/* G090: betting readouts and the clock remain within their own regions. */
.odds { height: 96px; padding-bottom: 14px; }
.odds span { line-height: 18px; }
.stat-grid small { font-weight: 800; }
.stat-grid em { font-size: 16px; font-weight: 800; line-height: 20px; white-space: nowrap; }
.stat-grid em.profit-up { color: #48f2a5; }
.stat-grid em.profit-down { color: #ff566f; }
.win-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; height: 48px; }
.win-counts { display: grid; grid-template-rows: 20px 20px; font-size: 12px; text-align: left; padding-left: 6px; }
.win-counts span { display: flex; align-items: center; justify-content: space-between; }
.win-counts span:first-child { color: #48f2a5; }
.win-counts span:last-child { color: #ff566f; }
.win-counts b { display: inline; font-size: 14px; margin: 0; }
.win-summary > b { margin: 0; font-size: 20px; }
#gameClock { position: absolute; right: 316px; top: 76px; width: 310px; text-align: right; font-size: 18px; line-height: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; z-index: 42; }

/* Only lit segments ripple; their count continues to show the actual AI score. */
#stage.in-game .sent-leds span.lit{animation:sent-wave 1.4s ease-in-out infinite;animation-delay:var(--wave-delay,0s)}
@keyframes sent-wave{0%,100%{transform:translateY(1px) scaleY(.72);filter:brightness(.9)}50%{transform:translateY(-1px) scaleY(1.12);filter:brightness(1.2)}}
@media(prefers-reduced-motion:reduce){#stage.in-game .sent-leds span.lit{animation:none}}

#gameDate{color:#fff}#gameTime{color:#ffb347}

/* G094: timer decoration follows the existing server phase, never drives it. */
.round-timer.urgent{--timer-color:#ff566f}
.round-timer.live{--timer-color:#48f2a5}
.round-timer .timer-rings{position:absolute;left:28px;top:-6px;width:110px;height:110px;color:var(--timer-color);fill:none;pointer-events:none}
.timer-track{stroke:currentColor;stroke-width:8;opacity:.22}
.timer-inner{stroke:currentColor;stroke-width:1.4;opacity:.75}
.timer-spin{stroke:currentColor;stroke-width:4.5;stroke-linecap:round;transform-origin:55px 55px;animation:timer-orbit 4s linear infinite}
@keyframes timer-orbit{to{transform:rotate(360deg)}}
.round-timer.live .timer-rings,.round-timer.live #phase{animation:timer-live 1.2s ease-in-out infinite;animation-delay:var(--race-delay,0s)}
@keyframes timer-live{0%,100%{filter:brightness(.75) drop-shadow(0 0 1px #48f2a5)}50%{filter:brightness(1.35) drop-shadow(0 0 6px #48f2a5)}}

/* G096: enlarge only the matching lobby title, keeping the game logo unchanged. */
#stage:not(.in-game) > .logo { left:192.5px; top:38px; width:981px; height:138px; }

/* G097: chart tools occupy the row above the live rail. */
#roomAmount{color:#ffb347}
.center-frame>#mainChart{height:370px}
#chartControls{pointer-events:auto;position:absolute;right:10px;top:269px;display:flex;gap:4px;z-index:10}
#chartControls button{height:23px;min-width:27px;border:1px solid #3c95ac;background:#061c2b;color:#8fefff;font-size:12px;font-weight:700;cursor:pointer}
#chartControls button:last-child{padding:0 7px}
.preset-row button,.direction{touch-action:manipulation;user-select:none}
.direction img{-webkit-user-drag:none}


/* G098: keep the title and orange room amount in a single row. */
.room-badge{display:flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}

/* G113: reduce the in-game central logo by 20%, keeping its center fixed. */
#stage.in-game>.logo{left:421.4px;top:47.2px;width:523.2px;height:73.6px}

/* G402: chart inset glow only; canvases and controls remain interactive. */
.center-frame::after,.mini-chart:is(.one,.sec)::after {content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;}
