:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202124;
  background: #f5f6f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px;
}

main {
  width: min(100%, 680px);
  margin: 0 auto;
}

header {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #c5221f;
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.2;
}

header p,
.hint {
  color: #5f6368;
  line-height: 1.6;
}

header p {
  margin: 10px 0 0;
}

.card {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #e1e3e5;
  border-radius: 12px;
  background: #fff;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c7c9cc;
  border-radius: 8px;
  font: inherit;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8ab4f8;
  outline-offset: 2px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: end;
}

.row > .grow {
  flex: 1;
}

button {
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #c5221f;
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #a91b18;
}

button.secondary {
  border: 1px solid #dadce0;
  background: #fff;
  color: #202124;
}

button.secondary:hover:not(:disabled) {
  background: #f1f3f4;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.timeline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  color: #5f6368;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.timeline input[type="range"] {
  min-height: 36px;
  padding: 0;
  accent-color: #c5221f;
  cursor: pointer;
}

.timeline input[type="range"]:disabled {
  cursor: not-allowed;
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-weight: 600;
}

.status::before {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #9aa0a6;
  content: "";
}

.status[data-connected="true"]::before {
  background: #188038;
}

.hint {
  margin: 10px 0 0;
  font-size: 14px;
}

.notice {
  min-height: 24px;
  margin: 14px 0 0;
  color: #5f6368;
  line-height: 1.5;
}

.video-frame {
  overflow: hidden;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #111;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

nav {
  margin-top: 18px;
  color: #5f6368;
  font-size: 14px;
}

nav a {
  color: #174ea6;
}

@media (max-width: 480px) {
  body {
    padding: 24px 12px;
  }

  .card {
    padding: 16px;
  }

  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}
