/* Сайт на разных экранах (виджет screens) */
.scr { display: grid; gap: 14px; margin: 8px 0 32px; }
.scr [hidden] { display: none !important; }
.scr svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Адрес */
.scr__bar { display: flex; gap: 10px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.scr__url { position: relative; flex: 1; min-width: 0; }
.scr__url-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.scr__url input { width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text-strong); font: 500 17px/1 var(--mono); }
.scr__url input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.scr__go { height: 50px; padding: 0 24px; }
.scr__icon { display: inline-grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 12px; border: 1px solid var(--border-2); background: var(--bg); color: var(--muted); cursor: pointer; }
.scr__icon:hover { color: var(--green); border-color: var(--green); }
.scr__warn { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.scr__hist { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.scr__chip { font: 13px/1 var(--mono); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 11px; cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr__chip:hover { border-color: var(--green); color: var(--green); }
.scr__clear { font-size: 13px; color: var(--muted); background: none; border: 0; text-decoration: underline; cursor: pointer; }

/* Панель выбора */
.scr__panel { display: grid; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.scr__row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
.scr__seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.scr__seg button { border: 0; background: none; color: var(--muted); font: 600 14.5px/1 var(--font); padding: 10px 16px; border-radius: 9px; cursor: pointer; }
.scr__seg button.is-active { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px var(--green-line); }
.scr__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.scr__tool { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 500 14px/1 var(--font); cursor: pointer; }
.scr__tool:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.scr__tool:disabled { opacity: .4; cursor: default; }
.scr__tool.is-active { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.scr__zoom { padding: 0 4px 0 6px; }
.scr__zoom select { height: 38px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0 6px; }
.scr__zoom select option { background: var(--surface); color: var(--text); }
.scr__groups { display: flex; flex-wrap: wrap; gap: 8px; }
.scr__grp { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 600 14.5px/1 var(--font); cursor: pointer; }
.scr__grp:hover { border-color: var(--green-line); }
.scr__grp.is-active { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.scr__devs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.scr__dev { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i n" "i s"; gap: 2px 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
.scr__dev > svg, .scr__dev > .scr__chk { grid-area: i; color: var(--muted); }
.scr__dev-n { grid-area: n; font-weight: 600; font-size: 14.5px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr__dev-s { grid-area: s; font: 12.5px/1.2 var(--mono); color: var(--muted); }
.scr__dev:hover { border-color: var(--green-line); }
.scr__dev.is-active { border-color: var(--green); background: var(--green-soft); }
.scr__dev.is-active > svg { color: var(--green); }
.scr__chk { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--border-2); position: relative; }
.scr__dev.is-active .scr__chk { background: var(--green); border-color: var(--green); }
.scr__dev.is-active .scr__chk::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.scr__devs:has(.scr__devgrp) { grid-template-columns: 1fr; gap: 12px; }
.scr__devgrp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scr__devgrp .scr__dev { width: auto; }
.scr__devgrp-n { width: 100%; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.scr__hint { margin: 0; font-size: 13.5px; color: var(--muted); }
.scr__custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.scr__custom label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.scr__custom input { width: 110px; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg); color: var(--text-strong); font: 600 16px/1 var(--mono); }
.scr__custom input:focus { outline: none; border-color: var(--green); }
.scr__x { padding-bottom: 11px; color: var(--muted); }
.scr__bp { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; }

/* Сцена */
.scr__stage { position: relative; overflow: auto; min-height: 420px; padding: 32px; border-radius: var(--radius); border: 1px solid var(--border);
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 0) 0 0 / 22px 22px,
              radial-gradient(ellipse at 50% 0%, var(--green-soft), transparent 65%), var(--surface); }
.scr__stage:focus { outline: none; }
.scr__stage:fullscreen { background-color: var(--bg); padding: 24px; display: grid; align-items: center; }
.scr__row-dev { display: flex; justify-content: center; align-items: flex-end; gap: 36px; min-width: min-content; margin-inline: auto; }
.scr__stage.is-compare .scr__row-dev { justify-content: safe center; gap: 28px; }
.scr__stage.is-compare .scr__cell { width: min-content; }
.scr__stage.is-compare .scr__cap { font-size: 13px; gap: 3px 8px; }
.scr__stage.is-compare .dev__name { white-space: nowrap; }
.scr__cell { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.scr__fit { position: relative; flex: none; }
.scr__cap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; font-size: 14px; text-align: center; }
.dev__name { font-weight: 700; color: var(--text-strong); }
.dev__size { font: 13px/1 var(--mono); color: var(--muted); }
.dev__scale { font: 12px/1 var(--mono); color: var(--green); background: var(--green-soft); border: 1px solid var(--green-line); border-radius: 999px; padding: 3px 7px; }
.scr__empty { margin: 80px auto; text-align: center; color: var(--muted); max-width: 40ch; }

/* ---------- Устройства: рисуются в реальном размере, сцена уменьшает их через transform ---------- */
.dev { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: inline-flex; flex-direction: column; align-items: center; }
.dev__body { position: relative; background: #0e1011; box-shadow: 0 0 0 3px #2b3034, 0 0 0 5px #0a0b0c, 0 40px 90px rgba(0, 0, 0, .45); }
.dev__screen { position: relative; overflow: hidden; background: #fff; }
.dev__screen { display: flex; flex-direction: column; }
.dev__screen.has-sides { flex-direction: row; justify-content: center; background: #fff; }
.dev__vp { position: relative; flex: none; overflow: hidden; background: #fff; }
.dev__vp iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.dev__status { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; background: #fff; color: #000; font: 600 17px/1 -apple-system, 'SF Pro Text', 'Roboto', system-ui, sans-serif; }
.dev__status b { font-weight: 600; letter-spacing: -.01em; }
.dev__status--notch { padding: 0 30px 4px 40px; }
.dev__status--punch { padding: 0 20px; font: 500 14px/1 'Roboto', system-ui, sans-serif; }
.dev__status--home { padding: 0 8px; font-size: 12px; }
.dev__status--home b { position: absolute; left: 50%; transform: translateX(-50%); }
.dev__sicons { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.dev__sicons svg { width: 18px; height: 12px; fill: currentColor; stroke: none; }
.dev__status--punch .dev__sicons svg, .dev__status--home .dev__sicons svg { width: 14px; height: 10px; }
.dev__batt { position: relative; width: 26px; height: 13px; border-radius: 4px; border: 1.5px solid rgba(0, 0, 0, .4); }
.dev__batt::before { content: ""; position: absolute; inset: 1.5px; right: 5px; border-radius: 2px; background: #000; }
.dev__batt::after { content: ""; position: absolute; right: -4px; top: 3.5px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: rgba(0, 0, 0, .4); }
.dev__status--punch .dev__batt, .dev__status--home .dev__batt { width: 20px; height: 11px; }
.dev__ind { position: absolute; z-index: 2; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: rgba(0, 0, 0, .78); pointer-events: none; }
.dev.is-land .dev__ind { width: 200px; margin-left: -100px; }
.dev__load { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 40px; text-align: center; background: var(--surface); color: var(--muted); font: 500 30px/1.35 var(--font); }
.dev__load[hidden] { display: none; }
.dev__spin { width: 64px; height: 64px; border-radius: 50%; border: 7px solid var(--border-2); border-top-color: var(--green); animation: scr-spin .9s linear infinite; }
@keyframes scr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dev__spin { animation-duration: 3s; } }

/* телефон */
.dev--island .dev__body, .dev--notch .dev__body, .dev--punch .dev__body { padding: 15px; border-radius: 66px; }
.dev--island .dev__screen, .dev--notch .dev__screen, .dev--punch .dev__screen { border-radius: 52px; }
.dev--island .dev__body::before, .dev--notch .dev__body::before, .dev--punch .dev__body::before, .dev--home .dev__body::before { content: ""; position: absolute; left: -9px; top: 190px; width: 6px; height: 120px; border-radius: 4px 0 0 4px; background: #24282b; box-shadow: 0 -70px 0 -8px #24282b; }
.dev--island .dev__body::after, .dev--notch .dev__body::after, .dev--punch .dev__body::after, .dev--home .dev__body::after { content: ""; position: absolute; right: -9px; top: 240px; width: 6px; height: 140px; border-radius: 0 4px 4px 0; background: #24282b; }
.dev__cam { position: absolute; z-index: 2; background: #000; pointer-events: none; }
.dev__cam--island { top: 30px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; }
.dev__cam--notch { top: 15px; left: 50%; width: 172px; height: 34px; margin-left: -86px; border-radius: 0 0 22px 22px; background: #0e1011; }
.dev__cam--punch { top: 30px; left: 50%; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; box-shadow: inset 0 0 0 5px #15181a; }
.dev.is-land .dev__body::before { left: 190px; top: -9px; width: 120px; height: 6px; border-radius: 4px 4px 0 0; box-shadow: -70px 0 0 -8px #24282b; }
.dev.is-land .dev__body::after { right: auto; left: 240px; top: auto; bottom: -9px; width: 140px; height: 6px; border-radius: 0 0 4px 4px; }
.dev.is-land .dev__cam--island { top: 50%; left: 30px; width: 36px; height: 124px; margin: -62px 0 0; }
.dev.is-land .dev__cam--notch { top: 50%; left: 15px; width: 34px; height: 172px; margin: -86px 0 0; border-radius: 0 22px 22px 0; }
.dev.is-land .dev__cam--punch { top: 50%; left: 30px; margin: -14px 0 0; }

/* iPhone SE: рамки сверху и снизу, кнопка «Домой» */
.dev--home .dev__body { padding: 104px 18px; border-radius: 60px; }
.dev--home .dev__screen { border-radius: 4px; }
.dev__speaker { position: absolute; top: 48px; left: 50%; width: 76px; height: 9px; margin-left: -38px; border-radius: 6px; background: #24282b; }
.dev__home { position: absolute; bottom: 24px; left: 50%; width: 58px; height: 58px; margin-left: -29px; border-radius: 50%; box-shadow: inset 0 0 0 3px #2b3034; }
.dev--home.is-land .dev__body { padding: 18px 104px; }
.dev--home.is-land .dev__speaker { top: 50%; left: 48px; width: 9px; height: 76px; margin: -38px 0 0; }
.dev--home.is-land .dev__home { bottom: auto; top: 50%; left: auto; right: 24px; margin: -29px 0 0; }

/* планшет */
.dev--tablet .dev__body { padding: 30px; border-radius: 48px; }
.dev--tablet .dev__screen { border-radius: 20px; }
.dev--tablet .dev__body::after { content: ""; position: absolute; top: 11px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #1d2124; }
.dev--tablet.is-land .dev__body::after { top: 50%; left: 11px; margin: -5px 0 0; }

/* ноутбук */
.dev--laptop .dev__body, .dev--macbook .dev__body { padding: 20px 20px 30px; border-radius: 26px 26px 6px 6px; }
.dev--laptop .dev__screen, .dev--macbook .dev__screen { border-radius: 4px; }
.dev--macbook .dev__body { padding: 18px 18px 26px; }
.dev--macbook .dev__screen { border-radius: 12px 12px 4px 4px; }
.dev__cam--mac { top: 18px; left: 50%; width: 210px; height: 34px; margin-left: -105px; border-radius: 0 0 14px 14px; background: #0e1011; }
.dev--laptop .dev__body::after { content: ""; position: absolute; top: 7px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #23272a; }
.dev__base { position: relative; width: calc(100% + 200px); height: 34px; border-radius: 4px 4px 34px 34px / 4px 4px 22px 22px; background: linear-gradient(#d7dbde, #a9afb4 70%, #7f868b); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.dev__base::before { content: ""; position: absolute; top: 0; left: 50%; width: 260px; height: 12px; margin-left: -130px; border-radius: 0 0 14px 14px; background: linear-gradient(#9aa1a6, #b9bec2); }

/* монитор и iMac */
.dev--monitor .dev__body { padding: 22px; border-radius: 18px; }
.dev--monitor .dev__screen { border-radius: 3px; }
.dev--imac .dev__body { padding: 30px 30px 160px; border-radius: 30px; background: linear-gradient(#eef0f1 calc(100% - 160px), #b8dcc4 calc(100% - 160px)); box-shadow: 0 0 0 3px #cfd5d1, 0 40px 90px rgba(0, 0, 0, .4); }
.dev--imac .dev__screen { border-radius: 4px; }
.dev__neck { width: 220px; height: 170px; background: linear-gradient(90deg, #6e757a, #b4babe 45%, #8a9196); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.dev__foot { width: 560px; height: 26px; border-radius: 12px 12px 6px 6px; background: linear-gradient(#c7ccd0, #8f969b); box-shadow: 0 24px 50px rgba(0, 0, 0, .35); }
.dev--imac .dev__neck { width: 380px; height: 220px; background: linear-gradient(#a6d3b5, #8fc4a2); clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%); }
.dev--imac .dev__foot { width: 460px; height: 18px; background: linear-gradient(#9fcfae, #7fb593); }

/* свой размер — просто экран с тонкой рамкой */
.dev--bare .dev__body { padding: 0; background: none; box-shadow: 0 0 0 2px var(--green-line), 0 30px 70px rgba(0, 0, 0, .35); }

/* Подсказки */
.scr__help { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 12px 16px; font-size: 15px; }
.scr__help summary { cursor: pointer; font-weight: 600; color: var(--text-strong); }
.scr__help ul { margin: 12px 0 4px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.scr__privacy { margin: 0; font-size: 13.5px; color: var(--muted); }

@media (max-width: 760px) {
  .scr__tool span { display: none; }
  .scr__tool { padding: 0 11px; }
  .scr__stage { padding: 20px 12px; min-height: 340px; }
  .scr__row-dev { gap: 22px; }
}
@media (max-width: 560px) {
  .scr__bar { flex-wrap: wrap; padding: 12px; }
  .scr__url { flex-basis: 100%; }
  .scr__go { flex: 1; }
  .scr__panel { padding: 12px; }
  .scr__seg { width: 100%; }
  .scr__seg button { flex: 1; padding: 10px 8px; }
  .scr__devs { grid-template-columns: 1fr 1fr; }
  .scr__dev { grid-template-columns: 1fr; grid-template-areas: "n" "s"; }
  .scr__dev > svg { display: none; }
  .scr__devgrp .scr__dev { grid-template-columns: auto 1fr; grid-template-areas: "i n" "i s"; }
}
