* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  background: #090f1d;
  color: #f7f9fc;
  --muted: #aab8cf;
  --accent: #91baff;
  --line: #24344f;
}
body { margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px max(24px, calc((100% - 1320px) / 2));
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}
.bar img { display: block; width: 158px; height: auto; }
main {
  margin: 0 auto;
  max-width: 1370px;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 40px) 32px;
}
.intro { margin-bottom: 24px; }
h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -.055em; }
p { line-height: 1.5; }
.intro p { margin: 12px 0 0; color: var(--muted); }
.simulator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 192px;
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}
.frame {
  padding: clamp(4px, 1vw, 12px);
  border: 1px solid #33435d;
  border-radius: clamp(10px, 1.6vw, 22px);
  background: linear-gradient(150deg, #1e293c, #080b13 75%);
}
.screen {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(6px, .9vw, 12px);
  background: #090f1d;
}
.screen:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.screen:fullscreen .tv-content { width: min(100vw, calc(100vh * 16 / 9)); }
.tv-content {
  position: absolute;
  width: 100%;
  aspect-ratio: 16 / 9;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#picture { display: block; width: 100%; height: 100%; }
.targets { position: absolute; inset: 0; pointer-events: none; }
.target {
  position: absolute;
  pointer-events: auto;
  padding: 0;
  border: 0;
  border-radius: clamp(4px, 1vw, 18px);
  background: transparent;
}
.target.pill { border-radius: 999px; }
.target:hover, .target.selected, .target:focus-visible {
  outline: 2px solid #9ec3ff;
  outline-offset: 2px;
  box-shadow: 0 0 12px #426cb9;
}
.info {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 15px;
}
.info h2, .controls h2 { margin: 0; font-size: 1rem; }
.info p { margin: 5px 0 0; color: var(--muted); font-size: .9rem; }
#fullscreen, .scenes button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #121c30;
  white-space: nowrap;
  font-size: .8rem;
}
#fullscreen:hover, .scenes button:hover { border-color: var(--accent); }
.controls {
  text-align: center;
  padding: 18px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0e1729;
}
.remote {
  width: 138px;
  margin: 16px auto 0;
  padding: 16px 10px 14px;
  border: 1px solid #3a4b69;
  border-radius: 32px;
  background: linear-gradient(140deg, #26364f, #121b2c 62%);
  box-shadow: 0 10px 15px #0004;
}
.remote-top { display: flex; justify-content: space-between; padding: 0 7px; margin-bottom: 14px; }
.remote button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #41577a;
  border-radius: 50%;
  background: #141e32;
}
.remote button:hover, .remote button:active { background: #2b4577; }
.remote-top button { width: 36px; height: 36px; font-size: 1.2rem; }
.pad {
  display: grid;
  grid-template: repeat(3, 36px) / repeat(3, 36px);
  place-content: center;
  gap: 2px;
}
.pad button { font-size: .74rem; }
[data-command="up"] { grid-area: 1 / 2; }
[data-command="left"] { grid-area: 2 / 1; }
[data-command="ok"] { grid-area: 2 / 2; }
[data-command="right"] { grid-area: 2 / 3; }
[data-command="down"] { grid-area: 3 / 2; }
.pad [data-command="ok"] { background: #214d9d; border-color: #6b9cec; font-weight: 700; }
.remote-light { display: block; width: 6px; height: 6px; margin: 12px auto 0; border-radius: 50%; background: var(--accent); }
.keys { margin: 15px 0 0; color: var(--muted); font-size: .71rem; line-height: 1.85; }
kbd { border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; color: #dce7fb; }
.scenes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.scenes [aria-current] { border-color: #729ff1; background: #1e3866; }
.note { margin: 17px 0 0; color: var(--muted); font-size: .8rem; }
@media (max-width: 670px) {
  .simulator { grid-template-columns: minmax(0, 1fr); }
  .controls { display: flex; align-items: center; gap: 12px; padding: 10px 12px; justify-content: space-between; }
  .remote { display: flex; align-items: center; justify-content: center; gap: 10px; width: auto; margin: 0; padding: 7px 10px; border-radius: 16px; }
  .remote-top { display: grid; gap: 4px; margin: 0; padding: 0; }
  .remote-light, .keys { display: none; }
}
@media (max-width: 360px) {
  .bar img { width: 124px; }
  .bar { padding-inline: 16px; }
}
