:root {
  font:
    16px/1.5 Inter,
    system-ui,
    sans-serif;
  color: #eaf3ef;
  background: #101714;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 66px;
  padding: 0 max(5vw, 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #36423c;
  background: #141e19;
}
.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand span {
  color: #a7b7ab;
  margin-left: 12px;
  font-weight: 450;
  letter-spacing: 0;
}
main {
  max-width: 1220px;
  margin: auto;
  padding: 34px max(4vw, 16px);
}
h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  margin: 12px 0 22px;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
}
section {
  margin: 26px 0;
}
button,
input,
select {
  font: inherit;
  border: 1px solid #47594e;
  background: #1b2720;
  border-radius: 7px;
  padding: 8px 12px;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
#screen:focus-visible {
  outline: 2px solid #a5e2ab;
}
button:hover {
  background: #2c4032;
}
.primary,
button[aria-pressed="true"] {
  background: #b3e3aa;
  color: #152217;
  border-color: #b3e3aa;
}
label {
  display: grid;
  gap: 5px;
  color: #c6d6ca;
  font-size: 13px;
}
form,
.tools {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.narrow {
  max-width: 470px;
  padding-top: 9vh;
}
.narrow form {
  display: grid;
}
.narrow input {
  width: 100%;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}
.metric,
.row,
article {
  padding: 14px 18px;
  background: #18231d;
  border: 1px solid #304037;
  border-radius: 9px;
}
.metric strong {
  display: block;
  font-size: 27px;
}
.row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 3fr);
  gap: 10px;
  overflow-wrap: anywhere;
}
.rows,
#lessons {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
}
.screen {
  position: relative;
  background: #090f0c;
  border: 1px solid #36423c;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/10;
}
#frame-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}
.screen {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.screen img {
  -webkit-user-drag: none;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  object-fit: contain;
}
.desk {
  max-width: 1340px;
}
.desk form {
  margin: 12px 0;
}
article {
  white-space: pre-line;
}
.muted,
#help {
  color: #a8b9ad;
}
#notice {
  color: #e7cb97;
  min-height: 1.4em;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  main {
    padding: 16px;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .tools button {
    font-size: 13px;
  }
  header {
    height: 54px;
  }
}

@media (max-width: 300px) and (max-height: 210px) {
  body[data-page="desktop"] { overflow: hidden; }
  body[data-page="desktop"] > header,
  .desk > :not(.screen) { display: none; }
  .desk, .desk .screen { width: 100vw; height: 100dvh; padding: 0; margin: 0; border: 0; border-radius: 0; }
  body[data-page="desktop"]:not(:has(#screen[src])) > header {
    position: absolute; inset: 0; z-index: 1; display: grid; place-content: center;
    height: 100%; border: 0; font-size: 12px;
  }
  body[data-page="desktop"] > header .brand { display: none; }
}
