:root {
  color-scheme: light;
  font:
    16px/1.5 system-ui,
    sans-serif;
  color: #142d3e;
  background: #f4f7f8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.8rem clamp(0.8rem, 3vw, 2rem);
}
header {
  color: white;
  background: #143647;
  justify-content: space-between;
}
output {
  font-size: 0.875rem;
}
main {
  max-width: 34rem;
  margin: 10vh auto;
  padding: 2rem;
  background: white;
  border: 1px solid #c5d5da;
  border-radius: 0.75rem;
}
h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
}
label,
input,
textarea {
  display: block;
  width: 100%;
}
input,
textarea,
button {
  font: inherit;
  border: 1px solid #8da7b1;
  border-radius: 0.4rem;
  padding: 0.55rem 0.85rem;
}
input {
  margin: 0.35rem 0 1rem;
}
button {
  background: white;
  color: #163e50;
  cursor: pointer;
}
form button {
  background: #096457;
  color: white;
  border: 0;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #159589;
  outline-offset: 2px;
}
#end {
  margin-left: auto;
  color: #902c2a;
}
#session:not([hidden]) {
  display: flex;
  height: calc(100dvh - 3.2rem);
  flex-direction: column;
}
#viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: none;
  background: #17252e;
  position: relative;
}
video {
  display: block;
  touch-action: none;
  user-select: none;
  margin: auto;
  max-width: none;
}
#editor {
  padding: 0.35rem 1rem;
  background: white;
}
nav {
  background: #fff;
  border-bottom: 1px solid #d5dfe2;
}
button:disabled {
  opacity: 0.55;
}
@media (max-width: 550px) {
  main {
    margin: 2rem 0.7rem;
    padding: 1.3rem;
  }
  nav {
    padding: 0.4rem;
    gap: 0.25rem;
  }
  nav button {
    font-size: 0.85rem;
    padding: 0.5rem;
  }
  header {
    padding: 0.6rem;
  }
}

[hidden] {
  display: none !important;
}
