body {
  touch-action: manipulation;
  margin: 0.5rem;
  background: #000;
  color: #ddd;
  font-family: "Montserrat", sans-serif;
}

#app {
  width: 100%;
  min-height: 90vh;
  margin: 0 auto;
  display: flex;
  flex-flow: column nowrap;
  gap: min(1rem, 1vw);
}

button {
  font-family: "Montserrat", sans-serif;
  min-height: 2.5rem;
  min-width: 2rem;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  color: #eee;
  background-color: #444;
  border: 1px solid #666;
  border-radius: 4px;
  margin: 1px;
}

button:disabled {
  color: #555;
  background-color: #333;
  border-color: #555;
}

.button-row {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: min(0.5rem, 0.5vw);
}

.button-row>button {
  flex: 1;
}

.round-timers {
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  gap: min(0.5rem, 0.5vw);
}

.round-timers .timer {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: min(0.5rem, 0.5vw);
}

.round-timers .timer .button-row {
  flex: 3;
}

.round-timers .timer .description {
  flex: 1;
  min-width: 2em;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-around;
}

#players {
  flex: 2;
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  gap: min(1rem, 1vw);
}

.player {
  flex: 1;
  min-width: 10%;
  max-width: 40%;
  display: flex;
  flex-flow: column nowrap;
  gap: min(1rem, 1vw);
  border: 1px solid #666;
  border-radius: 4px;
  color: #eee;
  background-color: #222;
  padding: min(1rem, 1vw);
}

.player input {
  font-size: 1em;
  font-weight: normal;
  font-family: serif;
  width: 90%;
}

.player.current-turn {
  border-color: white;
  color: #fff;
  background-color: #2b2b2b;
}

.player .name {
  font-size: x-large;
  font-weight: normal;
  font-family: serif;
}

.player .name button {
  font-size: x-large;
  float: right;
}

.player.current-turn .name button {
  border-color: white;
}

.player .status-toggles button {
  font-size: large;
}

.player.focusing button.focusing {
  background-color: #969;
  border-color: #e9e;
  box-shadow: 0 0 6px 3px #969;
  z-index: 20;
}

.player.light-bearer button.light-bearer {
  background-color: #fff;
  border-color: #feb;
  box-shadow: 0 0 min(52px, 4vw) min(19px, 2vw) #eda;
  z-index: 15;
}

.player.dying button.dying {
  background-color: #200;
  border-color: #c33;
  box-shadow: 0 0 16px 8px #200;
  z-index: 10;
}

.player .move-player button {
  font-size: larger;
}

.round-timers .expired .description {
  color: #ccf;
  background-color: #003;
  box-shadow: 0 0 16px 8px #003;
}

#gm-bar {
  flex: 1;
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  gap: min(1rem, 1vw);
  border: 1px solid #666;
  border-radius: 4px;
  background-color: #222;
  padding: min(1rem, 1vw);
}

#gm-bar.current-turn {
  border-color: white;
  background-color: #2b2b2b;
}

#gm-bar>* {
  flex: 1;
}

#random-encounter-timer {
  display: flex;
  flex-flow: column wrap;
  align-items: stretch;
  gap: min(1rem, 1vw);
}

#random-encounter-timer button.selected {
  border-color: white;
}

#random-encounter-timer .indicator {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: min(1rem, 1vw);
}

#random-encounter-timer .indicator .item {
  height: 2rem;
  width: 2rem;
  line-height: 1.9rem;
  font-size: min(1rem, 2vw);
  border: 1px solid #666;
  border-radius: 1.5rem;
  color: #eee;
  background-color: #444;
  text-align: center;
  padding: min(0.5rem, 0.5vw);
  white-space: nowrap;
}

#random-encounter-timer .indicator .item.current {
  border-color: white;
  color: #fff;
  background-color: #444;
}

#random-encounter-timer .indicator .item.disabled {
  border-color: #555;
  color: #555;
  background-color: rgba(0, 0, 0, 0);
}

#gm-bar.current-turn #random-encounter-now.current {
  background-color: #570;
  border-color: #dfa;
  box-shadow: 0 0 16px 8px #460;
}

#light-timer {
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  gap: min(0.5rem, 0.5vw);
}

#light-timer .description {
  font-size: x-large;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-around;
  padding: min(2rem, 2vw);
}

#light-timer .description>* {
  font-family: serif;
  font-weight: bold;
  text-align: center;
  padding: min(1rem, 1vw);
  color: #985;
  background-color: #fff;
  border-color: #feb;
  border-radius: 1rem;
  box-shadow: 0 0 min(52px, 4vw) min(19px, 2vw) #eda;
  z-index: 15;
}

#light-timer.expired .description>* {
  color: #777;
  background-color: #000;
  border-color: black;
  box-shadow: 0 0 52px 19px #000;
}

#big-buttons {
  flex: 0.5;
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  justify-content: space-around;
  gap: min(1rem, 1vw);
}

#big-buttons #next-turn,
#big-buttons #done-editing {
  flex: 1;
}

#gm-bar .jump-turn {
  flex: 0.5;
  font-size: x-large;
}

#gm-bar.current-turn .jump-turn {
  border-color: #fff;
}

#next-turn::after {
  display: block;
  content: "▶︎";
  font-size: min(3rem, 3vw);
}

#footer {
  font-size: small;
  text-align: center;
  color: #888;
}

#footer a {
  color: #aaa;
}

#footer #shadowdark-third-party-logo {
  min-width: 400px;
  width: 50%;
  max-width: 600px;
}
