/* Пульт на ноутбуке */

:root {
  --bg: #0b0b0d;
  --card: #141417;
  --card-2: #191a1e;
  --line: rgba(255, 255, 255, 0.08);
  --ink: #eceff3;
  --muted: #8b8f98;
  --accent: #f0f2f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.key {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.spacer {
  flex: 1;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7a2f2f;
  transition: background 0.2s ease;
}

.dot.on {
  background: #4cc86a;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 18px 20px 20px;
  min-height: 0;
  flex: 1;
}

.editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.62;
  outline: none;
  transition: border-color 0.15s ease;
}

textarea:focus {
  border-color: rgba(255, 255, 255, 0.22);
}

.editor-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px 0;
  font-size: 12px;
  color: var(--muted);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.13s ease, border-color 0.13s ease, transform 0.07s ease;
}

button:hover {
  background: #22242a;
}

button:active {
  transform: scale(0.98);
}

button.primary {
  background: var(--accent);
  border-color: transparent;
  color: #0b0b0d;
  font-weight: 620;
}

button.primary:hover {
  background: #fff;
}

button.wide {
  width: 100%;
  margin-top: 8px;
}

.progress {
  height: 6px;
  margin-top: 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.4s linear;
}

.meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-lbl {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--muted);
}

.field-lbl b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.field.inline .field-lbl {
  margin-bottom: 0;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}

.stepper input[type="range"] {
  flex: 1;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  border: none;
  border-radius: 50%;
  background: #eceff3;
}

input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #eceff3;
}

button.toggle {
  width: 90px;
  height: 34px;
}

button.toggle.on {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
}

.note {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.url {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e0e11;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: #cfd4dc;
  word-break: break-all;
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .side {
    flex-direction: row;
    overflow-x: auto;
  }

  .card {
    min-width: 300px;
  }
}

/* Подсказка, если пульт открыли на телефоне: экран суфлёра — другая страница. */
.phone-note {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 20px 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 214, 102, 0.3);
  border-radius: 10px;
  background: rgba(255, 214, 102, 0.08);
  font-size: 12.5px;
  line-height: 1.4;
  color: #f3dda6;
}

.phone-note a {
  color: #ffd666;
  font-weight: 620;
  white-space: nowrap;
  text-decoration: none;
}

@media (max-width: 900px) {
  .phone-note {
    display: flex;
  }
}
