/* RushCraft: страница голоса /voice в оформлении «Как в игре» (18.11.2026, просьба фаундера через главную).
   Разметка и id прежние: их ищет script.js сессии LiveKit, а строки участников, бумбоксов и треков (.participant,
   .participant-skin, .volume-indicator, .library-track-meta) он создаёт сам. Подключается после rc.css и rc-doc.css. */

.voice-page .container { max-width: 760px; min-height: calc(100vh - 230px); }
/* Вкладки в одну строку: на телефоне листаются вбок, а не встают столбиком на пол-экрана */
.voice-page .site-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.voice-page .site-tabs::-webkit-scrollbar { display: none; }
.voice-page .site-tab { flex: none; white-space: nowrap; }
.voice-page .header p { font: var(--seven-2)/1.3 var(--font-ui); color: var(--brand-text); }

/* Значки строкой */
.voice-page .ui-icon { width: 1.15em; height: 1.15em; display: inline-flex; align-items: center; justify-content: center; vertical-align: -0.2em; flex: none; }
.voice-page .ui-icon svg, .voice-page .participant-icon svg, .voice-page .volume-indicator svg { width: 100%; height: 100%; display: block; }
.voice-page .heading-icon { margin-right: 8px; color: var(--brand-text); }

/* Подписи и подсказки */
.voice-page .section label, .voice-page .mic-selector-container label { display: block; margin: 14px 0 8px; font: var(--seven-2)/1.2 var(--font-ui); color: var(--edge); }
.voice-page .section-hint { margin: 0 0 8px; color: var(--text-2); font-size: 16px; line-height: 1.45; }
.voice-page .status-text:empty { display: none; }
.voice-page .status-text { margin-top: 8px; line-height: 1.4; }

