* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    "Microsoft YaHei",
    sans-serif;
  background: #eff6f6;
  color: #183336;
}
body {
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #d5e3e3;
}
header strong {
  flex: 1;
}
#connection {
  font-size: 12px;
  color: #526b6d;
}
button {
  border: 1px solid #b8cece;
  border-radius: 9px;
  background: white;
  color: inherit;
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
#message {
  margin: 8px 12px;
  font-size: 14px;
  min-height: 20px;
}
#controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 8px 8px;
}
#scores {
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-bottom: 6px;
}
iframe {
  border: 0;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #d8eeee;
}
[hidden] {
  display: none !important;
}
#ready {
  background: #147d75;
  color: white;
  border-color: #147d75;
}

details {
  margin: 0 12px 6px;
  font-size: 12px;
}
#members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-left: 18px;
  gap: 4px;
  max-height: 100px;
  overflow: auto;
}
#scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  font-size: 12px;
  margin: 0 12px;
}
#scores span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#props {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 8px;
  font-size: 12px;
}
#props label,
#props progress,
#props small {
  display: block;
  width: 100%;
}
#props button,
#props select,
#controls button {
  padding: 7px 9px;
  min-height: 36px;
  font-size: 12px;
}
progress {
  accent-color: #147d75;
  height: 10px;
  margin: 4px 0;
}
select {
  max-width: 95px;
  color: inherit;
  background: white;
  border: 1px solid #b8cece;
  border-radius: 6px;
  min-height: 32px;
}
iframe {
  min-height: 280px;
}
