/*
 * Стенд: живой сайт проекта в рамке устройства и ассистент поверх.
 * Тёмный графит студии, чтобы рамка и сайт были главными на экране.
 */
:root {
  --bg: #0c0f14;
  --panel: #151a22;
  --ink: #eef2f8;
  --muted: #8d97a8;
  --line: rgba(238, 242, 248, .09);
  --blue: #9dc0ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Montserrat, Inter, system-ui, sans-serif;
  background:
    radial-gradient(900px 600px at 50% 40%, #18202c 0, transparent 70%),
    radial-gradient(rgba(157, 192, 255, .07) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- верхняя полоса ---------- */
.bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 20, .7);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand svg { width: 28px; height: 28px; fill: none; stroke: var(--blue); stroke-width: 3; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 14px; letter-spacing: .08em; }
.brand small { font-size: 11.5px; color: var(--muted); }

.tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}
.tab i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--panel); color: var(--ink); border-color: rgba(157, 192, 255, .35); }

/* ---------- сцена ---------- */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 16px 16px;
}
.device {
  --w: 390px;
  --h: 844px;
  --bezel: 12px;
  --radius: 54px;
  --scale: 1;
  width: calc((var(--w) + var(--bezel) * 2) * var(--scale));
  height: calc((var(--h) + var(--bezel) * 2) * var(--scale));
  flex: none;
  position: relative;
}
.device[data-device="tablet"] { --w: 800px; --h: 1280px; --bezel: 20px; --radius: 38px; }
.device__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--w) + var(--bezel) * 2);
  height: calc(var(--h) + var(--bezel) * 2);
  padding: var(--bezel);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #2a303b, #12161d 60%, #232935);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07) inset,
    0 0 0 2px #050608,
    0 40px 90px rgba(0, 0, 0, .55),
    0 12px 30px rgba(0, 0, 0, .4);
  transform: scale(var(--scale));
  transform-origin: 0 0;
}
.device__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius) - var(--bezel));
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}
.device__screen iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.device__island {
  position: absolute;
  top: calc(var(--bezel) + 11px);
  left: 50%;
  width: 118px;
  height: 33px;
  margin-left: -59px;
  border-radius: 20px;
  background: #050608;
  pointer-events: none;
  z-index: 60;
}
.device[data-device="tablet"] .device__island { width: 10px; height: 10px; margin-left: -5px; top: calc(var(--bezel) / 2 - 5px); background: #0a0c10; box-shadow: 0 0 0 2px #1d222b; }
.device__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--panel);
  transition: opacity .4s ease;
  z-index: 1;
}
.device__loading span {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(157, 192, 255, .2);
  border-top-color: var(--blue);
  animation: spin .9s linear infinite;
}
.device.is-loaded .device__loading { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(1turn); } }

.under {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}
.under__site { color: var(--muted); text-decoration: none; border-bottom: 1px dashed rgba(141, 151, 168, .5); }
.under__site:hover { color: var(--ink); }
.under__toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.under__toggle button {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.under__toggle button[aria-pressed="true"] { background: var(--panel); color: var(--ink); }
.under__ai, .under__voice, .under__voice label { display: flex; align-items: center; gap: 8px; }
.under__ai[hidden], .under__voice[hidden] { display: none; }
.under__usage { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.under__voice button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  font-size: 11px;
}
.under__ai select, .under__voice select {
  height: 32px;
  max-width: 260px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  max-width: min(92vw, 440px);
  padding: 12px 18px;
  border-radius: 14px;
  background: #1d2430;
  border: 1px solid rgba(157, 192, 255, .25);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .4s cubic-bezier(.2, .9, .25, 1);
  z-index: 10;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* На телефоне рамка не нужна: сайт во весь экран, ассистент поверх.
   То же по адресу с `full=1` — показать демо на настоящем планшете. */
@media (max-width: 640px) {
  .bar { padding: 8px 10px; gap: 10px; }
  .brand small { display: none; }
  .brand span { display: none; }
  .tab { height: 34px; padding: 0 12px; font-size: 13px; }
}
@media (max-width: 640px) { body { --full: 1; } }
body.is-full .stage, body.is-full .device, body.is-full .device__frame, body.is-full .device__screen, body.is-full .device__island, body.is-full .under { all: revert; }
body.is-full .stage { flex: 1; min-height: 0; display: flex; padding: 0; }
body.is-full .device { position: relative; flex: 1; width: 100% !important; height: auto !important; }
body.is-full .device__frame { position: absolute; inset: 0; }
body.is-full .device__screen { position: absolute; inset: 0; overflow: hidden; isolation: isolate; background: #fff; }
body.is-full .device__island, body.is-full .under { display: none; }
