/* Calm, high-contrast board. Every flex rule carries the -webkit- form for old iPads; no CSS
   variables or grid. The only motion is a 150 ms highlight on the touched key. */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f4f1ea;
  color: #1f2933;
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-text-size-adjust: 100%;
}

#app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px;
  box-sizing: border-box;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-flex-direction: column;
  flex-direction: column;
}

#top {
  -webkit-flex: 0 0 17%;
  flex: 0 0 17%;
  display: -webkit-flex;
  display: flex;
  padding: 4px;
  box-sizing: border-box;
}

#strip {
  -webkit-flex: 1;
  flex: 1;
  margin-right: 8px;
  padding: 0 0.4em;
  background: #ffffff;
  border: 3px solid #1f2933;
  border-radius: 14px;
  overflow: hidden;
  white-space: pre;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.cursor {
  display: inline-block;
  width: 0.08em;
  height: 1em;
  margin-left: 0.05em;
  background: #2f6fb0;
}

#sound {
  -webkit-flex: 0 0 18%;
  flex: 0 0 18%;
  margin: 0;
}

#grid {
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.row {
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-flex;
  display: flex;
}

.key {
  -webkit-flex: 1;
  flex: 1;
  margin: 4px;
  background: #ffffff;
  border: 2px solid #c3ccd5;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
}

/* Two keys wide plus the margin and border between them (8px + 4px), so the row's letters line up with the rows above. */
.key.wide {
  -webkit-flex: 2 2 12px;
  flex: 2 2 12px;
}

.key.ctl {
  font-size: 0.45rem;
  background: #e3ecf5;
  border-color: #a9bdd1;
}

.key.speak {
  background: #d9efdf;
  border-color: #8fc4a0;
}

.key.off {
  background: #eeeeee;
  color: #777777;
}

.key.down {
  background: #ffd866;
  border-color: #d9a400;
}