/* Первый шаг: крупный микрофон и пояснение */
.voice-hero { display: flex; gap: 14px; align-items: center; }
.voice-page .voice-hero__mic { flex: none; width: 64px; height: 64px; padding: 8px; color: var(--brand-ink); background: var(--brand);
  box-shadow: inset -4px -4px 0 #C2560F, inset 4px 4px 0 #FFB066, 0 0 0 3px var(--edge); }
.voice-hero h2 { margin: 0 0 4px; font: var(--ten-2)/1.1 var(--font-display); color: var(--edge); }
.voice-hero p { margin: 0; }
/* На телефоне крупный заголовок с микрофоном не влезает в строку: значок меньше, заголовок шрифтом кнопок */
@media (max-width: 599px) {
  .voice-hero { align-items: flex-start; gap: 12px; }
  .voice-page .voice-hero__mic { width: 44px; height: 44px; padding: 5px; }
  .voice-hero h2 { font: var(--seven-3)/1.1 var(--font-ui); }
}
.voice-page .voice-setup .input-field { margin-top: 0; }
.voice-page #connectToRoomBtn { width: 100%; margin-top: 14px; }

/* Три шага под формой */
.voice-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.voice-step { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.voice-step b { display: grid; place-items: center; flex: none; width: 32px; height: 32px; background: var(--slot); color: var(--edge);
  font: var(--seven-2)/1 var(--font-ui); box-shadow: inset 2px 2px 0 #C9B083, inset -2px -2px 0 #FFF9EC; }
.voice-step p { margin: 0; color: var(--text); font-size: 16px; line-height: 1.3; }
@media (max-width: 599px) { .voice-steps { grid-template-columns: 1fr; } }

/* Код подтверждения: крупные цифры в ячейке, команда под ними */
.voice-page .auth-code-card { margin: 14px 0; padding: 14px; text-align: center; background: var(--surface); box-shadow: inset 0 0 0 3px var(--frame); }
.voice-page .auth-code-card span { display: block; margin-bottom: 6px; color: var(--text-2); font: var(--seven-2)/1.2 var(--font-ui); }
.voice-page .auth-code-card strong { display: inline-block; padding: 8px 18px; letter-spacing: .18em; cursor: pointer; color: var(--edge);
  font: var(--ten-3)/1 var(--font-display); background: var(--slot); box-shadow: inset 3px 3px 0 #C9B083, inset -3px -3px 0 #FFF9EC; }
.voice-page .auth-code-card p { margin: 10px 0 0; color: var(--text-2); font-size: 16px; }
.voice-page .auth-code-card code { display: block; width: fit-content; max-width: 100%; margin: 10px auto 0; overflow-wrap: anywhere; }

/* Второстепенные кнопки — кремовые, как в игре */
.voice-page .secondary-btn { display: inline-block; min-height: 48px; margin: 10px 0 0; padding: 0 14px; border: 8px solid transparent; background: none;
  color: var(--edge); font: var(--seven-2)/1 var(--font-ui); text-decoration: none; cursor: pointer;
  border-image: var(--img-btn-cream) 4 fill / 8px / 0 stretch; image-rendering: pixelated; }
.voice-page .secondary-btn:hover { filter: brightness(1.04); }
.voice-page .secondary-btn:active { transform: translateY(1px); }
.voice-page .primary-btn { cursor: pointer; }
.voice-page .primary-btn:disabled, .voice-page .secondary-btn:disabled { filter: grayscale(1); opacity: .6; cursor: not-allowed; }
.voice-page a.primary-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.voice-page .input-field.locked { opacity: .8; cursor: not-allowed; }

/* Предупреждение для телефона: показ решает класс на <html> (скрипт в <head>) */
.voice-page .mobile-notice { display: none; margin: 0 0 16px; padding: 8px 12px 12px; border: 12px solid transparent;
  border-image: var(--img-modal) 4 fill / 12px / 0 stretch; image-rendering: pixelated; }
html.show-mobile-notice .voice-page .mobile-notice { display: block; }
.voice-page .mobile-notice h2 { margin: 4px 0 8px; font: var(--ten-2)/1.15 var(--font-display); color: var(--edge); }
.voice-page .mobile-notice p { margin: 0 0 12px; color: var(--text); font-size: 17px; line-height: 1.5; }
.voice-page .mobile-notice p:last-child { margin-bottom: 0; }
.voice-page .link-button { padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.voice-page .link-button:hover { color: var(--edge); }

/* Разговор */
.voice-page .call-controls { flex-direction: column; gap: 16px; }
.voice-bar { display: grid; gap: 12px; padding: 8px 12px 12px; border: 12px solid transparent;
  border-image: var(--img-modal) 4 fill / 12px / 0 stretch; image-rendering: pixelated; }
.voice-page .controls-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Кнопки-значки: оранжевые пиксельные, выключено — красные со значком с чертой. Только значок, без «вкл/выкл». */
.voice-page .control-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 16px; border: 0; cursor: pointer;
  font: var(--seven-2)/1 var(--font-ui); color: var(--brand-ink); background: var(--brand);
  box-shadow: inset -4px -4px 0 #C2560F, inset 4px 4px 0 #FFB066, 0 0 0 3px var(--edge); transition: transform .1s var(--ease-out); }
.voice-page .control-btn:hover { background: #FF9A44; }
.voice-page .control-btn:active { transform: translateY(2px); box-shadow: inset 4px 4px 0 #C2560F, inset -4px -4px 0 #FFB066, 0 0 0 3px var(--edge); }
.voice-page .control-btn:focus-visible { outline: 3px solid var(--edge); outline-offset: 4px; }
.voice-page .control-btn .ui-icon { width: 26px; height: 26px; }
.voice-page .icon-toggle { width: 56px; padding: 0; }
.voice-page .icon-toggle .icon-off { display: none; }
.voice-page .icon-toggle.is-off, .voice-page .control-btn.exit { color: #FFF6E8; background: #D9301F; box-shadow: inset -4px -4px 0 #9E1E12, inset 4px 4px 0 #F06A5A, 0 0 0 3px var(--edge); }
.voice-page .icon-toggle.is-off:hover, .voice-page .control-btn.exit:hover { background: #E8402E; }
.voice-page .icon-toggle.is-off .icon-on { display: none; }
.voice-page .icon-toggle.is-off .icon-off { display: inline-flex; }
.voice-page .control-btn.exit { margin-left: auto; }
@media (max-width: 599px) { .voice-page .control-btn.exit { margin-left: 0; flex: 1 1 100%; } }

/* Есть ли игрок на сервере Minecraft: цвет строки ставит script.js (зелёный и красный), здесь он темнее для бежевого */
.voice-page .game-status { padding: 10px 12px; text-align: center; font-size: 17px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); color: var(--text-2); }
.voice-page .game-status span[style*="34, 197, 94"], .voice-page .game-status span[style*="22c55e"] { color: var(--ok) !important; }
.voice-page .game-status span[style*="239, 68, 68"], .voice-page .game-status span[style*="ef4444"] { color: #C62F21 !important; }
.voice-page #minecraftConnectContainer:empty { display: none; }
.voice-page #minecraftConnectContainer { padding: 12px; text-align: center; background: var(--surface); box-shadow: inset 0 0 0 3px var(--frame); }
.voice-page #minecraftConnectContainer p { margin: 0 0 10px; color: var(--text); font-size: 17px; }
.voice-page #minecraftConnectContainer .primary-btn { width: 100%; }

/* Цвет строки бумбоксов и библиотеки ставит script.js (голубой, зелёный, красный, жёлтый): на бежевом темнее */
.voice-page #boomboxAudioStatus[style*="147, 197, 253"], .voice-page #trackLibraryStatus[style*="147, 197, 253"],
.voice-page #boomboxAudioStatus[style*="93c5fd"], .voice-page #trackLibraryStatus[style*="93c5fd"] { color: var(--text-2) !important; }
.voice-page #boomboxAudioStatus[style*="34, 197, 94"], .voice-page #trackLibraryStatus[style*="34, 197, 94"] { color: var(--ok) !important; }
.voice-page #boomboxAudioStatus[style*="239, 68, 68"], .voice-page #trackLibraryStatus[style*="239, 68, 68"] { color: #C62F21 !important; }
.voice-page #boomboxAudioStatus[style*="245, 158, 11"], .voice-page #trackLibraryStatus[style*="245, 158, 11"] { color: var(--brand-text) !important; }

/* Выбор микрофона */
.voice-page .mic-selector-container { padding: 8px 12px 12px; border: 12px solid transparent; border-image: var(--img-modal) 4 fill / 12px / 0 stretch; image-rendering: pixelated; }
.voice-page .mic-selector-container label { margin-top: 2px; }
.voice-page .mic-selector { width: 100%; min-height: 52px; padding: 0 44px 0 14px; border: 0; cursor: pointer; appearance: none; -webkit-appearance: none;
  color: var(--text); font: 17px var(--font-text);
  background: var(--surface-2) var(--ico-chevron) no-repeat right 14px center / 16px 16px;
  box-shadow: inset 0 0 0 2px var(--edge), inset 3px 3px 0 #E3CFA6; }
.voice-page .mic-selector:focus { outline: none; box-shadow: inset 0 0 0 3px var(--brand-2), inset 3px 3px 0 #E3CFA6; }
.voice-page .mic-selector option { color: var(--text); background: var(--surface-2); }

/* Рация (только на компьютере) */
.voice-page .ptt-container { padding: 8px 12px 12px; border: 12px solid transparent; border-image: var(--img-modal) 4 fill / 12px / 0 stretch; image-rendering: pixelated; }
.voice-page .ptt-label { display: flex; gap: 12px; align-items: center; cursor: pointer; color: var(--edge); font: var(--seven-2)/1.25 var(--font-ui); }
.voice-page .ptt-checkbox { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--brand-2); cursor: pointer; }
.voice-page .ptt-key-selector { flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--line); }
.voice-page .ptt-key-selector label { margin: 0; color: var(--text-2); }
.voice-page .ptt-key-button { min-width: 88px; min-height: 52px; padding: 0 18px; border: 0; cursor: pointer; color: var(--edge); font: var(--seven-3)/1 var(--font-ui);
  background: var(--slot); box-shadow: inset 3px 3px 0 #C9B083, inset -3px -3px 0 #FFF9EC; align-self: flex-start; }
.voice-page .ptt-key-button.listening { box-shadow: inset 0 0 0 3px var(--brand-2); animation: rc-voice-pulse 1.2s infinite; }
.voice-page .ptt-key-display { color: var(--text-2); font-size: 16px; }
@keyframes rc-voice-pulse { 50% { opacity: .55; } }
.ptt-active-indicator { position: fixed; right: 16px; bottom: 88px; z-index: 1000; padding: 12px 16px; color: var(--brand-ink); background: var(--brand);
  font: var(--seven-2)/1 var(--font-ui); box-shadow: inset -4px -4px 0 #C2560F, inset 4px 4px 0 #FFB066, 0 0 0 3px var(--edge); }
@media (min-width: 900px) { .ptt-active-indicator { bottom: 20px; } }

/* Списки: кто рядом, бумбоксы, треки. Строки создаёт script.js. */
.voice-page .participants-section h3 { display: flex; align-items: center; margin: 4px 0 10px; font: var(--seven-2)/1.2 var(--font-ui); color: var(--edge); }
.voice-page .participants-list { display: grid; gap: 8px; margin-top: 8px; }
.voice-page .participants-list:empty { display: none; }
.voice-page .participant { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--text); font-size: 17px; line-height: 1.35;
  background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--line); overflow-wrap: anywhere; }
.voice-page .participant-skin { width: 36px; height: 36px; flex: none; image-rendering: pixelated; background: var(--slot); box-shadow: 0 0 0 2px var(--edge); }
.voice-page .participant-icon { width: 30px; height: 30px; flex: none; color: var(--text-2); }
.voice-page .participant-name { flex: 1; min-width: 0; }
.voice-page .volume-indicator { width: 24px; height: 24px; flex: none; color: var(--brand-text); }
.voice-page .boombox-audio-btn { display: inline-block; }
.voice-page .library-track-meta { display: block; margin-top: 4px; color: var(--text-2); font-size: 15px; }

/* Окно библиотеки треков */
.voice-page .modal-overlay { position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; padding: 16px; background: rgba(42, 22, 6, .6); }
.voice-page .modal-panel { width: min(720px, 100%); max-height: min(86vh, 760px); overflow: auto; padding: 8px 12px 12px; border: 12px solid transparent;
  border-image: var(--img-modal) 4 fill / 12px / 0 stretch; image-rendering: pixelated; }
.voice-page .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.voice-page .modal-header h3 { display: flex; align-items: center; margin: 0; font: var(--ten-2)/1.15 var(--font-display); color: var(--edge); }
.voice-page .modal-close-btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; cursor: pointer; color: var(--edge);
  background: var(--slot); box-shadow: inset 3px 3px 0 #C9B083, inset -3px -3px 0 #FFF9EC; }
.voice-page .modal-close-btn .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.voice-page .track-library-modal .input-field { margin-top: 8px; }
.voice-page .library-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 8px; }
.voice-page .library-add-row .input-field { margin-top: 0; }
.voice-page .track-library-modal .participants-list { max-height: 320px; overflow: auto; }
@media (max-width: 599px) {
  .voice-page .library-add-row { grid-template-columns: 1fr; }
  .voice-page .modal-overlay { padding: 8px; align-items: stretch; }
  .voice-page .modal-panel { max-height: none; }
}

/* Тёмная тема: тени ячеек и рамок тёмные, как в остальной ночной теме rc.css */
:root[data-theme="night"] .voice-page .auth-code-card strong,
:root[data-theme="night"] .voice-page .voice-step b,
:root[data-theme="night"] .voice-page .ptt-key-button,
:root[data-theme="night"] .voice-page .modal-close-btn { box-shadow: inset 3px 3px 0 #0E0F12, inset -3px -3px 0 #33343E; }
:root[data-theme="night"] .voice-page .mic-selector { box-shadow: inset 0 0 0 2px #3A3B46, inset 3px 3px 0 #0E0F12; }
:root[data-theme="night"] .voice-page .control-btn,
:root[data-theme="night"] .voice-page .voice-hero__mic,
:root[data-theme="night"] .ptt-active-indicator { box-shadow: inset -4px -4px 0 #C2560F, inset 4px 4px 0 #FFB066, 0 0 0 3px #09090B; }
:root[data-theme="night"] .voice-page .icon-toggle.is-off,
:root[data-theme="night"] .voice-page .control-btn.exit { box-shadow: inset -4px -4px 0 #9E1E12, inset 4px 4px 0 #F06A5A, 0 0 0 3px #09090B; }
:root[data-theme="night"] .voice-page .game-status span[style*="239, 68, 68"],
:root[data-theme="night"] .voice-page .game-status span[style*="ef4444"] { color: #FF6B6B !important; }
:root[data-theme="night"] .voice-page .modal-overlay { background: rgba(0, 0, 0, .7); }
