html {
  --accent-color: #2fff4f;
  --accent-color-old: #ff4f4f;
  --font-size: 24px;
}
@media only screen and (max-width: 767px) {
  html {
    --font-size: 18px;
  }
}
a {
  color: var(--accent-color);
}
a:visited {
  color: #7f7f7f;
}
html,
body {
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;

  /* max-width: 100%; */
}
body {
  padding: 0 20px;
  margin: 0;
  overflow-x: clip;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;

  background: black;
  color: #7f7f7f;
  color-scheme: dark;
  
  -webkit-text-size-adjust: 100%;
}
}
@media only screen and (max-width: 767px) {
  body {
    padding: 10px 20px;
  }
}
* {
  /* user-select: none !important; */
}

body,
button {
  font-family: nokia, system-ui, sans-serif;
  font-size: var(--font-size);
}
button {
  border: none;
  outline: none;
  background: white;
  color: #000000;
  
  min-width: 80px;
  
  -webkit-user-select: none;
}
button:not(:disabled):active:hover {
  opacity: .8;
}
button:disabled,
button.large:disabled {
  background: #5f5f5f;
  outline: 1px solid white;
  background: transparent;
  color: white;
}

.contents {
  width: 100%;
  max-width: 640px;
  /* outline: 1px solid red; */
  margin: 0 auto;
}

.letter-nav {
  margin-top: 20px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.preview {
  margin-top: 60px;
  margin-bottom: 40px;
  margin-left: 20px;
  margin-right: 20px;
  text-align: center;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none;
}
@media only screen and (max-width: 767px) {
  .preview {
    margin-top: 30px;
    margin-bottom: 20px;    
  }
}
.canvas-outer {
  margin: 0 auto;  
  position: relative;
}
.canvas-outer .text-letter-cover {
  position: absolute;
  /* outline: 1px solid red; */
  z-index: 10000;
  cursor: pointer;
}
.preview canvas {
  image-rendering: pixelated;
  /* outline: 1px solid red; */
  margin: 0 auto;
}
.editor-outer {
  width: 740px;
  /* max-width: calc(100vw - 40px); */
  padding: 20px 0;
  margin: -20px auto;
  overflow-x: clip;
  overflow-x: hidden;
  overflow-y: clip;
  overflow-y: hidden;
  
  position: relative;
  /*touch-action: pinch-zoom;*/ /* Doesn’t quite work. JavaScript prevention of double tap to zoom and hold to show menu also destroys pinch to zoom presently. */
  
  -webkit-touch-callout: none !important;
  -webkit-user-select: none;
  
  /* opacity: 0; */
}
.editor-outer.visible canvas {
  opacity: 1;
}
.editor-outer * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.editor-outer .hint {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
}
.editor-outer .hint.invisible {
  transition: opacity 500ms;
  opacity: 0; 
}

.editor {
  /* position: absolute; */
  /* left: 20px; */
  /* top: 100px; */
  cursor: crosshair;
  margin: 0 auto;
  /* margin-top: 40px; */
  position: relative;
  /* aspect-ratio: 1 / 1; */
  height: auto;
  z-index: 0;
  /* max-width: 100vw; */
}
.editor canvas {
  position: absolute;
  margin: 0 auto;
  pointer-events: none;
}
.editor canvas.shadow-mask {
  z-index: 1000;
}
.editor-outer canvas {
  opacity: 0;
  transition: opacity 1.2s;
}

.actions {
  text-align: center;
  margin-left: 20px;
  margin-right: 20px;
  margin-bottom: 20px;
}
.actions button {
  margin-bottom: .5em;
}
.actions .send-to-server {
  width: 100%;
}
.letter-nav .multi-letter.visible {
  padding: 0 20px;
  display: flex !important;
  flex-direction: row;
}
.letter-nav .multi-letter .current-letter-outer {
  flex-grow: 100;
  padding-left: 10px;
  padding-right: 10px;
  display: block;
  align-content: center;
}


.actions .hint {
  display: block;
  margin-bottom: 1.5em;
  color: #7f7f7f;
}

@media only screen and (max-width: 767px) {
  button {
    line-height: 2;
  }
}
button.large {
  line-height: 1.5;
  padding-top: .5em;
  padding-bottom: .5em;  
  background: var(--accent-color);  
}
@media only screen and (max-width: 767px) {
  button.large {
    padding-top: .5em;
    padding-bottom: .5em;  
    /* line-height: 3; */
  }
}

.keyboard-shortcuts.multi-letter.visible {
  display: grid !important;
  column-gap: 20px;
  grid-template-columns: 50% 50%;
  margin-bottom: 20px;
}
.keyboard-shortcuts span:nth-child(odd) {
  /* color: red; */
  text-align: right;
}
.keyboard-shortcuts span:nth-child(even) {
  /* color: green; */
}

.keyboard-shortcuts.multi-letter.invisible {
  display: none !important;
}



.toast {
  position: fixed;
  left: 20px;
  top: 20px;
  color: black;
  background: var(--accent-color);
  padding: 8px 16px;
}

.debug-info {
  font-size: 50%;
  position: fixed;
  background: white;
  color: black;
  padding: 5px 10px;
  right: 10px;
  bottom: 10px;
  opacity: .5;
  display: none;
}

.visible {
  display: initial !important;
}
.editor-outer.visible {
  display: block !important;
}
.single-letter,
.multi-letter {
  display: none;
}

.further-reading.multi-letter.visible {
  display: block !important;
}

.further-reading {
  margin-top: 3em;
  margin-bottom: 1em;
}
.further-reading ul {
  padding: 0;
  margin: 0;
  margin: 1em 0;
  list-style-type: '→ ';
}


@font-face {
  font-family: Nokia;
  src: url(NokiaCellphoneFC-Small.otf);
  size-adjust: 80%;
}
