/* ============ WEB ============ */

.webgrid {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.scenarios {
  border-top: 1px solid var(--ink-line);
}

.scenario {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: baseline;
  width: 100%;
  padding: 22px 0 20px;
  text-align: left;
  border-bottom: 1px solid var(--ink-line);
  transition: color 0.3s var(--ease);
}

.scenario__idx {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.3);
  transition: color 0.3s var(--ease);
}

.scenario__head {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(236, 246, 241, 0.55);
  transition: color 0.3s var(--ease);
}

.scenario__body {
  grid-column: 2;
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(236, 246, 241, 0.55);
  transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin-top 0.4s var(--ease);
}

.scenario:hover .scenario__head {
  color: rgba(236, 246, 241, 0.82);
}

.scenario.is-active .scenario__head {
  color: var(--green-50);
}

.scenario.is-active .scenario__idx {
  color: var(--orange);
}

.scenario.is-active .scenario__body {
  max-height: 220px;
  opacity: 1;
  margin-top: 10px;
}

.browser {
  border: 1px solid rgba(236, 246, 241, 0.14);
  border-radius: 4px;
  overflow: hidden;
  background: #0E1311;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.75);
}

.browser__chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding-inline: 14px;
  background: #0B1D16;
  border-bottom: 1px solid rgba(236, 246, 241, 0.1);
}

.browser__dots {
  display: flex;
  gap: 5px;
}

.browser__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(236, 246, 241, 0.24);
}

.browser__title {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.5);
}

.browser__tag {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--green-300);
  border: 1px solid rgba(166, 213, 192, 0.24);
  padding: 3px 7px;
  border-radius: 1px;
}

.browser__body {
  display: flex;
  min-height: 430px;
}

.mockrail {
  flex: none;
  width: 50px;
  padding: 14px 0;
  border-right: 1px solid rgba(236, 246, 241, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mockrail__logo {
  width: 16px;
  height: 16px;
  border: 1px solid var(--green-400);
  background: rgba(113, 187, 157, 0.15);
  margin-bottom: 8px;
}

.mockrail__item {
  width: 16px;
  height: 12px;
  border: 1px solid rgba(236, 246, 241, 0.18);
}

.mockrail__item.is-on {
  border-color: var(--green-400);
  background: rgba(113, 187, 157, 0.2);
}

.mockrail__item--sm {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.mockrail__spacer {
  flex: 1;
}

.mockmain {
  flex: 1;
  min-width: 0;
  padding: 16px 18px 18px;
}

.mocktop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(236, 246, 241, 0.08);
}

.mocktop__title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--green-50);
  letter-spacing: 0.01em;
}

.mocktop__crumb {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: rgba(236, 246, 241, 0.34);
}

.mocktop__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-mono);
  font-size: 8.5px;
  color: var(--green-300);
}

.mocktop__live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green-400);
}

.mockpanel {
  padding-top: 14px;
  animation: panelfade 0.45s var(--ease);
}

.mockpanel[hidden] {
  display: none;
}

@keyframes panelfade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.skel {
  display: inline-block;
  height: 8px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(166, 213, 192, 0.34), rgba(166, 213, 192, 0.16));
}

.statrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat {
  padding: 9px 10px 11px;
  border: 1px solid rgba(236, 246, 241, 0.08);
  background: rgba(236, 246, 241, 0.025);
}

.stat__label {
  display: block;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.4);
}

.stat__value {
  display: flex;
  align-items: center;
  height: 20px;
  margin-top: 4px;
}

.stat__value .skel {
  width: 60%;
  height: 9px;
}

.dashgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.map {
  position: relative;
  height: 262px;
  border: 1px solid rgba(236, 246, 241, 0.08);
  background: #0A1913;
  overflow: hidden;
}

.map__grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(166, 213, 192, 0.07) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(166, 213, 192, 0.07) 0 1px, transparent 1px 34px);
}

.map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(113, 187, 157, 0.35);
}

.map__route {
  stroke: var(--green-400);
  opacity: 0.85;
}

.map__pin {
  position: absolute;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  background: var(--green-600);
  color: #04140D;
  font-family: var(--f-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
  border-radius: 1px;
  box-shadow: 0 0 0 3px rgba(28, 129, 88, 0.18);
}

.map__pin--a { left: 9%; top: 76%; }
.map__pin--b { left: 40%; top: 41%; }
.map__pin--c { left: 79%; top: 53%; }

.map__legend {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.38);
}

.dashlist {
  border: 1px solid rgba(236, 246, 241, 0.08);
  background: rgba(236, 246, 241, 0.02);
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
}

.dashlist__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 6px;
  border-bottom: 1px solid rgba(236, 246, 241, 0.06);
  font-size: 10px;
  color: rgba(236, 246, 241, 0.68);
}

.chip {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border: 1px solid transparent;
  line-height: 1.4;
}

.chip--ok {
  color: var(--green-300);
  border-color: rgba(113, 187, 157, 0.4);
  background: rgba(113, 187, 157, 0.1);
}

.chip--work {
  color: #FFC167;
  border-color: rgba(240, 130, 0, 0.42);
  background: rgba(240, 130, 0, 0.1);
}

.chip--off {
  color: rgba(236, 246, 241, 0.55);
  border-color: rgba(236, 246, 241, 0.22);
}

