/* Halaman /ring: satu pertarungan, layar penuh. Token warna & tombol diambil dari styles.css. */
body.ringpage { overflow: hidden; height: 100vh; height: 100svh; }
.ring-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 10, 9, 0.82) 0%, rgba(11, 10, 9, 0) 26%, rgba(11, 10, 9, 0) 74%, rgba(11, 10, 9, 0.82) 100%),
    linear-gradient(0deg, rgba(11, 10, 9, 0.9) 0%, rgba(11, 10, 9, 0) 30%);
}
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(239, 230, 212, 0.06); }
.rg-status { font-size: 13.5px; color: var(--mute); display: flex; align-items: center; gap: 10px; }
.rg-status b { color: var(--text); font-weight: 600; }
.rg-status .pulse { flex: none; }

.rg { position: fixed; inset: 68px 0 0 0; z-index: 3; pointer-events: none; }
.rg > * { pointer-events: auto; }
.rg-tabs { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 5px; border-radius: 13px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.7); }
.rg-tabs button { height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-size: 13.5px; color: var(--mute); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.rg-tabs button i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.rg-tabs button[aria-pressed='true'] { background: rgba(239, 230, 212, 0.09); color: var(--text); }

.rk-card {
  position: absolute; top: 18px; width: 330px; max-height: calc(100% - 210px); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r); background: rgba(14, 12, 10, 0.86); padding: 20px;
  display: grid; gap: 16px; align-content: start;
}
.rk-card.east { left: 24px; }
.rk-card.west { right: 24px; }
.rk-side { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.14em; display: flex; justify-content: space-between; }
.rk-name { display: flex; align-items: baseline; gap: 10px; }
.rk-name b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.rk-name span { font: 600 15px/1 var(--mincho); color: var(--mute); }
.rk-model { font-size: 14px; color: var(--mute); margin-top: -10px; }
.rk-model i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.rk-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rk-big span { display: block; font-size: 12px; color: var(--dim); }
.rk-big b { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.rk-big small { display: block; font-size: 12px; color: var(--dim); }
.rk-rec { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); flex-wrap: wrap; }
.rk-rec b { color: var(--text); font-size: 16px; }
.rk-rec .hoshi { width: 9px; height: 9px; border-color: var(--text); }
.rk-rec .hoshi.w { background: var(--text); }
.rk-rec .hoshi.l { background: transparent; border-color: var(--dim); }
.rk-rec .hoshi.n { border-color: var(--line-2); }
.rk-rec .hoshi-row { gap: 3px; }
.rk-h { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 8px; }
.pos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pos li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pos li:first-child { border-top: 0; padding-top: 0; }
.pos .sym { font-weight: 600; }
.pos .pl { text-align: right; font-weight: 600; }
.pos .sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--dim); }
.pos .bar { grid-column: 1 / -1; position: relative; height: 4px; border-radius: 2px; background: var(--line); margin-top: 4px; }
.pos .bar i { position: absolute; top: -2px; width: 2px; height: 8px; background: var(--text); border-radius: 1px; }
.pos .bar .stop { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--down); border-radius: 2px; }
.pos .bar .tgt { position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: var(--up); border-radius: 2px; }
.rk-empty { font-size: 14px; color: var(--dim); margin: 0; }
.rk-note { margin: 0; font-size: 14px; color: var(--mute); line-height: 1.55; }
.rk-note q { color: var(--text); }
.rk-cash { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--mute); }
.rk-cash b { color: var(--text); font-weight: 600; }

.rg-bottom { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(720px, calc(100% - 760px)); min-width: 420px; display: grid; gap: 12px; }
.tug { border: 1px solid var(--line); border-radius: var(--r); background: rgba(14, 12, 10, 0.86); padding: 16px 20px; }
.tug-labels { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.tug-labels #tug-mid { color: var(--mute); font-weight: 500; }
.tug-track { position: relative; height: 22px; margin: 12px 0 8px; }
.tug-track::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line-2); }
.tug-edge { position: absolute; top: 2px; width: 3px; height: 18px; background: var(--clay); border-radius: 2px; }
.tug-edge.l { left: 0; } .tug-edge.r { right: 0; }
.tug-center { position: absolute; left: 50%; top: 5px; width: 1px; height: 12px; background: var(--dim); }
.tug-mark { position: absolute; top: 3px; left: 50%; width: 32px; height: 16px; margin-left: -16px; border-radius: 8px; transition: left 1s cubic-bezier(.2,.8,.2,1); background: linear-gradient(90deg, var(--e, #ccc) 50%, var(--w, #888) 50%); border: 2px solid var(--bg); }
.tug-note { margin: 0; font-size: 12.5px; color: var(--dim); }
.rg-log { list-style: none; margin: 0; padding: 0; max-height: 132px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(14, 12, 10, 0.86); }
.rg-log li { display: grid; grid-template-columns: 44px 120px 1fr; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.rg-log li:last-child { border-bottom: 0; }
.rg-log .t { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.rg-log .g { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-log .r { color: var(--mute); }

@media (max-width: 1180px) {
  .rk-card { width: 280px; }
  .rg-bottom { width: calc(100% - 640px); min-width: 0; }
}
@media (max-width: 960px) {
  body.ringpage { overflow: auto; height: auto; }
  #scene { position: fixed; height: 58vh; }
  .ring-veil { height: 58vh; background: linear-gradient(0deg, rgba(11, 10, 9, 1) 0%, rgba(11, 10, 9, 0) 40%); }
  .rg { position: relative; inset: auto; padding: 72px 16px 32px; display: grid; gap: 14px; pointer-events: auto; }
  .rg-tabs { position: relative; left: auto; top: auto; transform: none; overflow-x: auto; max-width: 100%; justify-self: start; }
  .rg-bottom { position: relative; left: auto; bottom: auto; transform: none; width: 100%; margin-top: calc(58vh - 190px); order: 2; }
  .rk-card { position: relative; top: auto; left: auto !important; right: auto !important; width: 100%; max-height: none; order: 3; }
  .rg-status { display: none; }
  .nav .btn-sm, .nav .icon-link { display: none; }
}
