/* style.css — scaffold: base styles, Pixi canvas mounting, debug/dev panels.
   All design chrome (pills, sheets, sysbar, modals, preloader) lives in tapium/*.css. */

html {
    font-size: 62.5%;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    color: rgba(0, 0, 0, 0.70);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* SSoT «островков» выделяемого текста и полей ввода.
   ⚠️ СПИСОК СЕЛЕКТОРОВ НИЖЕ ОБЯЗАН СОВПАДАТЬ С `ALLOW_SELECTOR`
   в presentation/ui/inputGuards.js (там же — обратная ссылка сюда): JS по этому
   же списку пропускает contextmenu/selectstart. Правишь один — правь второй,
   иначе элемент будет «выделяемым по событиям, но не выделяющимся по CSS»
   (или наоборот). Копии `user-select:text` на конкретных классах
   (.wf-version, .wf-pf-hex …) запрещены — они и есть механизм расхождения.
   Поля ввода (в т.ч. contenteditable-спан #bet-input) обязаны быть здесь:
   `user-select:none`, унаследованный от .pill/html, ломает каретку и выделение
   при вводе ставки.
   Специфичность: правило матчит САМ элемент, а `none` до него доходит только
   наследованием от html/body/.pill — прямое совпадение всегда сильнее
   наследуемого значения, поэтому HUD-кнопок (.pill, #sysbar, #logo …) это
   правило не касается: они не input и не помечены [data-selectable].
   `-webkit-touch-callout` наследуемое, поэтому `none` с html/body доходит до
   всех потомков сам — здесь его нужно только вернуть островкам. */
input,
textarea,
select,
option,
[contenteditable]:not([contenteditable="false"]),
[data-selectable] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

* { box-sizing: border-box; }

/* SSoT шрифта контролов: UA-стиль у button/input/select/textarea НЕ наследует
   font-family (Chromium/WebKit рисуют их системным Arial/-apple-system) — меню
   пинг-региона (.prm-*) шло мимо Inter и мимо подмножеств локалей. Одно правило
   здесь вместо `font-family: inherit` в каждом классе. Только family: размер/вес
   у контролов задают их собственные правила (font: inherit сдвинул бы вёрстку). */
button, input, select, textarea { font-family: inherit; }

/* Field: Pixi canvas is mounted here (PixiRenderer('volatiles-container')) */
#volatiles-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #FFFFFF;
}

body.lock-zoom #volatiles-container {
    touch-action: none;
}

.hidden {
    display: none !important;
}

/* --- DEBUG UI --- */
#debug-ui {
    position: absolute;
    top: 7rem;
    right: 2.4rem;
    background: rgba(10, 10, 25, 0.9);
    padding: 1.5rem;
    border-radius: 1.2rem;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid #333;
    backdrop-filter: blur(10px);
    width: 25.0rem;
    user-select: none;
    max-height: 85vh;
    overflow-y: auto;
    z-index: var(--z-debug);
    font-family: 'Segoe UI', sans-serif;
    font-size: 1.1rem;
}

#debug-ui::-webkit-scrollbar { width: 4px; }
#debug-ui::-webkit-scrollbar-thumb { background: #555; border-radius: 2px; }

.debug-section-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #555;
    border-bottom: 1px solid #333;
    padding-bottom: 0.3rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.debug-control-group { display: flex; flex-direction: column; gap: 0.4rem; }
.debug-control-group label { display: flex; justify-content: space-between; color: #aaa; font-size: 1rem; }
.debug-control-group label span { color: #0ff; font-weight: bold; }

.debug-control-group input[type="range"] {
    appearance: none;
    background: #222;
    height: 3px;
    border-radius: 2px;
    outline: none;
}

.debug-control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    background: #ff3296;
    border-radius: 50%;
    cursor: pointer;
}

.debug-graphs-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.debug-graph-item {
    display: flex;
    flex-direction: column;
}

.debug-graph-title {
    font-size: 0.9rem;
    color: #0ff;
    margin-bottom: 0.2rem;
    text-align: center;
    font-weight: bold;
}

#debugGraphCanvas, #debugTrendGraphCanvas {
    background: #0a0a14;
    border: 1px solid #222;
    border-radius: 0.6rem;
    width: 100%;
    height: 6.0rem;
}

.debug-graph-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #444;
    padding: 0 0.5rem;
}

.debug-stats {
    font-size: 1.2rem;
    color: #d4ff00;
    font-family: monospace;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.debug-btn-secondary {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #ccc !important;
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem;
}

.debug-btn-secondary:hover { background: rgba(255,255,255,0.1) !important; }

.debug-spike-rule {
    background: rgba(0,0,0,0.2);
    border: 1px solid #333;
    padding: 0.8rem;
    border-radius: 0.6rem;
    margin-bottom: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.debug-spike-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0ff;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.debug-btn-del {
    background: rgba(255,0,0,0.1) !important;
    color: #ff4466 !important;
    padding: 0.2rem 0.6rem !important;
    font-size: 0.8rem !important;
    border: 1px solid rgba(255,0,0,0.2) !important;
}

.debug-spike-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.debug-spike-inputs {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.debug-spike-inputs input {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    width: 3.5rem;
    text-align: center;
    border-radius: 0.3rem;
    font-size: 0.9rem;
    padding: 0.1rem;
}

.debug-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.debug-actions button {
    background: #707070;
    color: #EBEBEB;
    border: none;
    padding: 0.8rem;
    border-radius: 0.6rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.debug-actions button:hover { background: #808080; }
.debug-actions button:active { transform: scale(0.95); }

#debug-save-btn { background: var(--pink); color: #fff; }
#debug-save-btn:hover { background: #e60073; }

#debug-reset-btn { background: #444; color: #ccc; }
#debug-reset-btn:hover { background: #555; }

#debug-copy-btn {
    background: #00e5ff;
    color: #05050a;
}

#debug-copy-btn:hover { background: #00b8cc; }
#debug-copy-btn.copied { background: #00ff88; }
