* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #e8e8e8;
  color: #111;
  font: 16px/1.5 Arial, Helvetica, sans-serif;
}

.page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page-home {
  align-items: center;
}

.board {
  width: 100%;
  max-width: 640px;
}

.board h1 {
  margin-bottom: 16px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.choice {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #ccc;
}

a.choice {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.choice h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.work {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu button {
  width: 100%;
  background: #fff;
  color: #111;
  text-align: left;
}

.menu button:hover {
  background: #f2f2f2;
}

.menu button.is-on,
.menu button.is-on:hover {
  background: #111;
  color: #fff;
}

.panel {
  flex: 1;
  min-height: 240px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ccc;
}

.log {
  min-height: 180px;
  padding: 12px;
  border: 1px solid #ccc;
  background: #fafafa;
  font-family: Consolas, "Courier New", monospace;
}

.log p,
.panel p {
  margin: 0;
  white-space: pre-wrap;
}

.log p + p {
  margin-top: 8px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.screens {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-end;
  margin-top: 16px;
}

.phone {
  width: 168px;
  height: 320px;
  padding: 34px 12px 16px;
  border-radius: 28px;
  background: #111;
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 52px;
  height: 6px;
  margin-left: -26px;
  border-radius: 4px;
  background: #444;
}

.screen-face {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
  background: #e8e8e8;
  color: #111;
  text-align: center;
}

.screen-face:has(img) {
  padding: 0;
}

.screen-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.monitor {
  width: 320px;
}

.monitor-bezel {
  height: 200px;
  padding: 14px;
  border-radius: 8px;
  background: #111;
}

.monitor-neck {
  width: 36px;
  height: 22px;
  margin: 0 auto;
  background: #111;
}

.monitor-base {
  width: 120px;
  height: 10px;
  margin: 0 auto;
  background: #111;
  border-radius: 2px;
}

.link-error {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #e8e8e8;
  color: #111;
  font: 700 22px/1.5 Arial, Helvetica, sans-serif;
  text-align: center;
}

.uploads {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}

input.file-pick {
  display: none;
}

.spinner {
  width: 28px;
  height: 28px;
  margin-top: 12px;
  border: 3px solid #ccc;
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.bar-h {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.bar a {
  color: #111;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.bar-h button {
  justify-self: end;
}

@media (min-width: 860px) {
  .work {
    flex-direction: row;
    align-items: stretch;
  }

  .menu {
    width: 280px;
    flex: none;
  }
}

@media (max-width: 560px) {
  .choices {
    grid-template-columns: 1fr;
  }
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #ccc;
}

.integrate-note {
  margin: 0;
  padding: 12px 20px 0;
  color: #111;
  font-weight: 700;
}

.card {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background: #fff;
  border: 1px solid #ccc;
}

h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.note {
  margin: 0 0 20px;
  color: #333;
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border: 1px solid #888;
  background: #fff;
  color: #111;
  font: inherit;
}

input:focus,
button:focus-visible,
a.choice:focus-visible,
.bar a:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

.error {
  margin: 0 0 14px;
  color: #111;
  font-weight: 700;
}

button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: #333;
}

.bar button {
  background: #fff;
  color: #111;
}

.bar button:hover {
  background: #f2f2f2;
  color: #111;
}