.chip--warn {
  color: #F2A8A0;
  border-color: rgba(217, 48, 37, 0.4);
  background: rgba(217, 48, 37, 0.08);
}

.dashlist__bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 54px;
  margin-top: 10px;
}

.dashlist__bars span {
  flex: 1;
  background: rgba(113, 187, 157, 0.28);
  min-height: 6px;
}

.dashlist__bars span:nth-child(6) {
  background: rgba(240, 130, 0, 0.55);
}

.dashlist__cap {
  margin-top: 7px;
  font-family: var(--f-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.34);
}

/* single device */

.single {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 8px;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(236, 246, 241, 0.09);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(113, 187, 157, 0.12), transparent 70%),
    #08130E;
  overflow: hidden;
}

.video__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid rgba(166, 213, 192, 0.65);
}

.video__corner--tl { left: 10px; top: 10px; border-left-width: 1px; border-top-width: 1px; }
.video__corner--tr { right: 10px; top: 10px; border-right-width: 1px; border-top-width: 1px; }
.video__corner--bl { left: 10px; bottom: 10px; border-left-width: 1px; border-bottom-width: 1px; }
.video__corner--br { right: 10px; bottom: 10px; border-right-width: 1px; border-bottom-width: 1px; }

.video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(236, 246, 241, 0.35);
  border-radius: 50%;
}

.video__play::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  border-left: 10px solid rgba(236, 246, 241, 0.8);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.video__label {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.58);
}

.video__meta {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-family: var(--f-mono);
  font-size: 8px;
  color: rgba(236, 246, 241, 0.32);
}

.devdata {
  border: 1px solid rgba(236, 246, 241, 0.08);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.devdata__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 7px;
  border-bottom: 1px solid rgba(236, 246, 241, 0.06);
  font-size: 9.5px;
  color: rgba(236, 246, 241, 0.5);
}

.devdata__row:last-child {
  border-bottom: 0;
}

.devdata__row .skel {
  height: 6px;
}

.alertrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(236, 246, 241, 0.08);
  background: rgba(236, 246, 241, 0.02);
}

.alertrow__label {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(236, 246, 241, 0.42);
  margin-right: 3px;
}

.alertrow__more {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 8px;
  color: rgba(236, 246, 241, 0.3);
}

/* remote */

.remote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.dpad {
  position: relative;
  border: 1px solid rgba(236, 246, 241, 0.08);
  background: rgba(236, 246, 241, 0.02);
  min-height: 232px;
  display: grid;
  place-items: center;
  padding-bottom: 22px;
}

.dpad__btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(236, 246, 241, 0.2);
  border-radius: 2px;
  background: rgba(236, 246, 241, 0.03);
}

.dpad__btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 5px solid transparent;
}

.dpad__btn--up { left: 50%; top: 34px; transform: translateX(-50%); }
.dpad__btn--up::after { border-bottom-color: rgba(236, 246, 241, 0.6); transform: translate(-50%, -70%); }
.dpad__btn--down { left: 50%; bottom: 34px; transform: translateX(-50%); }
.dpad__btn--down::after { border-top-color: rgba(236, 246, 241, 0.6); transform: translate(-50%, -30%); }
.dpad__btn--left { top: 50%; left: calc(50% - 74px); transform: translateY(-50%); }
.dpad__btn--left::after { border-right-color: rgba(236, 246, 241, 0.6); transform: translate(-70%, -50%); }
.dpad__btn--right { top: 50%; right: calc(50% - 74px); transform: translateY(-50%); }
.dpad__btn--right::after { border-left-color: rgba(236, 246, 241, 0.6); transform: translate(-30%, -50%); }

.dpad__btn--core {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-color: rgba(166, 213, 192, 0.5);
}

.dpad__btn--core::after {
  width: 6px;
  height: 6px;
  border: 1px solid var(--green-300);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dpad__label {
  position: absolute;
  bottom: 9px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 7.5px;
  color: rgba(236, 246, 241, 0.32);
}

.remotepanel {
  border: 1px solid rgba(236, 246, 241, 0.08);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.remotepanel__row {
  font-size: 9.5px;
  color: rgba(236, 246, 241, 0.5);
}

.slider {
  display: block;
  height: 3px;
  background: rgba(236, 246, 241, 0.12);
  margin-top: 10px;
  position: relative;
}

.slider b {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--green-400);
}

.slider b::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -3px;
  width: 9px;
  height: 9px;
  background: var(--green-300);
  border-radius: 50%;
}

.remotepanel__actions {
  display: flex;
  gap: 6px;
}

.mbtn {
  flex: 1;
  text-align: center;
  padding: 7px 4px;
  border: 1px solid rgba(236, 246, 241, 0.2);
  font-size: 8.5px;
  color: rgba(236, 246, 241, 0.66);
}

.mbtn--green {
  border-color: rgba(113, 187, 157, 0.5);
  background: rgba(28, 129, 88, 0.35);
  color: var(--green-50);
}

.remotepanel__hint {
  font-family: var(--f-mono);
  font-size: 7.5px;
  color: rgba(236, 246, 241, 0.3);
}

.estop {
  grid-column: 1 / -1;
  display: block;
  text-align: center;
  padding-block: 10px;
  border: 1px solid rgba(217, 48, 37, 0.45);
  background: rgba(217, 48, 37, 0.1);
  color: #F2A8A0;
  font-size: 10px;
  letter-spacing: 0.16em;
}
