/* Киоск всегда тёмный, независимо от настроек системы */
:root {
  --paper: #0d1218;
  --surface: #18212b;
  --ink: #f1f5f1;
  --ink-2: #aab5c0;
  --line: #2c3743;
  --line-strong: #435263;
  --in: #5fd3a6;
  --bad: #ff8f7c;
  --focus: #7aa7ff;
}
html, body { height: 100%; overflow: hidden; }
.kiosk { background: var(--paper); color: var(--ink); user-select: none; -webkit-user-select: none; }

/* подключение */
.setup { min-height: 100dvh; display: grid; place-items: center; padding: 20px; overflow: auto; }
.setup-box { width: min(440px, 100%); }
.form-error { min-height: 1.4em; }

/* рабочий экран */
.stage { position: fixed; inset: 0; overflow: hidden; background: #000; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage video.mirror { transform: scaleX(-1); }
.shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(5, 9, 13, 0.82) 0%, rgba(5, 9, 13, 0) 24%, rgba(5, 9, 13, 0) 58%, rgba(5, 9, 13, 0.8) 100%);
}

.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 22px 12px;
}
.clock { display: flex; align-items: baseline; gap: 14px; }
#clock { font-size: 44px; font-weight: 650; letter-spacing: -0.01em; line-height: 1; }
#date { font-size: 16px; }
.net { font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.net::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.net.ok::before { background: var(--in); }
.net.off::before { background: #f0b45a; }
.gear {
  background: rgba(24, 33, 43, 0.7); color: var(--ink-2); border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}

/* рамка-подсказка */
.frame {
  position: absolute; left: 50%; top: 46%; width: min(58vmin, 520px); aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: none;
}
.frame i { position: absolute; width: 18%; height: 18%; border: 0 solid rgba(95, 211, 166, 0.95); }
.frame i:nth-child(1) { left: 0; top: 0; border-left-width: 5px; border-top-width: 5px; border-top-left-radius: 8px; }
.frame i:nth-child(2) { right: 0; top: 0; border-right-width: 5px; border-top-width: 5px; border-top-right-radius: 8px; }
.frame i:nth-child(3) { left: 0; bottom: 0; border-left-width: 5px; border-bottom-width: 5px; border-bottom-left-radius: 8px; }
.frame i:nth-child(4) { right: 0; bottom: 0; border-right-width: 5px; border-bottom-width: 5px; border-bottom-right-radius: 8px; }

.prompt {
  position: absolute; left: 0; right: 0; bottom: max(34px, env(safe-area-inset-bottom));
  text-align: center; font-size: 24px; font-weight: 550; padding: 0 20px;
}

/* предупреждения */
.warnings { list-style: none; margin: 0; padding: 0; position: absolute; left: 22px; right: 22px; top: 86px; display: grid; gap: 8px; }
.warnings li {
  background: rgba(60, 38, 8, 0.92); border-left: 4px solid #f0b45a; color: #ffe2b0;
  padding: 10px 14px; border-radius: 3px; font-size: 15px;
}
.warnings li.bad { background: rgba(64, 24, 18, 0.94); border-color: var(--bad); color: #ffd3cb; }

/* результат отметки */
.result {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 28px max(30px, env(safe-area-inset-bottom));
  color: #fff; background: #1b7556;
  display: grid; gap: 4px;
  animation: rise 0.18s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.result.in { background: #1b7556; }
.result.out { background: #3d4f6b; }
.result.warn { background: #8a5200; }
.result.bad { background: #a02c1b; }
.r-tag { font-size: 15px; font-weight: 600; opacity: 0.9; min-height: 1.2em; }
.r-name { font-size: clamp(34px, 7vw, 60px); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; word-break: break-word; }
.r-title { font-size: clamp(26px, 5vw, 40px); font-weight: 600; }
.r-sub { font-size: 18px; opacity: 0.92; }

/* настройки */
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.info dt { color: var(--ink-2); }
.info dd { margin: 0; text-align: right; }
