:root {
  --bkg-color: white;
  --txt-color: black;
  --title-color: darkorange;
  --puzzle-date-color: #505050;
  --sep-color: lightgray;
  --btn-bkg-color: darkgoldenrod;
  --btn-txt-color: white;
  --ans-color: #505050;
  --ans-done-color: blue;
  --tile-bkg-color: lightgray;
  --tile-txt-color: black;
  --tile-border-color: #c0c0c0;
  --msg-txt-color: darkred;
  --score-txt-color: blue;
  --icon-small-color: darkgray;
  --grid-nav-txt-color: #202020;
  --grid-nav-bkg-color: #f0f0f0;
  --grid-nav-border-color: #e0e0e0;
  --base-font-size: 14pt;
  --title-font-size: 24pt;
  --score-font-size: 14pt;
  --ans-font-size: 28pt;
  --tile-font-size: 32pt;
  --msg-font-size: 16pt;
  --btn-font-size: 14pt;
  --icon-font-size: 18pt;
  --icon-font-size-small: 14pt;
  --popup-font-size: 12pt;
  --unfinished-opacity: 30%;
  --finished-opacity: 100%;
}

[data-theme="dark"] {
  --bkg-color: black;
  --txt-color: white;
  --title-color: darkorange;
  --puzzle-date-color: #a0a0a0;
  --sep-color: #404040;
  --btn-bkg-color: darkgoldenrod;
  --btn-txt-color: white;
  --ans-color: lightgray;
  --ans-done-color: #8080FF;
  --tile-bkg-color: #202020;
  --tile-txt-color: white;
  --tile-border-color: #404040;
  --msg-txt-color: red;
  --score-txt-color: #8080FF;
  --icon-small-color: #8080FF;
  --grid-nav-txt-color: #b0b0b0;
  --grid-nav-bkg-color: #101010;
  --grid-nav-border-color: #202020;
}

* {
  touch-action: manipulation;
}

body {
  font-family: Barlow, Arial, Helvetica, sans-serif;
  font-size: var(--base-font-size);
  color: var(--txt-color);
  background-color: var(--bkg-color);
  overscroll-behavior: none;
  overscroll-behavior-y: contain;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

button {
  font-size: var(--btn-font-size);
  padding: 0.75em;
  color: var(--btn-txt-color);
  background-color: var(--btn-bkg-color);
  border: none;
  border-radius: 0.5em;
  cursor: pointer;
}

h2 {
  margin-bottom: 0.25em;
}

.game {
  z-index: 1;
}

.title {
  font-size: var(--title-font-size);
  width: 10.5em;
  margin: 0 auto;    
  text-align: center;
  color: var(--title-color);
  height: 1.25em;
  border-bottom: 1px solid var(--sep-color);
}

.top-info {
  font-size: var(--score-font-size);
  width: 18em;
  margin: 0 auto;    
  text-align: center;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--sep-color);  
}

.top-container{
  font-size: var(--tile-font-size);
  margin: 0 auto;
  width: 6em;
  height: 100%;
}

.tile {
  position: absolute;
  border: 1px var(--tile-border-color) solid;
  background-color: var(--tile-bkg-color);
  color: var(--tile-txt-color);
  width: 1.1em;
  height: 1.1em;
  text-align: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 1em;  
  cursor: pointer;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.message-text {
  font-size: var(--msg-font-size);
  margin: 0 auto;    
  text-align: center;
  color: var(--msg-txt-color);
  height: 1em;
  margin-bottom: 0.5em;
}

.popup {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bkg-color);
  display: none;
  z-index: 2;
  font-size: var(--popup-font-size);
}

.dialog-container {
  width: 20em;
  text-align: center;
  margin: 0 auto;
}

.plain-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: var(--icon-font-size);
  display: inline-block;
  line-height: 1em;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

.icon-small {
  font-size: var(--icon-font-size-small);
  color: var(--score-txt-color);
}