/* CY_BORG — виртуальный стол */
#table-dlg { border: 0; padding: 0; background: #05060d; color: #fff; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow: auto; }
#table-dlg::backdrop { background: #000; }
.tv { display: grid; grid-template-rows: auto 1fr; min-height: 100%; background: radial-gradient(900px 500px at 50% 40%, rgba(255, 61, 180, .16), transparent 70%), #05060d; }
.tv-h { display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-bottom: 4px solid var(--y); background: #000; flex-wrap: wrap; }
.tv-h > div { margin-right: auto; }
.tv-h small { font-family: var(--f-pix); letter-spacing: .12em; text-transform: uppercase; color: var(--p); font-size: 12px; }
.tv-h h2 { margin: 0; font-family: var(--f-head); font-size: 34px; text-transform: uppercase; color: var(--y); line-height: 1; overflow-wrap: anywhere; }
.tv-st { font-family: var(--f-pix); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.tv .btn { border-color: #fff; }
.tv .btn.y { border-color: #000; }
.tv-main { display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.tv-table { position: relative; min-height: 560px; margin: 20px; }
.tv-surface {
  position: absolute; left: 16%; right: 16%; top: 14%; bottom: 14%; border-radius: 50%;
  background: repeating-linear-gradient(90deg, rgba(24, 230, 255, .1) 0 1px, transparent 1px 34px), repeating-linear-gradient(0deg, rgba(24, 230, 255, .1) 0 1px, transparent 1px 34px), radial-gradient(circle, #101a3a, #070b1c 70%);
  border: 4px solid var(--p); box-shadow: 0 0 0 8px #000, 0 0 0 11px var(--y), 0 0 60px rgba(255, 61, 180, .35) inset;
  display: grid; place-items: center;
}
.tv-center { text-align: center; padding: 10px; }
.tv-center small { display: block; font-family: var(--f-pix); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.tv-center b { display: block; font-family: var(--f-head); font-size: clamp(64px, 9vw, 120px); line-height: 1; color: var(--y); text-shadow: 3px 0 var(--p), -3px 0 var(--c); }
.tv-center span { font-family: var(--f-pix); font-size: 16px; opacity: .8; }
.seat {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 190px; z-index: 1;
  display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; text-align: left;
  background: #000; color: #fff; border: 3px solid var(--y); padding: 8px 10px; box-shadow: 4px 4px 0 var(--p); font: inherit; position: absolute;
}
button.seat { cursor: pointer; }
button.seat:hover { background: #14141c; }
button.seat:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.seat.gm { border-color: var(--p); box-shadow: 4px 4px 0 var(--y); }
.seat.me { background: #1a1600; }
.seat.off { opacity: .55; }
.seat.empty { border-style: dashed; border-color: rgba(255, 255, 255, .35); box-shadow: none; opacity: .5; display: block; text-align: center; background: transparent; }
.seat .emb { width: 44px; height: 44px; color: var(--y); }
.seat.gm .emb { color: var(--p); }
.seat .who { min-width: 0; display: grid; gap: 1px; }
.seat .who b { font-family: var(--f-head); font-size: 17px; text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; }
.seat .who small { font-size: 11px; opacity: .8; line-height: 1.2; overflow-wrap: anywhere; }
.seat .hp { display: block; position: relative; height: 14px; background: #222; margin-top: 3px; }
.seat .hp i { position: absolute; inset: 0 auto 0 0; background: var(--r); }
.seat .hp em { position: relative; font-style: normal; font-family: var(--f-pix); font-size: 11px; padding-left: 4px; }
.seat .dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #555; }
.seat .dot.on { background: #31ff7a; box-shadow: 0 0 8px #31ff7a; }
.tv-side { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: 16px; border-left: 4px solid var(--p); background: #000; min-height: 0; max-height: calc(100vh - 70px); }
.tv-sheet { max-height: 46vh; overflow: auto; border: 3px solid var(--y); padding: 8px; }
.tv-sheet .sheet { box-shadow: none; padding: 12px; }
.tv-sheet .sheet-grid { grid-template-columns: 1fr; }
.tv-sheet .sheet-h { grid-template-columns: 1fr; }
.tv-sheet .sheet-h .nm { font-size: 36px; overflow-wrap: break-word; }
.tv-sheet .sheet-h .cl { text-align: left; }
.tv-dice { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tv-dice .btn { min-width: 48px; min-height: 36px; justify-content: center; }
.tv-cnt { font-family: var(--f-pix); display: inline-flex; gap: 4px; align-items: center; }
.tv-cnt select { width: auto; padding: 6px; font-size: 14px; border-width: 2px; }
.tv-log { list-style: none; margin: 0; padding: 0; overflow: auto; border: 2px solid rgba(255, 255, 255, .25); min-height: 160px; font-size: 14px; }
.tv-log li { padding: 6px 10px; border-bottom: 1px dotted rgba(255, 255, 255, .2); overflow-wrap: anywhere; }
.tv-log .roll strong { color: var(--y); font-family: var(--f-head); font-size: 20px; }
.tv-log .roll i { font-style: normal; color: var(--p); font-family: var(--f-pix); }
.tv-log .say b { color: var(--c); }
.tv-log .say.gm b { color: var(--p); }
.tv-log .sys { opacity: .6; font-family: var(--f-pix); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
#tv-say { display: flex; gap: 8px; }
#tv-say input { font-size: 15px; padding: 8px 10px; border-width: 2px; }

@media (max-width: 980px) {
  .tv-main { grid-template-columns: 1fr; }
  .tv-side { border-left: 0; border-top: 4px solid var(--p); max-height: none; }
  .tv-log { max-height: 36vh; }
}
@media (max-width: 720px) {
  .tv-table { min-height: 0; margin: 12px; }
  .tv-surface { position: static; border-radius: 14px; margin-bottom: 14px; padding: 6px; }
  .tv-seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
  .seat { position: relative; left: auto; top: auto; transform: none; width: auto; }
}
@media print { #table-dlg { display: none !important; } }

/* уточнения раскладки */
.tv-side { display: flex; flex-direction: column; }
.tv-log { flex: 1 1 auto; }
#tv-say { flex: 0 0 auto; }
.tv-surface { left: 22%; right: 22%; top: 20%; bottom: 20%; }
@media (max-width: 1180px) {
  .tv-main { grid-template-columns: 1fr 300px; }
  .seat { width: 150px; grid-template-columns: 34px 1fr; padding: 6px 8px; }
  .seat .emb { width: 34px; height: 34px; }
  .seat .who b { font-size: 15px; }
}
@media (max-width: 980px) { .tv-main { grid-template-columns: 1fr; } }

/* голосовой чат */
.tv-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 20px; background: #05050a; border-bottom: 2px solid rgba(255, 255, 255, .15); font-family: var(--f-pix); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.tv-voice[hidden] { display: none; }
.tv-voice .vc { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 2px solid rgba(255, 255, 255, .3); background: #000; }
.tv-voice .vc i { width: 10px; height: 10px; border-radius: 50%; background: #555; }
.tv-voice .vc.talk { border-color: #31ff7a; box-shadow: 0 0 10px #31ff7a; }
.tv-voice .vc.talk i { background: #31ff7a; box-shadow: 0 0 8px #31ff7a; }
.tv-voice .vc small { opacity: .7; }
.tv-voice .vn { margin-left: auto; color: var(--p); }
@media (max-width: 700px) { .tv-voice { padding: 8px 12px; font-size: 11px; } }
